micro

package module
v0.0.0-...-0985de9 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config config.Config
	Viper  *viper.Viper // 后面可能会对配置文件操作,可以通过它来实现
	Logs   *zap.Logger
	DB     *gorm.DB
	Redis  *redis.Pool

	Jaeger io.Closer

	RpcClient client.RpcClient
)

Functions

func Close

func Close()

func Init

func Init(cfgPath string)

func InitJaeger

func InitJaeger(service, address string)

func InitRpcClient

func InitRpcClient(cfg *config.RpcClient, opts ...client.DialOption)

Types

type Character

type Character struct{}

验证是否含有中文字符

func (*Character) Error

func (*Character) Error() string

func (*Character) Tag

func (*Character) Tag() string

func (*Character) ValidateFn

func (*Character) ValidateFn() validator.Func

type Phone

type Phone struct{}

验证手机号码

func (*Phone) Error

func (v *Phone) Error() string

func (*Phone) Tag

func (v *Phone) Tag() string

func (*Phone) ValidateFn

func (v *Phone) ValidateFn() validator.Func

Directories

Path Synopsis
core
errors
Package errors provides a way to return detailed information for an RPC request error.
Package errors provides a way to return detailed information for an RPC request error.
log
rpc

Jump to

Keyboard shortcuts

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