Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeLink(errStr string) string
- func ErrorCode(c *gin.Context) string
- func ProvideVersion(provider interface{}) fx.Option
- func ResponseError(c *gin.Context, err error)
- type AccountController
- type BaseController
- type Config
- type ConfigController
- type ConfigInfo
- type HealthController
- type LedgerController
- type LedgerStorage
- type MappingController
- type ScriptController
- type ScriptResponse
- type TransactionController
- func (ctl *TransactionController) CountTransactions(c *gin.Context)
- func (ctl *TransactionController) GetTransaction(c *gin.Context)
- func (ctl *TransactionController) GetTransactions(c *gin.Context)
- func (ctl *TransactionController) PostTransaction(c *gin.Context)
- func (ctl *TransactionController) PostTransactionMetadata(c *gin.Context)
- func (ctl *TransactionController) PostTransactionsBatch(c *gin.Context)
- func (ctl *TransactionController) RevertTransaction(c *gin.Context)
Constants ¶
View Source
const ( ErrInternal = "INTERNAL" ErrConflict = "CONFLICT" ErrInsufficientFund = "INSUFFICIENT_FUND" ErrValidation = "VALIDATION" ErrContextCancelled = "CONTEXT_CANCELLED" ErrStore = "STORE" )
Variables ¶
View Source
var Module = fx.Options( fx.Provide( fx.Annotate(NewConfigController, fx.ParamTags(versionKey)), ), fx.Provide(NewLedgerController), fx.Provide(NewScriptController), fx.Provide(NewAccountController), fx.Provide(NewTransactionController), fx.Provide(NewMappingController), fx.Provide( fx.Annotate(NewHealthController, fx.ParamTags(health.HealthCheckKey)), ), )
Functions ¶
func EncodeLink ¶
func ProvideVersion ¶
func ResponseError ¶ added in v1.0.4
Types ¶
type AccountController ¶
type AccountController struct {
BaseController
}
func NewAccountController ¶
func NewAccountController() AccountController
func (*AccountController) CountAccounts ¶ added in v1.3.2
func (ctl *AccountController) CountAccounts(c *gin.Context)
func (*AccountController) GetAccount ¶
func (ctl *AccountController) GetAccount(c *gin.Context)
func (*AccountController) GetAccounts ¶
func (ctl *AccountController) GetAccounts(c *gin.Context)
func (*AccountController) PostAccountMetadata ¶
func (ctl *AccountController) PostAccountMetadata(c *gin.Context)
type BaseController ¶
type BaseController struct{}
type Config ¶ added in v1.3.2
type Config struct {
LedgerStorage *LedgerStorage `json:"storage"`
}
type ConfigController ¶
type ConfigController struct { BaseController Version string StorageDriver storage.Driver }
func NewConfigController ¶
func NewConfigController(version string, storageDriver storage.Driver) ConfigController
func (*ConfigController) GetDocsAsJSON ¶
func (ctl *ConfigController) GetDocsAsJSON(c *gin.Context)
func (*ConfigController) GetDocsAsYaml ¶
func (ctl *ConfigController) GetDocsAsYaml(c *gin.Context)
func (*ConfigController) GetInfo ¶
func (ctl *ConfigController) GetInfo(c *gin.Context)
type ConfigInfo ¶ added in v1.3.2
type HealthController ¶ added in v1.3.0
type HealthController struct {
Checks []health.NamedCheck
}
func NewHealthController ¶ added in v1.3.0
func NewHealthController(checks []health.NamedCheck) HealthController
func (*HealthController) Check ¶ added in v1.3.0
func (ctrl *HealthController) Check(c *gin.Context)
type LedgerController ¶
type LedgerController struct {
BaseController
}
func NewLedgerController ¶
func NewLedgerController() LedgerController
func (*LedgerController) GetStats ¶
func (ctl *LedgerController) GetStats(c *gin.Context)
type LedgerStorage ¶ added in v1.3.2
type MappingController ¶
type MappingController struct {
BaseController
}
func NewMappingController ¶
func NewMappingController() MappingController
func (*MappingController) GetMapping ¶
func (ctl *MappingController) GetMapping(c *gin.Context)
func (*MappingController) PutMapping ¶
func (ctl *MappingController) PutMapping(c *gin.Context)
type ScriptController ¶
type ScriptController struct {
BaseController
}
func NewScriptController ¶
func NewScriptController() ScriptController
func (*ScriptController) PostScript ¶
func (ctl *ScriptController) PostScript(c *gin.Context)
type ScriptResponse ¶
type ScriptResponse struct { sharedapi.ErrorResponse Link string `json:"details,omitempty"` Transaction *core.Transaction `json:"transaction,omitempty"` }
type TransactionController ¶
type TransactionController struct {
BaseController
}
func NewTransactionController ¶
func NewTransactionController() TransactionController
func (*TransactionController) CountTransactions ¶ added in v1.3.2
func (ctl *TransactionController) CountTransactions(c *gin.Context)
func (*TransactionController) GetTransaction ¶
func (ctl *TransactionController) GetTransaction(c *gin.Context)
func (*TransactionController) GetTransactions ¶
func (ctl *TransactionController) GetTransactions(c *gin.Context)
func (*TransactionController) PostTransaction ¶
func (ctl *TransactionController) PostTransaction(c *gin.Context)
func (*TransactionController) PostTransactionMetadata ¶
func (ctl *TransactionController) PostTransactionMetadata(c *gin.Context)
func (*TransactionController) PostTransactionsBatch ¶
func (ctl *TransactionController) PostTransactionsBatch(c *gin.Context)
func (*TransactionController) RevertTransaction ¶
func (ctl *TransactionController) RevertTransaction(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.