Documentation
¶
Index ¶
- func GetAuditDBContextFromCmd(cmd *cobra.Command) (*gorm.DB, error)
- func GetDBContextFromCmd(cmd *cobra.Command) (*gorm.DB, error)
- func GrpcOpts(listenAddress string, httpConfig *config.HTTPConfig, db *gorm.DB) googleGrpc.ServerOption
- func HTTPConfigsPreRunHandler(cmd *cobra.Command, home string) error
- func InterceptConfigsPreRunHandler(cmd *cobra.Command, home string) error
- func NewAuditDB(cfg *config.AuditConfig) (*gorm.DB, error)
- func NewDB(cfg *config.Config) (*gorm.DB, error)
- func Run(ctx context.Context, serverCtx *Context, db *gorm.DB) (err error)
- func SetCmdServerContext(cmd *cobra.Command, serverCtx *Context) error
- func Start(ctx *Context, cmd *cobra.Command) (err error)
- func StartTransfer(ctx *Context, cmd *cobra.Command) (err error)
- func TransferConfigsPreRunHandler(cmd *cobra.Command, home string) error
- func WaitForQuitSignals() int
- type Context
- func GetServerContextFromCmd(cmd *cobra.Command) *Context
- func NewContext(cfg *config.Config, btcCfg *config.BitcoinConfig) *Context
- func NewDefaultContext() *Context
- func NewHTTPContext(httpCfg *config.HTTPConfig, bitcoinCfg *config.BitcoinConfig) *Context
- func NewTransferContext(cfg *config.Config, transferCfg *config.TransferConfig) *Context
- type ErrorCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuditDBContextFromCmd ¶ added in v1.1.0
func GrpcOpts ¶
func GrpcOpts(listenAddress string, httpConfig *config.HTTPConfig, db *gorm.DB) googleGrpc.ServerOption
func NewAuditDB ¶ added in v1.1.0
func NewAuditDB(cfg *config.AuditConfig) (*gorm.DB, error)
func SetCmdServerContext ¶
SetCmdServerContext sets a command's Context value to the provided argument.
func StartTransfer ¶ added in v1.1.0
func TransferConfigsPreRunHandler ¶ added in v1.1.0
func WaitForQuitSignals ¶
func WaitForQuitSignals() int
Types ¶
type Context ¶
type Context struct { // Viper *viper.Viper Config *config.Config BitcoinConfig *config.BitcoinConfig HTTPConfig *config.HTTPConfig TransferCfg *config.TransferConfig }
server context
func GetServerContextFromCmd ¶
GetServerContextFromCmd returns a Context from a command or an empty Context if it has not been set.
func NewContext ¶
func NewContext(cfg *config.Config, btcCfg *config.BitcoinConfig) *Context
func NewDefaultContext ¶
func NewDefaultContext() *Context
func NewHTTPContext ¶
func NewHTTPContext(httpCfg *config.HTTPConfig, bitcoinCfg *config.BitcoinConfig) *Context
func NewTransferContext ¶ added in v1.1.0
func NewTransferContext(cfg *config.Config, transferCfg *config.TransferConfig) *Context
Click to show internal directories.
Click to hide internal directories.