-
Notifications
You must be signed in to change notification settings - Fork 16
/
config.go
72 lines (64 loc) · 2.13 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package transaction
// Core
// Config
// Copyright © 2017-2018 Eduard Sesigin. All rights reserved. Contacts: <claygod@yandex.ru>
const trialLimitConst int = 2000000000 //29999999
const trialStop int = 64
const permitError int64 = -9223372036854775806
const usualNumTransaction = 4
const endLineSymbol string = "\n"
const separatorSymbol string = ";"
type errorCodes int
var trialLimit = trialLimitConst
// Hasp state
const (
stateClosed int64 = iota
stateOpen
)
// No error code
const (
Ok errorCodes = 200
)
// Error codes
const (
ErrCodeUnitExist errorCodes = 400 + iota
ErrCodeUnitNotExist
ErrCodeUnitNotEmpty
ErrCodeAccountExist
ErrCodeAccountNotExist
ErrCodeAccountNotEmpty
ErrCodeAccountNotStop
ErrCodeTransactionFill
ErrCodeTransactionCatch
ErrCodeTransactionCredit
ErrCodeTransactionDebit
ErrCodeCoreCatch
ErrCodeCoreStart
ErrCodeCoreStop
ErrCodeSaveCreateFile
ErrCodeLoadReadFile
ErrCodeLoadStrToInt64
)
// Error messages
const (
errMsgUnitExist string = `This unit already exists`
errMsgUnitNotExist string = `This unit already not exists`
errMsgUnitNotDelAll string = `Could not delete all accounts`
// errMsgAccountExist string = `This account already exists`
// errMsgAccountNotExist string = `This account already not exists`
// errMsgAccountNotEmpty string = `Account is not empty`
// errMsgAccountNotStop string = `Account does not stop`
errMsgAccountNotCatch string = `Not caught account`
errMsgAccountCredit string = `Credit transaction error`
errMsgCoreNotCatch string = `Not caught transactor`
errMsgTransactionNotFill string = `Not fill transaction`
errMsgTransactionNotCatch string = `Not caught transaction`
// ErrMsgTransactionLessZero string = `Not caught transaction` //
errMsgCoreNotStart string = `Core does not start`
errMsgCoreNotStop string = `Core does not stop`
errMsgCoreNotLoad string = `Core does not load`
errMsgCoreNotSave string = `Core does not save`
errMsgCoreNotReadFile string = `Core does not read file`
errMsgCoreNotCreateFile string = `Core does not create file`
errMsgCoreParseString string = `Could not parse line`
)