conf

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf .
	Conf = &Config{}
)

Functions

func Init

func Init() (err error)

Init captcha service init.

Types

type Business

type Business struct {
	BusinessID string
	LenStart   int
	LenEnd     int
	Width      int
	Length     int
	TTL        time.Duration
}

Business third business confs.

type Captcha

type Captcha struct {
	OuterHost    string
	Capacity     int
	DisturbLevel int    // 4 normal, 8 medium, 16 high
	Ext          string // jpeg
	Fonts        []string
	BkgColors    []color.RGBA
	FrontColors  []color.RGBA
	Interval     time.Duration
}

Captcha captcha service conf.

type Config

type Config struct {
	XLog     *log.Config
	Tracer   *trace.Config
	Ecode    *ecode.Config
	BM       *HTTPServers
	Verify   *verify.Config
	Rate     *rate.Config
	Memcache *Memcache
	Captcha  *Captcha
	Business []*Business
}

Config captcha service config struct.

type HTTPServers

type HTTPServers struct {
	Outer *bm.ServerConfig
}

HTTPServers Http Servers

type Memcache

type Memcache struct {
	*memcache.Config
	Expire time.Duration
}

Memcache represent mc conf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL