mfx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SettingModule = fx.Provide(
	func() (out AppResult, err error) {
		err = out.loadFromEnv()
		return
	},
)

SettingModule is a module that provides the application settings.

Functions

This section is empty.

Types

type AppParams

type AppParams struct {
	fx.In

	AppName    string `name:"AppName"`
	AppId      string `name:"AppId"`
	Deployment string `name:"Deployment"`
	Version    string `name:"Version"`
}

type AppResult

type AppResult struct {
	fx.Out

	AppName    string `name:"AppName" envconfig:"APP_NAME" default:"app"`
	AppId      string `name:"AppId" envconfig:"APP_ID" default:"app"`
	Deployment string `name:"Deployment" envconfig:"DEPLOYMENT" default:"local"`
	Version    string `name:"Version" envconfig:"VERSION" default:"0.0.1"`
}

Jump to

Keyboard shortcuts

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