mfx

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

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

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" default:"0.0.2"`
}

func (*AppResult) LoadConstant

func (ar *AppResult) LoadConstant(value string) error

func (*AppResult) LoadFromEnv

func (ar *AppResult) LoadFromEnv() (err error)

Jump to

Keyboard shortcuts

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