libs

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Get(key string) interface{}

	GetInt(key string) int

	GetBool(key string) bool

	GetInt32(key string) int32

	GetInt64(key string) int64

	GetString(key string) string

	GetFloat64(key string) float64

	GetStringSlice(key string) []string

	UnmarshalKey(key string, rawVal interface{}) error

	SetDefaultValue(defaultValue map[string]interface{})
}

type GDB

type GDB interface {
	Conn() error
	Client() *gorm.DB
}

type Logger

type Logger interface {
	New() Logger

	Name(name string) Logger

	ZapLogger() *zap.Logger

	// INFO Info日志打印
	INFO(str string, values ...interface{})

	// WARN Warn日志打印
	WARN(str string, values ...interface{})

	// ERROR Error日志打印
	ERROR(str string, values ...interface{})

	// DEBUG Debug日志打印
	DEBUG(str string, values ...interface{})
}

type MultiDB added in v0.0.18

type MultiDB interface {
	GetDB(name string) GDB
	GetDefaultDB() GDB
	AddGDB(name string, db GDB)
}

type RDB

type RDB interface {
	Conn(isCluster bool) error
	Client() *redis.Client
	ClusterClient() *redis.ClusterClient
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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