global

package
v0.0.0-...-cfa74d8 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Redis       *redis.Client
	GormDBGroup *config.GormDBGroup
	Viper       *viper.Viper
	Logger      *zap.Logger
	I18nLocale  *i18n.I18nLocale
	WorkDir     string
)
View Source
var (
	Config *config.Config
)

Functions

func DB

func DB() *gorm.DB

DB @Date: 2023-01-09 10:41:36 @Description: 获取默认的GormDB @Return: *gorm.DB

func DBName

func DBName(name string) *gorm.DB

func I18nData

func I18nData(key string, locale language.Tag, data ...any) string

I18nData @Date 2023-02-06 22:02:31 @Param key string @Param locale language.Tag @Param data ...any @Return string @Method @Description: 获取带参数的国际化信息

func I18nDataCN

func I18nDataCN(key string, data ...any) string

func I18nRaw

func I18nRaw(key string, locale language.Tag) string

I18nRaw @Date 2023-02-06 21:58:50 @Param key string @Param locale language.Tag @Return string @Method @Description: 获取国际化信息

func I18nRawCN

func I18nRawCN(key string) string

func Model

func Model(ele any) *gorm.DB

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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