Documentation ¶
Index ¶
- Constants
- Variables
- func AccountModel() []database.Model
- func AccountOperationModel() []database.Model
- func AccountPage(db database.Context, accountID model.AccountID, countByPage int) ([]model.Account, error)
- func AccountPagingCount(db database.Context, countByPage int) (int, error)
- func AccountStateModel() []database.Model
- func AccountsExists(db database.Context, userID model.UserID, currency model.CurrencyName, ...) bool
- func AddAsset(db database.Context, assetHash model.AssetHash, ...) (model.Asset, error)
- func AddBatch(db database.Context, network model.BatchNetwork, data model.BatchData, ...) (model.Batch, error)
- func AddBatchInfo(db database.Context, batchID model.BatchID, status model.BatchStatus, ...) (model.BatchInfo, error)
- func AddFee(db database.Context, withdrawID model.WithdrawID, amount model.Float, ...) (model.Fee, error)
- func AddOperationInfo(db database.Context, operation model.OperationInfo) (model.OperationInfo, error)
- func AddOrUpdateAccountState(db database.Context, accountSate model.AccountState) (model.AccountState, error)
- func AddOrUpdateAssetIcon(db database.Context, entry model.AssetIcon) (model.AssetIcon, error)
- func AddOrUpdateAssetInfo(db database.Context, entry model.AssetInfo) (model.AssetInfo, error)
- func AddOrUpdateCryptoAddress(db database.Context, address model.CryptoAddress) (model.CryptoAddress, error)
- func AddOrUpdateCurrency(db database.Context, currency model.Currency) (model.Currency, error)
- func AddOrUpdateFeeInfo(db database.Context, feeInfo model.FeeInfo) (model.FeeInfo, error)
- func AddOrUpdateOperationStatus(db database.Context, operation model.OperationStatus) (model.OperationStatus, error)
- func AddSsmAddress(db database.Context, address model.SsmAddress, info model.SsmAddressInfo) (model.SsmAddressID, error)
- func AddSwap(db database.Context, swapType model.SwapType, ...) (model.Swap, error)
- func AddSwapInfo(db database.Context, swapID model.SwapID, status model.SwapStatus, ...) (model.SwapInfo, error)
- func AddWithdraw(db database.Context, from, to model.AccountID, amount model.Float, ...) (model.Withdraw, error)
- func AddWithdrawInfo(db database.Context, withdrawID model.WithdrawID, status model.WithdrawStatus, ...) (model.WithdrawInfo, error)
- func AddWithdrawTarget(db database.Context, withdrawID model.WithdrawID, ...) (model.WithdrawTarget, error)
- func AddWithdrawToBatch(db database.Context, batchID model.BatchID, withdraws ...model.WithdrawID) error
- func AllAccountCryptoAddresses(db database.Context, accountID model.AccountID) ([]model.CryptoAddress, error)
- func AllMempoolCryptoAddresses(db database.Context, chain model.String) ([]model.CryptoAddress, error)
- func AllUnconfirmedCryptoAddresses(db database.Context, chain model.String, afterBlock model.BlockID) ([]model.CryptoAddress, error)
- func AllUnusedAccountCryptoAddresses(db database.Context, accountID model.AccountID) ([]model.CryptoAddress, error)
- func AllUnusedCryptoAddresses(db database.Context, chain model.String) ([]model.CryptoAddress, error)
- func AppendAccountOperation(db database.Context, operation model.AccountOperation) (model.AccountOperation, error)
- func AppendAccountOperationSlice(db database.Context, operations ...model.AccountOperation) ([]model.AccountOperation, error)
- func AppendCurencyRates(db database.Context, currencyRates []model.CurrencyRate) error
- func AssetCount(db database.Context) (int64, error)
- func AssetHashExists(db database.Context, assetHash model.AssetHash) bool
- func AssetModel() []database.Model
- func BatchPage(db database.Context, batchID model.BatchID, countByPage int) ([]model.BatchID, error)
- func BatchPagingCount(db database.Context, countByPage int) (int, error)
- func CheckCredential(ctx context.Context, db database.Context, login, password model.Base58) (model.UserID, bool, error)
- func CountCurrencies(db database.Context) int
- func CountSsmAddress(db database.Context, chain model.SsmChain, fingerprint model.SsmFingerprint) (int, error)
- func CountSsmAddressByState(db database.Context, chain model.SsmChain, fingerprint model.SsmFingerprint, ...) (int, error)
- func CreateAccount(db database.Context, account model.Account) (model.Account, error)
- func CreateOrUpdateOAuthData(db database.Context, oauthData model.OAuthData) (model.OAuthData, error)
- func CreateOrUpdatedCredential(ctx context.Context, db database.Context, credential model.Credential) (model.Credential, error)
- func CryptoAddressModel() []database.Model
- func CurrencyExists(db database.Context, name model.CurrencyName) bool
- func CurrencyModel() []database.Model
- func DepositPage(db database.Context, operationInfoID model.OperationInfoID, countByPage int) ([]model.OperationInfoID, error)
- func DepositPagingCount(db database.Context, countByPage int) (int, error)
- func FeeInfoExists(db database.Context, currency model.CurrencyName) bool
- func FeeModel() []database.Model
- func FetchBatchByLastStatus(db database.Context, status model.BatchStatus) ([]model.Batch, error)
- func FetchBatchReady(db database.Context) ([]model.Batch, error)
- func FindAccountOperationByReference(db database.Context, synchroneousType model.SynchroneousType, ...) (model.AccountOperation, error)
- func FindActiveOperationInfo(db database.Context) ([]model.OperationInfo, error)
- func FindActiveOperationStatus(db database.Context) ([]model.OperationStatus, error)
- func FindCryptoAddressesByOperationInfoState(db database.Context, chain model.String, states ...model.String) ([]model.CryptoAddress, error)
- func FindCryptoAddressesNotInOperationInfo(db database.Context, chain model.String) ([]model.CryptoAddress, error)
- func FindOrCreateOAuth(db database.Context, oauth model.OAuth) (model.OAuth, error)
- func FindOrCreateUser(db database.Context, user model.User) (model.User, error)
- func FindUserByEmail(db database.Context, email model.UserEmail) (model.User, error)
- func FindUserById(db database.Context, userID model.UserID) (model.User, error)
- func FindWithdrawByCurrencyNameAndStatus(db database.Context, currency model.CurrencyName, status model.WithdrawStatus) ([]model.Withdraw, error)
- func FindWithdrawByUser(db database.Context, userID model.UserID) ([]model.Withdraw, error)
- func GeAccountHistory(db database.Context, accountID model.AccountID) ([]model.AccountOperation, error)
- func GeAccountHistoryRange(db database.Context, accountID model.AccountID, from, to time.Time) ([]model.AccountOperation, error)
- func GetAccountByID(db database.Context, accountID model.AccountID) (model.Account, error)
- func GetAccountStatusByAccountID(db database.Context, accountID model.AccountID) (model.AccountState, error)
- func GetAccountsByUserAndCurrencyAndName(db database.Context, userID model.UserID, currency model.CurrencyName, ...) ([]model.Account, error)
- func GetAsset(db database.Context, assetID model.AssetID) (model.Asset, error)
- func GetAssetByCurrencyName(db database.Context, currencyName model.CurrencyName) (model.Asset, error)
- func GetAssetByHash(db database.Context, assetHash model.AssetHash) (model.Asset, error)
- func GetAssetIcon(db database.Context, assetID model.AssetID) (model.AssetIcon, error)
- func GetAssetInfo(db database.Context, assetID model.AssetID) (model.AssetInfo, error)
- func GetBatch(db database.Context, ID model.BatchID) (model.Batch, error)
- func GetBatchHistory(db database.Context, batchID model.BatchID) ([]model.BatchInfo, error)
- func GetBatchInfo(db database.Context, ID model.BatchInfoID) (model.BatchInfo, error)
- func GetBatchInfoByStatusAndType(db database.Context, status model.BatchStatus, dataType encoding.DataType) ([]model.BatchInfo, error)
- func GetBatchWithdraws(db database.Context, batchID model.BatchID) ([]model.WithdrawID, error)
- func GetCryptoAddress(db database.Context, ID model.CryptoAddressID) (model.CryptoAddress, error)
- func GetCryptoAddressWithPublicAddress(db database.Context, publicAddress model.String) (model.CryptoAddress, error)
- func GetCryptoAddressWithUnconfidential(db database.Context, unconfidential model.String) (model.CryptoAddress, error)
- func GetCurrencyByName(db database.Context, name model.CurrencyName) (model.Currency, error)
- func GetFee(db database.Context, ID model.FeeID) (model.Fee, error)
- func GetFeeByWithdrawID(db database.Context, withdrawID model.WithdrawID) (model.Fee, error)
- func GetFeeInfo(db database.Context, currency model.CurrencyName) (model.FeeInfo, error)
- func GetLastAccountOperation(db database.Context, accountID model.AccountID) (model.AccountOperation, error)
- func GetLastBatchInfo(db database.Context, batchID model.BatchID) (model.BatchInfo, error)
- func GetLastBatchInfoByStatusAndNetwork(db database.Context, status model.BatchStatus, network model.BatchNetwork) ([]model.BatchInfo, error)
- func GetLastCurencyRates(db database.Context) ([]model.CurrencyRate, error)
- func GetLastWithdrawInfo(db database.Context, withdrawID model.WithdrawID) (model.WithdrawInfo, error)
- func GetLastWithdrawTargetByStatus(db database.Context, status model.WithdrawStatus) ([]model.WithdrawTarget, error)
- func GetNextAccountOperation(db database.Context, accountID model.AccountID, ...) (model.AccountOperation, error)
- func GetOperationInfo(db database.Context, operationID model.OperationInfoID) (model.OperationInfo, error)
- func GetOperationInfoByCryptoAddress(db database.Context, cryptoAddressID model.CryptoAddressID) ([]model.OperationInfo, error)
- func GetOperationInfoByTxId(db database.Context, txID model.TxID) (model.OperationInfo, error)
- func GetOperationStatus(db database.Context, operationInfoID model.OperationInfoID) (model.OperationStatus, error)
- func GetPreviousAccountOperation(db database.Context, accountID model.AccountID, ...) (model.AccountOperation, error)
- func GetSsmAddress(db database.Context, addressID model.SsmAddressID) (model.SsmAddress, error)
- func GetSsmAddressByPublicAddress(db database.Context, publicAddress model.SsmPublicAddress) (model.SsmAddress, error)
- func GetSsmAddressInfo(db database.Context, addressID model.SsmAddressID) (model.SsmAddressInfo, error)
- func GetSsmAddressState(db database.Context, addressID model.SsmAddressID) (model.SsmAddressState, error)
- func GetSwap(db database.Context, swapID model.SwapID) (model.Swap, error)
- func GetSwapByCryptoAddressID(db database.Context, cryptoAddressID model.CryptoAddressID) (model.Swap, error)
- func GetSwapInfo(db database.Context, swapInfoID model.SwapInfoID) (model.SwapInfo, error)
- func GetSwapInfoBySwapID(db database.Context, swapID model.SwapID) (model.SwapInfo, error)
- func GetUserAccounts(db database.Context, userID model.UserID) ([]model.AccountID, error)
- func GetWithdraw(db database.Context, ID model.WithdrawID) (model.Withdraw, error)
- func GetWithdrawHistory(db database.Context, withdrawID model.WithdrawID) ([]model.WithdrawInfo, error)
- func GetWithdrawInfo(db database.Context, ID model.WithdrawInfoID) (model.WithdrawInfo, error)
- func GetWithdrawTarget(db database.Context, ID model.WithdrawTargetID) (model.WithdrawTarget, error)
- func GetWithdrawTargetByWithdrawID(db database.Context, withdrawID model.WithdrawID) (model.WithdrawTarget, error)
- func HashEntry(entry model.Base58) model.Base58
- func LastAccountCryptoAddress(db database.Context, accountID model.AccountID) (model.CryptoAddress, error)
- func ListAllCurrency(db database.Context) ([]model.Currency, error)
- func ListAvailableCurrency(db database.Context) ([]model.Currency, error)
- func ListBatchNetworksByStatus(db database.Context, status model.BatchStatus) ([]model.BatchNetwork, error)
- func ListCancelingWithdrawsAccountOperations(db database.Context) ([]model.AccountOperation, error)
- func NextSsmAddressID(db database.Context, chain model.SsmChain, fingerprint model.SsmFingerprint) (model.SsmAddressID, error)
- func OperationInfoModel() []database.Model
- func QueryAccountList(db database.Context, userID model.UserID, currency model.CurrencyName, ...) ([]model.Account, error)
- func QueryCurrencyList(db database.Context, name model.CurrencyName, available int) ([]model.Currency, error)
- func ScopeAccountCurrencyName(name model.CurrencyName) func(db *gorm.DB) *gorm.DB
- func ScopeAccountID(accountID model.AccountID) func(db *gorm.DB) *gorm.DB
- func ScopeAccountName(name model.AccountName) func(db *gorm.DB) *gorm.DB
- func ScopeCurencyAvailable(available int) func(db *gorm.DB) *gorm.DB
- func ScopeCurencyName(name model.CurrencyName) func(db *gorm.DB) *gorm.DB
- func ScopeFirstBefore(blockID model.BlockID) func(db *gorm.DB) *gorm.DB
- func ScopeFirstBlockIDAfter(blockID model.BlockID) func(db *gorm.DB) *gorm.DB
- func ScopeFirstBlockIDExact(blockID model.BlockID) func(db *gorm.DB) *gorm.DB
- func ScopeUserID(userID model.UserID) func(db *gorm.DB) *gorm.DB
- func SsmAddressModel() []database.Model
- func SwapModel() []database.Model
- func SwapPage(db database.Context, swapID model.SwapID, countByPage int) ([]model.SwapID, error)
- func SwapPagingCount(db database.Context, countByPage int) (int, error)
- func TxAppendAccountOperation(db database.Context, operation model.AccountOperation) (model.AccountOperation, error)
- func TxAppendAccountOperationSlice(db database.Context, operations ...model.AccountOperation) ([]model.AccountOperation, error)
- func UpdateSsmAddressState(db database.Context, addressID model.SsmAddressID, ...) (model.SsmAddressState, error)
- func UserCount(db database.Context) (int, error)
- func UserExists(db database.Context, userID model.UserID) bool
- func UserHasRole(db database.Context, userID model.UserID, role model.RoleName) (bool, error)
- func UserModel() []database.Model
- func UserPage(db database.Context, userID model.UserID, countByPage int) ([]model.User, error)
- func UserPagingCount(db database.Context, countByPage int) (int, error)
- func UserRoles(db database.Context, userID model.UserID) ([]model.RoleName, error)
- func WithdrawModel() []database.Model
- func WithdrawPage(db database.Context, withdrawID model.WithdrawID, countByPage int) ([]model.WithdrawID, error)
- func WithdrawPagingCount(db database.Context, countByPage int) (int, error)
- type AccountInfo
- type AccountInfos
- type AccountOperationPrevNext
- type AccountSummary
- type BatchInfos
- type DepositInfos
- type SwapInfos
- type WithdrawInfos
Constants ¶
View Source
const ( AccountNameDefault = "default" AccountNameWildcard = "*" )
View Source
const ( DefaultBatchExecutionDelay time.Duration = time.Hour DefaultBatchCapacity model.Int = 16 )
View Source
const ( FlagCurencyAll = 0 FlagCurencyDisable = 0 FlagCurencyAvailable = 1 )
View Source
const (
AllChains = "*"
)
View Source
const (
DefaultSwapValidity time.Duration = 24 * time.Hour
)
View Source
const (
HistoryMaxOperationCount = 1000
)
View Source
const (
MaxAssetIconDataLen = (256 << 10) - 1
)
Variables ¶
View Source
var ( ErrAccountExists = errors.New("Account Exists") ErrAccountNotFound = errors.New("Account Not Found") )
View Source
var ( ErrAccountStateNotFound = errors.New("Account State Not Found") ErrInvalidAccountID = errors.New("Invalid AccountID") ErrInvalidReferenceID = errors.New("Invalid ReferenceID") ErrInvalidAccountState = errors.New("Invalid Account State") ErrAccountIsDisabled = errors.New("Account Is Disabled") )
View Source
var ( ErrInvalidAssetID = errors.New("Invalid AssetID") ErrInvalidAssetHash = errors.New("Invalid AssetHash") )
View Source
var ( ErrInvalidAssetIcon = errors.New("Invalid AssetIcon") ErrAssetIconToLarge = errors.New("AssetIcon Too Large") )
View Source
var ( ErrInvalidBatchID = errors.New("Invalid BatchID") ErrInvalidBatchWithdraws = errors.New("Invalid Withdraws") ErrInvalidNetwork = errors.New("Invalid Network") )
View Source
var ( ErrInvalidBatchInfoID = errors.New("Invalid BatchInfoID") ErrInvalidBatchStatus = errors.New("Invalid BatchInfo Status") ErrInvalidBatchInfoDataType = errors.New("Invalid BatchInfo DataType") )
View Source
var ( ErrUserNotFound = errors.New("User not found") ErrInvalidPasswordHash = errors.New("Invalid PasswordHash") ErrDatabaseError = errors.New("Database Operation failed") )
View Source
var ( ErrInvalidChain = errors.New("Invalid Chain") ErrInvalidPublicAddress = errors.New("Invalid Public Address") ErrInvalidCryptoAddressID = errors.New("Invalid CryptoAddress ID") )
View Source
var ( ErrInvalidCurrencyName = errors.New("Invalid Currency Name") ErrCurrencyNotFound = errors.New("Currency Not found") ErrCurrencyNotAvailable = errors.New("Currency Not Available") ErrCurrencyNotCrypto = errors.New("Currency Not Crypto") )
View Source
var ( ErrInvalidFeeID = errors.New("Invalid FeeID") ErrInvalidFeeAmount = errors.New("Invalid Fee Amount") )
View Source
var ( ErrInvalidProvider = errors.New("Invalid Provider") ErrInvalidProviderID = errors.New("Invalid ProviderID") ErrInvalidOAuthID = errors.New("Invalid OAuthID") ErrInvalidOAuthData = errors.New("Invalid OAuth Data") )
View Source
var ( ErrInvalidOperationInfoID = errors.New("Invalid OperationInfo") ErrOperationInfoUpdateNotPermitted = errors.New("OperationInfo Update Not Permitted") ErrInvalidTransactionID = errors.New("Invalid Transaction ID") ErrInvalidOperationAmount = errors.New("Invalid Operation Amount") )
View Source
var ( ErrInvalidSsmAddressID = errors.New("Invalid SsmAddressID") ErrInvalidSsmPublicAddress = errors.New("Invalid PublicAddress ID") )
View Source
var ( ErrInvalidSwapID = errors.New("Invalid SwapID") ErrInvalidSwapType = errors.New("Invalid Swap Type") ErrInvalidSwapAmount = errors.New("Invalid Amount") )
View Source
var ( ErrInvalidSwapInfoID = errors.New("Invalid SwapInfoID") ErrInvalidSwapPayload = errors.New("Invalid Swap Payload") )
View Source
var ( ErrInvalidUserID = errors.New("Invalid UserID") ErrInvalidUserName = errors.New("Invalid User Name") ErrInvalidUserEmail = errors.New("Invalid User Email") )
View Source
var ( ErrInvalidWithdrawID = errors.New("Invalid WithdrawID") ErrInvalidWithdrawAmount = errors.New("Invalid Amount") ErrInvalidWithdrawAccount = errors.New("Invalid Withdraw Account") ErrInvalidWithdrawAccountCurrency = errors.New("Invalid Withdraw Account Currency") ErrInvalidBatchMode = errors.New("Invalid BatchMode") )
View Source
var ( ErrInvalidWithdrawInfoID = errors.New("Invalid WithdrawInfoID") ErrInvalidWithdrawStatus = errors.New("Invalid WithdrawInfo Status") ErrInvalidWithdrawInfoData = errors.New("Invalid WithdrawInfo Data") )
View Source
var ( ErrInvalidWithdrawTargetID = errors.New("Invalid WithdrawTargetID") ErrInvalidWithdrawTargetData = errors.New("Invalid WithdrawTarget Data") )
View Source
var (
ErrFeeInfoInvalid = errors.New("Invalid FeeInfo")
)
View Source
var (
ErrInvalidAccountOperation = errors.New("Invalid Account Operation")
)
View Source
var (
ErrInvalidAssetInfo = errors.New("Invalid AssetInfo")
)
View Source
var (
ErrInvalidBatchWithdrawID = errors.New("Invalid BatchWithdrawID")
)
View Source
var (
ErrInvalidOperationStatus = errors.New("Invalid OperationStatus")
)
View Source
var (
ErrInvalidRoleName = errors.New("Invalid RoleName")
)
Functions ¶
func AccountModel ¶
func AccountOperationModel ¶
func AccountPage ¶
func AccountPagingCount ¶
func AccountStateModel ¶
func AccountsExists ¶
func AccountsExists(db database.Context, userID model.UserID, currency model.CurrencyName, name model.AccountName) bool
AccountsExists
func AddBatchInfo ¶
func AddOperationInfo ¶
func AddOperationInfo(db database.Context, operation model.OperationInfo) (model.OperationInfo, error)
AddOperationInfo
func AddOrUpdateAccountState ¶
func AddOrUpdateAccountState(db database.Context, accountSate model.AccountState) (model.AccountState, error)
AddOrUpdateAccountState
func AddOrUpdateAssetIcon ¶
AddOrUpdateAssetIcon
func AddOrUpdateAssetInfo ¶
AddOrUpdateAssetInfo
func AddOrUpdateCryptoAddress ¶
func AddOrUpdateCryptoAddress(db database.Context, address model.CryptoAddress) (model.CryptoAddress, error)
AddOrUpdateCryptoAddress
func AddOrUpdateCurrency ¶
AddOrUpdateCurrency
func AddOrUpdateFeeInfo ¶
AddOrUpdateFeeInfo
func AddOrUpdateOperationStatus ¶
func AddOrUpdateOperationStatus(db database.Context, operation model.OperationStatus) (model.OperationStatus, error)
AddOrUpdateOperationStatus
func AddSsmAddress ¶
func AddSsmAddress(db database.Context, address model.SsmAddress, info model.SsmAddressInfo) (model.SsmAddressID, error)
func AddSwapInfo ¶
func AddWithdraw ¶
func AddWithdrawInfo ¶
func AddWithdrawInfo(db database.Context, withdrawID model.WithdrawID, status model.WithdrawStatus, data model.WithdrawInfoData) (model.WithdrawInfo, error)
func AddWithdrawTarget ¶
func AddWithdrawTarget(db database.Context, withdrawID model.WithdrawID, dataType model.WithdrawTargetType, data model.WithdrawTargetData) (model.WithdrawTarget, error)
func AddWithdrawToBatch ¶
func AppendAccountOperation ¶
func AppendAccountOperation(db database.Context, operation model.AccountOperation) (model.AccountOperation, error)
func AppendAccountOperationSlice ¶
func AppendAccountOperationSlice(db database.Context, operations ...model.AccountOperation) ([]model.AccountOperation, error)
func AppendCurencyRates ¶
func AppendCurencyRates(db database.Context, currencyRates []model.CurrencyRate) error
func AssetModel ¶
func CheckCredential ¶
func CountSsmAddress ¶
func CountSsmAddressByState ¶
func CountSsmAddressByState(db database.Context, chain model.SsmChain, fingerprint model.SsmFingerprint, state model.SsmAddressStatus) (int, error)
func CreateAccount ¶
func CreateOrUpdateOAuthData ¶
func CreateOrUpdateOAuthData(db database.Context, oauthData model.OAuthData) (model.OAuthData, error)
CreateOrUpdateOAuthData
func CreateOrUpdatedCredential ¶
func CreateOrUpdatedCredential(ctx context.Context, db database.Context, credential model.Credential) (model.Credential, error)
func CryptoAddressModel ¶
func CurrencyExists ¶
func CurrencyExists(db database.Context, name model.CurrencyName) bool
CurrencyExists
func CurrencyModel ¶
func DepositPage ¶
func DepositPage(db database.Context, operationInfoID model.OperationInfoID, countByPage int) ([]model.OperationInfoID, error)
func DepositPagingCount ¶
func FeeInfoExists ¶
func FeeInfoExists(db database.Context, currency model.CurrencyName) bool
FeeInfoExists
func FetchBatchByLastStatus ¶
func FindAccountOperationByReference ¶
func FindAccountOperationByReference(db database.Context, synchroneousType model.SynchroneousType, operationType model.OperationType, referenceID model.RefID) (model.AccountOperation, error)
func FindActiveOperationInfo ¶
func FindActiveOperationInfo(db database.Context) ([]model.OperationInfo, error)
func FindActiveOperationStatus ¶
func FindActiveOperationStatus(db database.Context) ([]model.OperationStatus, error)
func FindOrCreateOAuth ¶
FindOrCreateOAuth
func FindOrCreateUser ¶
func FindUserByEmail ¶
func FindWithdrawByCurrencyNameAndStatus ¶
func FindWithdrawByCurrencyNameAndStatus(db database.Context, currency model.CurrencyName, status model.WithdrawStatus) ([]model.Withdraw, error)
func FindWithdrawByUser ¶
func GeAccountHistory ¶
func GeAccountHistoryRange ¶
func GetAccountByID ¶
func GetAccountsByUserAndCurrencyAndName ¶
func GetAccountsByUserAndCurrencyAndName(db database.Context, userID model.UserID, currency model.CurrencyName, name model.AccountName) ([]model.Account, error)
GetAccountsByNameAndCurrency
func GetAssetByCurrencyName ¶
func GetAssetByHash ¶
func GetAssetIcon ¶
GetAssetIcon
func GetAssetInfo ¶
GetAssetInfo
func GetBatchHistory ¶
func GetBatchInfo ¶
func GetBatchWithdraws ¶
func GetCryptoAddress ¶
func GetCryptoAddress(db database.Context, ID model.CryptoAddressID) (model.CryptoAddress, error)
func GetCurrencyByName ¶
GetCurrencyByName
func GetFeeByWithdrawID ¶
func GetFeeInfo ¶
GetFeeInfo
func GetLastAccountOperation ¶
func GetLastBatchInfo ¶
func GetLastBatchInfoByStatusAndNetwork ¶
func GetLastBatchInfoByStatusAndNetwork(db database.Context, status model.BatchStatus, network model.BatchNetwork) ([]model.BatchInfo, error)
func GetLastCurencyRates ¶
func GetLastCurencyRates(db database.Context) ([]model.CurrencyRate, error)
func GetLastWithdrawInfo ¶
func GetLastWithdrawInfo(db database.Context, withdrawID model.WithdrawID) (model.WithdrawInfo, error)
func GetLastWithdrawTargetByStatus ¶
func GetLastWithdrawTargetByStatus(db database.Context, status model.WithdrawStatus) ([]model.WithdrawTarget, error)
func GetNextAccountOperation ¶
func GetNextAccountOperation(db database.Context, accountID model.AccountID, operationID model.AccountOperationID) (model.AccountOperation, error)
func GetOperationInfo ¶
func GetOperationInfo(db database.Context, operationID model.OperationInfoID) (model.OperationInfo, error)
GetOperationInfo
func GetOperationInfoByCryptoAddress ¶
func GetOperationInfoByCryptoAddress(db database.Context, cryptoAddressID model.CryptoAddressID) ([]model.OperationInfo, error)
GetOperationInfoByCryptoAddress
func GetOperationInfoByTxId ¶
GetOperationInfoByTxId
func GetOperationStatus ¶
func GetOperationStatus(db database.Context, operationInfoID model.OperationInfoID) (model.OperationStatus, error)
GetOperationStatus
func GetPreviousAccountOperation ¶
func GetPreviousAccountOperation(db database.Context, accountID model.AccountID, operationID model.AccountOperationID) (model.AccountOperation, error)
func GetSsmAddress ¶
func GetSsmAddress(db database.Context, addressID model.SsmAddressID) (model.SsmAddress, error)
func GetSsmAddressByPublicAddress ¶
func GetSsmAddressByPublicAddress(db database.Context, publicAddress model.SsmPublicAddress) (model.SsmAddress, error)
func GetSsmAddressInfo ¶
func GetSsmAddressInfo(db database.Context, addressID model.SsmAddressID) (model.SsmAddressInfo, error)
func GetSsmAddressState ¶
func GetSsmAddressState(db database.Context, addressID model.SsmAddressID) (model.SsmAddressState, error)
func GetSwapInfo ¶
func GetSwapInfoBySwapID ¶
func GetUserAccounts ¶
func GetWithdraw ¶
func GetWithdrawHistory ¶
func GetWithdrawHistory(db database.Context, withdrawID model.WithdrawID) ([]model.WithdrawInfo, error)
func GetWithdrawInfo ¶
func GetWithdrawInfo(db database.Context, ID model.WithdrawInfoID) (model.WithdrawInfo, error)
func GetWithdrawTarget ¶
func GetWithdrawTarget(db database.Context, ID model.WithdrawTargetID) (model.WithdrawTarget, error)
func GetWithdrawTargetByWithdrawID ¶
func GetWithdrawTargetByWithdrawID(db database.Context, withdrawID model.WithdrawID) (model.WithdrawTarget, error)
func ListAllCurrency ¶
ListAllCurrency
func ListAvailableCurrency ¶
ListAvailableCurrency
func ListBatchNetworksByStatus ¶
func ListBatchNetworksByStatus(db database.Context, status model.BatchStatus) ([]model.BatchNetwork, error)
func ListCancelingWithdrawsAccountOperations ¶
func ListCancelingWithdrawsAccountOperations(db database.Context) ([]model.AccountOperation, error)
func NextSsmAddressID ¶
func NextSsmAddressID(db database.Context, chain model.SsmChain, fingerprint model.SsmFingerprint) (model.SsmAddressID, error)
func OperationInfoModel ¶
func QueryAccountList ¶
func QueryAccountList(db database.Context, userID model.UserID, currency model.CurrencyName, name model.AccountName) ([]model.Account, error)
QueryAccountList
func QueryCurrencyList ¶
func QueryCurrencyList(db database.Context, name model.CurrencyName, available int) ([]model.Currency, error)
QueryCurrencyList
func ScopeAccountCurrencyName ¶
ScopeCurencyName
func ScopeAccountID ¶
ScopeAccountID
func ScopeAccountName ¶
ScopeAccountName
func ScopeCurencyAvailable ¶
ScopeCurencyAvailable
func ScopeCurencyName ¶
ScopeCurencyName
func ScopeFirstBefore ¶
ScopeFirstBefore
func ScopeFirstBlockIDAfter ¶
ScopeFirstBlockIDAfter
func ScopeFirstBlockIDExact ¶
ScopeFirstBlockIDExact
func SsmAddressModel ¶
func TxAppendAccountOperation ¶
func TxAppendAccountOperation(db database.Context, operation model.AccountOperation) (model.AccountOperation, error)
func TxAppendAccountOperationSlice ¶
func TxAppendAccountOperationSlice(db database.Context, operations ...model.AccountOperation) ([]model.AccountOperation, error)
func UpdateSsmAddressState ¶
func UpdateSsmAddressState(db database.Context, addressID model.SsmAddressID, status model.SsmAddressStatus) (model.SsmAddressState, error)
func UserHasRole ¶
func WithdrawModel ¶
func WithdrawPage ¶
func WithdrawPage(db database.Context, withdrawID model.WithdrawID, countByPage int) ([]model.WithdrawID, error)
Types ¶
type AccountInfo ¶
type AccountInfo struct { Account model.Account Currency model.Currency State model.AccountState Last model.AccountOperation }
type AccountInfos ¶
type AccountInfos struct { Count int Active int Accounts []AccountSummary }
func AccountsInfos ¶
func AccountsInfos(db database.Context) (AccountInfos, error)
func AccountsInfosByUser ¶
type AccountOperationPrevNext ¶
type AccountOperationPrevNext struct { model.AccountOperation Previous model.AccountOperationID Next model.AccountOperationID }
type AccountSummary ¶
type BatchInfos ¶
func BatchsInfos ¶
func BatchsInfos(db database.Context) (BatchInfos, error)
type DepositInfos ¶
func DepositsInfos ¶
func DepositsInfos(db database.Context) (DepositInfos, error)
type WithdrawInfos ¶
func WithdrawsInfos ¶
func WithdrawsInfos(db database.Context) (WithdrawInfos, error)
Source Files ¶
- account.go
- accountoperation.go
- accountstate.go
- asset.go
- asseticon.go
- assetinfo.go
- batch.go
- batchinfo.go
- batchwithdraw.go
- credential.go
- cryptoaddress.go
- currency.go
- currencyrate.go
- fee.go
- feeinfo.go
- migrate.go
- oauth.go
- operationinfo.go
- operationstatus.go
- request.go
- ssmaddress.go
- swap.go
- swapinfo.go
- user.go
- userrole.go
- withdraw.go
- withdrawinfo.go
- withdrawtarget.go
Click to show internal directories.
Click to hide internal directories.