Documentation
¶
Index ¶
- Variables
- func IndexSrv(opts ...SrvOption) error
- type SrvOption
- func WithEnablePProf(enablePProf bool) SrvOption
- func WithMysqlAddr(mysqlAddr string) SrvOption
- func WithMysqlDBName(mysqlDBName string) SrvOption
- func WithMysqlPassword(mysqlPassword string) SrvOption
- func WithMysqlUser(mysqlUser string) SrvOption
- func WithNoApi(noApi bool) SrvOption
- func WithPassword(password string) SrvOption
- func WithRpcConnect(rpcConnect string) SrvOption
- func WithRpcListen(rpcListen string) SrvOption
- func WithTestNet(testnet bool) SrvOption
- func WithUserName(username string) SrvOption
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type SrvOption ¶
type SrvOption func(*config.SrvConfigs)
SrvOption is a function type that takes a pointer to a config.SrvConfigs struct as a parameter. It is used to set the fields of the config.SrvConfigs struct.
func WithEnablePProf ¶
WithEnablePProf is a function that returns a SrvOption. The returned SrvOption sets the enablePProf field of the config.SrvConfigs struct to the provided enablePProf.
func WithMysqlAddr ¶
WithMysqlAddr is a function that returns a SrvOption. The returned SrvOption sets the mysqlAddr field of the config.SrvConfigs struct to the provided mysqlAddr.
func WithMysqlDBName ¶
WithMysqlDBName is a function that returns a SrvOption. The returned SrvOption sets the mysqlDBName field of the config.SrvConfigs struct to the provided mysqlDBName.
func WithMysqlPassword ¶
WithMysqlPassword is a function that returns a SrvOption. The returned SrvOption sets the mysqlPassword field of the config.SrvConfigs struct to the provided mysqlPassword.
func WithMysqlUser ¶
WithMysqlUser is a function that returns a SrvOption. The returned SrvOption sets the mysqlUser field of the config.SrvConfigs struct to the provided mysqlUser.
func WithNoApi ¶
WithNoApi is a function that returns a SrvOption. The returned SrvOption sets the noApi field of the config.SrvConfigs struct to the provided noApi.
func WithPassword ¶
WithPassword is a function that returns a SrvOption. The returned SrvOption sets the password field of the config.SrvConfigs struct to the provided password.
func WithRpcConnect ¶
WithRpcConnect is a function that returns a SrvOption. The returned SrvOption sets the rpcConnect field of the config.SrvConfigs struct to the provided rpcConnect.
func WithRpcListen ¶
WithRpcListen is a function that returns a SrvOption. The returned SrvOption sets the rpcListen field of the config.SrvConfigs struct to the provided rpcListen.
func WithTestNet ¶
WithTestNet is a function that returns a SrvOption. The returned SrvOption sets the testnet field of the config.SrvConfigs struct to the provided testnet.
func WithUserName ¶
WithUserName is a function that returns a SrvOption. The returned SrvOption sets the username field of the config.SrvConfigs struct to the provided username.