resources

package
v0.0.0-...-34ab1a3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnexpectedGinMode = errors.New("unexpected gin mode")

Functions

This section is empty.

Types

type Env

type Env struct {
	ServiceName     string `env:"SERVICE_NAME, default=tsyst"`
	ServiceHTTPPort int    `env:"SERVICE_HTTP_PORT, default=7784"`
	LogLevel        string `env:"LOG_LEVEL, default=debug"`
	LogFormat       string `env:"LOG_FORMAT, default=console"`
	GinMode         string `env:"GIN_MODE, default=release"`
	MongoHost       string `env:"MONGO_HOST, required"`
}

type Resources

type Resources struct {
	Env   *Env
	Mongo *mongo.Client
}

func New

func New(ctx context.Context) *Resources

Jump to

Keyboard shortcuts

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