common

package
v0.3.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: BSD-3-Clause 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
	Mongo  *mongo.Client
	Db     *mongo.Database
}

type Storage added in v0.3.0

type Storage struct {
	Type string `env:"TYPE"`
	Url  string `env:"URL"`
	Id   string `env:"ID"`
	Key  string `env:"KEY"`
}

type Values

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

Jump to

Keyboard shortcuts

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