Versions in this module Expand all Collapse all v0 v0.0.1 Dec 2, 2020 Changes in this version + type Captcha struct + func (captcha *Captcha) WithLogger(logger ILogger) *Captcha + type DefaultLogger struct + func NewDefaultLogger() *DefaultLogger + func (d DefaultLogger) Error(args ...interface{}) + type DriverConfig struct + BackgroundColor *color.RGBA + CaptchaType string + DotCount int + Fonts []string + Height int + Language string + Length int + MaxSkew float64 + NoiseCount int + ShowLineOptions int + Source string + Width int + func (config DriverConfig) NewDriver() base64Captcha.Driver + type ILogger interface + Error func(args ...interface{}) + type Loader struct + Driver DriverConfig + Store StoreConfig + func NewCaptcha() *Loader + func (loader *Loader) Instance() *Captcha + func (loader *Loader) OnChange(viper *viper.Viper) + type RedisStore struct + func (s *RedisStore) Get(id string, clear bool) string + func (s *RedisStore) Set(id string, value string) + func (s *RedisStore) SetLogger(logger ILogger) + func (s *RedisStore) Verify(id, answer string, clear bool) bool + type StoreConfig struct + Addr string + Addresses []string + ClusterSlots func(ctx context.Context) ([]redis.ClusterSlot, error) + DB int + DialTimeout string + Dialer func(ctx context.Context, network, addr string) (net.Conn, error) + IdleCheckFrequency string + IdleTimeout string + Limiter redis.Limiter + MasterName string + MaxConnAge string + MaxRedirects int + MaxRetries int + MaxRetryBackoff string + MinIdleConns int + MinRetryBackoff string + Network string + NewClient func(opt *redis.Options) *redis.Client + OnConnect func(ctx context.Context, cn *redis.Conn) error + Password string + PoolSize int + PoolTimeout string + Randomly bool + ReadOnly bool + ReadTimeout string + RedisType string + RouteByLatency bool + RouteRandomly bool + SentinelPassword string + SlaveOnly bool + TLSConfig *tls.Config + Username string + WriteTimeout string + func (config StoreConfig) NewStore() *RedisStore