Versions in this module Expand all Collapse all v0 v0.1.0 Jun 2, 2025 Changes in this version + const GiB + const KiB + const MiB + const TiB + func CreateListener(addr string) (net.Listener, int, error) + func ValidateAddress(addr string) error + type ChainOptions struct + ChainId int32 + RPC string + SignerKey string + func NewChainOptions() *ChainOptions + func (o *ChainOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *ChainOptions) Validate() []error + type ConsulOptions struct + Addr string + Scheme string + func NewConsulOptions() *ConsulOptions + func (o *ConsulOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *ConsulOptions) Validate() []error + type EtcdOptions struct + DialTimeout time.Duration + Endpoints []string + Password string + TLSOptions *TLSOptions + Username string + func NewEtcdOptions() *EtcdOptions + func (o *EtcdOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *EtcdOptions) Validate() []error + type GRPCOptions struct + Addr string + Network string + Timeout time.Duration + func NewGRPCOptions() *GRPCOptions + func (o *GRPCOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *GRPCOptions) Validate() []error + type HTTPOptions struct + Addr string + Network string + Timeout time.Duration + func NewHTTPOptions() *HTTPOptions + func (o *HTTPOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *HTTPOptions) Validate() []error + func (s *HTTPOptions) Complete() error + type HealthOptions struct + HTTPProfile bool + HealthCheckAddress string + HealthCheckPath string + func NewHealthOptions() *HealthOptions + func (o *HealthOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *HealthOptions) ServeHealthCheck() + func (o *HealthOptions) Validate() []error + type IOptions interface + AddFlags func(fs *pflag.FlagSet, prefixes ...string) + Validate func() []error + type JWTOptions struct + Expired time.Duration + Key string + MaxRefresh time.Duration + SigningMethod string + func NewJWTOptions() *JWTOptions + func (s *JWTOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (s *JWTOptions) Validate() []error + type MySQLOptions struct + Addr string + Database string + LogLevel int + MaxConnectionLifeTime time.Duration + MaxIdleConnections int + MaxOpenConnections int + Password string + Username string + func NewMySQLOptions() *MySQLOptions + func (o *MySQLOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *MySQLOptions) DSN() string + func (o *MySQLOptions) NewDB() (*gorm.DB, error) + func (o *MySQLOptions) Validate() []error + type RedisOptions struct + Addr string + Database int + DialTimeout time.Duration + EnableTrace bool + MaxRetries int + MinIdleConns int + Password string + PoolSize int + PoolTimeout time.Duration + ReadTimeout time.Duration + Username string + WriteTimeout time.Duration + func NewRedisOptions() *RedisOptions + func (o *RedisOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *RedisOptions) NewClient() (*redis.Client, error) + func (o *RedisOptions) Validate() []error + type SocialOptions struct + TelegramBotToken string + XBearerToken string + XClientID string + XClientSecret string + XOfficials []string + XRedirectURL string + func NewSocialOptions() *SocialOptions + func (o *SocialOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *SocialOptions) Validate() []error + type TLSOptions struct + CaCert string + Cert string + InsecureSkipVerify bool + Key string + UseTLS bool + func NewTLSOptions() *TLSOptions + func (o *TLSOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) + func (o *TLSOptions) MustTLSConfig() *tls.Config + func (o *TLSOptions) Scheme() string + func (o *TLSOptions) TLSConfig() (*tls.Config, error) + func (o *TLSOptions) Validate() []error