token

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v0.2.10

func Register() common.Caller

Types

type CallerCfg added in v0.2.10

type CallerCfg struct {
	Mode string

	LoggerRef string
	Logger    LoggerCallerCfg `toml:"logger"`

	MysqlRef string
	Mysql    MysqlCallerCfg `toml:"mysql"`

	RedisRef string
	Redis    RedisCallerCfg `toml:"redis"`
}

CallerCfg是token的配置。 需要注意的是,XXXRef是指指定了一个已经在配置文件里面的Caller。 比如说,你已经设置了一个mysql数据库myDB用于存储数据,而你又希望同时使用该数据库来存放token的数据, 那么你只需将MysqlRef设置为myDB。 如果你没有指定Ref,那么token会在初始化的时候依据配置来重新创建一个

type Cfg added in v0.2.10

type Cfg struct {
	Muses struct {
		Token map[string]CallerCfg `toml:"token"`
	} `toml:"muses"`
}

type Client added in v0.2.10

type Client struct {
	standard.TokenAccessor
	// contains filtered or unexported fields
}

func Caller added in v0.2.10

func Caller(name string) *Client

type LoggerCallerCfg added in v0.2.10

type LoggerCallerCfg logger.CallerCfg

type MysqlCallerCfg added in v0.2.10

type MysqlCallerCfg mysql.CallerCfg

type RedisCallerCfg added in v0.2.10

type RedisCallerCfg redis.CallerCfg

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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