setting

package
v0.0.0-...-95432f6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEV      = "development"
	PROD     = "production"
	APP_NAME = "patrol-api"
)

Variables

View Source
var (
	Env      = DEV
	HomePath string

	AppUrl          string
	HttpPort        string
	Domain          string
	ApplicationName string

	APIVersion string

	SsoApiUrl      string
	SubscriptionId string

	AssetRegisterApiUrl string
)

Functions

func SetHomePath

func SetHomePath(args *CommandLineArgs)

Types

type Cfg

type Cfg struct {
	Raw *ini.File

	//ViperCfg *viper.Viper
	DataPath string
	LogsPath string
}

func NewCfg

func NewCfg() *Cfg

func ProvideSettingCfg

func ProvideSettingCfg(args *CommandLineArgs) (*Cfg, error)

func (*Cfg) Load

func (cfg *Cfg) Load(args *CommandLineArgs) error

func (*Cfg) LoadConfiguration

func (cfg *Cfg) LoadConfiguration(args *CommandLineArgs) (*ini.File, error)

type CommandLineArgs

type CommandLineArgs struct {
	Config   string
	HomePath string
	Args     []string
}

type Scheme

type Scheme string

Jump to

Keyboard shortcuts

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