config

package
v0.0.0-...-23d2696 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDatabase

type AppDatabase struct {
	Ip           string `json:"Ip"`
	Port         int32  `json:"Port"`
	DatabaseName string `json:"DatabaseName"`
	MaxBatchSize int32  `json:"MaxBatchSize"`
}

type AuthService

type AuthService struct {
	Ip     string `json:"Ip"`
	Port   int32  `json:"Port"`
	IsTcp  bool   `json:"IsTcp"`
	IsHttp bool   `json:"IsHttp"`
}

type Config

type Config struct {
	AppName        string        `json:"AppName"`
	AppToken       string        `json:"AppToken"`
	MachineIp      string        `json:"MachineIp"`
	ConfigFilePath string        `json:"ConfigFilePath"`
	FrontEnd       FrontEnd      `json:"FrontEnd"`
	WebServer      WebServer     `json:"WebServer"`
	AuthService    AuthService   `json:"AuthService"`
	LoginService   AuthService   `json:"LoginService"`
	AppDatabases   []AppDatabase `json:"AppDatabases"`
	LogConfig      LogConfig     `json:"LogConfig"`
}

func (*Config) SetEnvArgs

func (this *Config) SetEnvArgs() (bool, error)

func (*Config) SetFromCmdArgs

func (this *Config) SetFromCmdArgs() (bool, error)

func (*Config) SetFromFile

func (this *Config) SetFromFile(filePath string) (bool, error)

func (*Config) Show

func (this *Config) Show()

This is used to print the values of the config object

type FrontEnd

type FrontEnd struct {
	ViewsPath              string `json:"ViewsPath"`
	TemplatesPath          string `json:"TemplatesPath"`
	TemplateDelimiterStart string `json:"TemplateDelimiterStart"`
	TemplateDelimiterEnd   string `json:"TemplateDelimiterEnd"`
}

type LogConfig

type LogConfig struct {
	Level string `json:"Level"`
	Path  string `json:"Path"`
	Days  int32  `json:"Days"`
}

type WebServer

type WebServer struct {
	Ip         string `json:"Ip"`
	Port       int32  `json:"Port"`
	StopUrl    string `json:"StopUrl"`
	RestartUrl string `json:"RestartUrl"`
	AuthKey    string `json:"AuthKey"`
	Mode       string `json:"Mode"`
}

Jump to

Keyboard shortcuts

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