token

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register() common.Caller

Types

type CallerCfg

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

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

type Client

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

func Caller

func Caller(name string) *Client

type LoggerCallerCfg

type LoggerCallerCfg logger.CallerCfg

type MysqlCallerCfg

type MysqlCallerCfg mysql.CallerCfg

type RedisCallerCfg

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