appcontext

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigType

type ConfigType struct {
	ConfigPath string `cli:"conf" env:"CONFIG_PATH"`

	ServiceName string `json:"service_name" yaml:"service_name" toml:"service_name" env:"SERVICE_NAME" default:"redify"`
	Hostname    string `json:"hostname" yaml:"hostname" toml:"hostname" env:"HOSTNAME"`
	Hostcode    string `json:"hostcode" yaml:"hostcode" toml:"hostcode" env:"HOSTCODE"`

	LogAddr    string `json:"log_addr" yaml:"log_addr" toml:"log_addr" default:"" env:"LOG_ADDR"`
	LogLevel   string `json:"log_level" yaml:"log_level" toml:"log_level" default:"debug" env:"LOG_LEVEL"`
	LogEncoder string `json:"log_encoder" yaml:"log_encoder" toml:"server" env:"LOG_ENCODER"`

	Server  serverConfig `json:"server" yaml:"server" toml:"server"`
	Cache   cacheConfig  `json:"cache" yaml:"cache" toml:"cache"`
	Sources []dataSource `json:"sources" yaml:"sources" toml:"sources"`
}

ConfigType contains all application options

func (*ConfigType) ConfigFilepath

func (cfg *ConfigType) ConfigFilepath() string

func (*ConfigType) IsDebug

func (cfg *ConfigType) IsDebug() bool

IsDebug mode

func (*ConfigType) String

func (cfg *ConfigType) String() (res string)

String implementation of Stringer interface

Jump to

Keyboard shortcuts

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