context

package
v0.0.0-...-62a34bc Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(confPath string) error

Types

type Config

type Config struct {
	GinMode  string `yaml:"gin_mode"`
	LogPath  string `yaml:"log_path"`
	LogLevel int    `yaml:"log_level"`
	HttpPort int    `yaml:"http_port"`

	Mysql *ginx.GormMysqlConf
	Redis *ginx.RedisConf
}

type Context

type Context struct {
	Config *Config
	Logger *logger.Logger
	Gorm   *gorm.DB
	Red    *redis.Client
}

func Instance

func Instance() *Context

Jump to

Keyboard shortcuts

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