Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/claygod/transaction
/ functions
Functions
107 in github.com/claygod/transaction
⨍
Functions
107
◇
Types & classes
9
↓ 50 callers
Method
context
* context - add context to the log */
logger.go:27
↓ 47 callers
Method
Begin
* Begin - a new transaction is created and returned. The application stops for the duration of this operation. */
core_public.go:338
↓ 44 callers
Method
End
* End - complete the data preparation and proceed with the transaction. Returned codes: ErrCodeUnitNotExist // unit not exist ErrCodeTransactionC
transaction_public.go:54
↓ 43 callers
Method
Debit
* Debit - add debit to transaction. Input variables: customer - ID account - account string code count - number (type "uint64" for "less-zero" saf
transaction_public.go:24
↓ 36 callers
Method
AddUnit
* AddUnit - adding a new unit. Two units with the same identifier can not exist. Returned codes: ErrCodeCoreCatch // not obtained permission ErrCod
core_public.go:45
↓ 32 callers
Method
Start
* Start - start the application. Only after the start you can perform transactions. If the launch was successful, or the application is already runnin
core_public.go:174
↓ 29 callers
Function
New
* New - create new core */
core_public.go:29
↓ 27 callers
Method
getAccount
* getAccount - take account by key. If there is no such account, it will be created (with zero balance). */
unit.go:32
↓ 23 callers
Function
log
* log - return new logger */
logger.go:20
↓ 23 callers
Method
send
()
logger.go:33
↓ 22 callers
Method
addition
* addition - add to the balance the input variable. If the result of adding the balance and the input variable is less than zero, the balance does not
account.go:41
↓ 15 callers
Method
getUnit
(id int64)
storage.go:39
↓ 15 callers
Function
newAccount
* newAccount - create new account. */
account.go:28
↓ 14 callers
Method
Credit
* Credit - add credit to transaction. Input variables: customer - ID account - account string code count - number (type "uint64" for "less-zero" s
transaction_public.go:38
↓ 10 callers
Method
addUnit
(id int64)
storage.go:34
↓ 10 callers
Method
total
* total - current balance of all accounts. At the time of the formation of the answer will be a lock. */
unit.go:53
↓ 9 callers
Function
newUnit
* newUnit - create new Unit. */
unit.go:22
↓ 9 callers
Method
start
* start - start all accounts. Returns a list of not starting accounts. */
unit.go:152
↓ 9 callers
Method
stop
* stop - stop all accounts. Returns a list of non-stopped accounts. */
unit.go:168
↓ 8 callers
Method
Stop
* Stop - stop the application. The new transactions will not start. Old transactions are executed, and after the end of all running transactions, the
core_public.go:193
↓ 7 callers
Method
TotalAccount
* TotalAccount - account balance If an account has not been created before, it will be created with a zero balance. Returned codes: ErrCodeCoreCatch
core_public.go:148
↓ 7 callers
Method
catch
* catch - get permission to perform operations with the account. */
account.go:85
↓ 6 callers
Method
delUnit
(id int64)
storage.go:43
↓ 6 callers
Function
newStorage
* newStorage - create new storage */
storage.go:24
↓ 5 callers
Method
DelUnit
* DelUnit - deletion of a unit. The unit will be deleted only when all its accounts are stopped and deleted. In case of an error, a list of not delete
core_public.go:75
↓ 5 callers
Method
TotalUnit
* TotalUnit - statement on all accounts of the unit. The ID-balance array is returned. Returned codes: ErrCodeCoreCatch // not obtained permission
core_public.go:118
↓ 5 callers
Function
newSection
* newSection - create new section */
storage.go:67
↓ 4 callers
Method
Save
* Save - saving data to a file. The application stops for the duration of this operation. Returned codes: ErrCodeCoreStop // unable to stop app Err
core_public.go:299
↓ 4 callers
Method
catch
* catch - obtaining a permit for an operation. If we have an open status, the counter is incremented and the `true` returns, otherwise the `false` is
core_private.go:16
↓ 4 callers
Method
delAccount
* delAccount - delete account. The account can not be deleted if it is not stopped or has a non-zero balance. */
unit.go:81
↓ 4 callers
Method
delAllAccounts
* delAllAccounts - delete all accounts. On error, a list of non-stopped or non-empty accounts is returned. Returned codes: ErrCodeAccountNotStop //
unit.go:113
↓ 4 callers
Method
throw
* throw - permission to conduct an operation is no longer required. Decrement of the counter. */
core_private.go:30
↓ 4 callers
Method
throw
* throw - remove permissions in accounts. */
transaction_private.go:131
↓ 3 callers
Method
Load
* Load - loading data from a file. The application stops for the duration of this operation. The existing accounts are not overwritten. Returned code
core_public.go:220
↓ 3 callers
Method
delStoppedAccounts
* delStoppedAccounts - delete all accounts (they are stopped). Returns a list of not deleted accounts (with a non-zero balance). */
unit.go:134
↓ 2 callers
Method
catch
* catch - obtaining permissions from accounts. Returned codes: ErrCodeTransactionCatch // account not allowed operation Ok */
transaction_private.go:112
↓ 2 callers
Method
exeTransaction
* exeTransaction - execution of a transaction. Returned codes: ErrCodeUnitNotExist // unit not exist ErrCodeTransactionCatch // account not catch
transaction_private.go:30
↓ 2 callers
Method
fill
* fill - getting accounts in the list. Returned codes: ErrCodeUnitNotExist // unit not exist Ok */
transaction_private.go:89
↓ 2 callers
Method
id
* id - create an intermediate identifier from a persistent identifier. */
storage.go:50
↓ 2 callers
Function
newTransaction
Core Transaction Copyright © 2017-2018 Eduard Sesigin. All rights reserved. Contacts: <claygod@yandex.ru> * newTransaction - create new Transaction. *
transaction_private.go:10
↓ 2 callers
Method
rollback
* rollback - rolled back account operations. */
transaction_private.go:75
↓ 1 callers
Method
throw
* throw - current account operation has been completed */
account.go:102
↓ 1 callers
Method
totalUnsafe
* totalUnsafe - current balance of all accounts (fast and unsafe). Without locking. Use this method only in serial (non-parallel) mode. */
unit.go:67
Function
BenchmarkAccountAddition
(b *testing.B)
account_bench_test.go:32
Function
BenchmarkAccountStartStop
(b *testing.B)
account_bench_test.go:21
Function
BenchmarkAccountTotal
(b *testing.B)
account_bench_test.go:11
Function
BenchmarkBuyParallel
(b *testing.B)
core_bench_test.go:208
Function
BenchmarkBuySequence
(b *testing.B)
core_bench_test.go:184
Function
BenchmarkCreditParallel
(b *testing.B)
core_bench_test.go:75
Function
BenchmarkCreditSequence
(b *testing.B)
core_bench_test.go:55
Function
BenchmarkDebitParallel
(b *testing.B)
core_bench_test.go:117
Function
BenchmarkDebitSequence
(b *testing.B)
core_bench_test.go:99
Function
BenchmarkTotalUnitParallel
(b *testing.B)
core_bench_test.go:32
Function
BenchmarkTotalUnitSequence
(b *testing.B)
core_bench_test.go:12
Function
BenchmarkTrGetAccount2Parallel
(b *testing.B)
core_bench_test.go:258
Function
BenchmarkTrGetAccount2Sequence
(b *testing.B)
core_bench_test.go:236
Function
BenchmarkTransferParallel
(b *testing.B)
core_bench_test.go:160
Function
BenchmarkTransferSequence
(b *testing.B)
core_bench_test.go:140
Function
BenchmarkUnitGetAccountSequence
(b *testing.B)
core_bench_test.go:281
Function
TestAccountAdd
(t *testing.T)
account_test.go:11
Function
TestAccountAddingOverflow1
(t *testing.T)
account_test.go:30
Function
TestAccountAddingOverflow2
(t *testing.T)
account_test.go:39
Function
TestAccountCath
(t *testing.T)
account_test.go:86
Function
TestAccountCredit
(t *testing.T)
account_test.go:48
Function
TestAccountDebit
(t *testing.T)
account_test.go:68
Function
TestAccountStart
(t *testing.T)
account_test.go:119
Function
TestAccountStop
(t *testing.T)
account_test.go:149
Function
TestAccountThrow
(t *testing.T)
account_test.go:110
Function
TestAccountTotal
(t *testing.T)
account_test.go:76
Function
TestCoreAddUnit
(t *testing.T)
core_test.go:118
Function
TestCoreDelUnit
(t *testing.T)
core_test.go:137
Function
TestCoreGetAccount
(t *testing.T)
core_test.go:104
Function
TestCoreLoad
(t *testing.T)
core_test.go:295
Function
TestCoreSave
(t *testing.T)
core_test.go:233
Function
TestCoreStart
(t *testing.T)
core_test.go:65
Function
TestCoreStop
(t *testing.T)
core_test.go:82
Function
TestCoreTotalAccount
(t *testing.T)
core_test.go:200
Function
TestCoreTotalUnit
(t *testing.T)
core_test.go:171
Function
TestCreditPrepare
(t *testing.T)
transaction_test.go:11
Function
TestSectionAdd
(t *testing.T)
storage_test.go:77
Function
TestSectionDel
(t *testing.T)
storage_test.go:102
Function
TestSectionGet
(t *testing.T)
storage_test.go:89
Function
TestSectionNew
(t *testing.T)
storage_test.go:71
Function
TestStorageAdd
(t *testing.T)
storage_test.go:21
Function
TestStorageDel
(t *testing.T)
storage_test.go:46
Function
TestStorageGet
(t *testing.T)
storage_test.go:33
Function
TestStorageId
(t *testing.T)
storage_test.go:59
Function
TestStorageNew
(t *testing.T)
storage_test.go:9
Function
TestTransactionCatch
(t *testing.T)
transaction_test.go:64
Function
TestTransactionExe
(t *testing.T)
transaction_test.go:34
Function
TestTransactionRollback
(t *testing.T)
transaction_test.go:89
Function
TestTransfer
(t *testing.T)
core_test.go:39
Function
TestUnitDel
(t *testing.T)
unit_test.go:87
Function
TestUnitDelAccount
(t *testing.T)
unit_test.go:34
Function
TestUnitDelAllAccount
(t *testing.T)
unit_test.go:63
Function
TestUnitGetAccount
(t *testing.T)
unit_test.go:11
Function
TestUnitStart
(t *testing.T)
unit_test.go:120
Function
TestUnitStop
(t *testing.T)
unit_test.go:102
Function
TestUnitTotal
(t *testing.T)
unit_test.go:19
Function
TestUsage
(t *testing.T)
core_test.go:15
next →
1–100 of 107, ranked by callers