appcontext

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 5 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 `field:"service_name" json:"service_name" yaml:"service_name" toml:"service_name" env:"SERVICE_NAME" default:"redify"`
	Hostname    string `field:"hostname" json:"hostname" yaml:"hostname" toml:"hostname" env:"HOSTNAME"`
	Hostcode    string `field:"hostcode" json:"hostcode" yaml:"hostcode" toml:"hostcode" env:"HOSTCODE"`

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

	Server  serverConfig `field:"server" json:"server" yaml:"server" toml:"server"`
	Cache   cacheConfig  `field:"cache" json:"cache" yaml:"cache" toml:"cache"`
	Sources []dataSource `field:"sources" 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) Prepare added in v0.7.0

func (c *ConfigType) Prepare()

func (*ConfigType) String

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

String implementation of Stringer interface

type DatatypeMapper added in v0.6.0

type DatatypeMapper struct {
	Name string `field:"name" json:"name" yaml:"name" toml:"name"`
	Type string `field:"type" json:"type" yaml:"type" toml:"type"`
}

Jump to

Keyboard shortcuts

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