common

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Uri    string `env:"URI"`
	DbName string `env:"DBNAME"`
}

type Inject

type Inject struct {
	Values      *Values
	MongoClient *mongo.Client
	Db          *mongo.Database
}

type Values

type Values struct {
	// 监听地址
	Address string `env:"ADDRESS" envDefault:":9000"`
	// 数据库
	Database Database `envPrefix:"DATABASE_"`
}

Jump to

Keyboard shortcuts

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