Documentation ¶
Index ¶
- func GetSettingValue(name string) any
- func Load()
- func Reset() error
- func SettingNames() []string
- func UpdateSettingValue(name string, value string) error
- func ValidArgSettingName(cmdName string) func(cmd *cobra.Command, args []string) error
- type Config
- type DetailedLogConfig
- type LogConfig
- type LogInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSettingValue ¶
func SettingNames ¶
func SettingNames() []string
func UpdateSettingValue ¶
Types ¶
type Config ¶
type Config struct { URL string `yaml:"url" json:"url" validate:"required"` APIKey string `yaml:"api_key" json:"api_key" validate:"required"` APISecret string `yaml:"api_secret" json:"api_secret" validate:"required"` Labels map[string]string `yaml:"labels" json:"labels" validate:"required"` Rate int `yaml:"rate" json:"rate" validate:"required"` Timeout time.Duration `yaml:"timeout" json:"timeout" validate:"required"` LogConfig LogConfig `yaml:"log_config" json:"log_config" validate:"required"` EnableMetrics bool `yaml:"enable_metrics" json:"enable_metrics"` EnableTraces bool `yaml:"enable_traces" json:"enable_traces"` }
func (Config) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Config) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Config) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Config) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type DetailedLogConfig ¶
type DetailedLogConfig struct { Format string `json:"format"` Structure []LogInfo `json:"structure"` }
func (DetailedLogConfig) MarshalEasyJSON ¶
func (v DetailedLogConfig) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DetailedLogConfig) MarshalJSON ¶
func (v DetailedLogConfig) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DetailedLogConfig) UnmarshalEasyJSON ¶
func (v *DetailedLogConfig) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DetailedLogConfig) UnmarshalJSON ¶
func (v *DetailedLogConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type LogConfig ¶
type LogConfig struct { Format string `yaml:"format" json:"format" validate:"oneof=logfmt json"` Structure map[string]string `yaml:"structure" json:"structure" validate:"required"` }
func (*LogConfig) Detailed ¶
func (lc *LogConfig) Detailed(categories ...string) *DetailedLogConfig
func (LogConfig) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (LogConfig) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*LogConfig) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LogConfig) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type LogInfo ¶
type LogInfo struct { Display string `json:"display"` Category string `json:"category"` Description string `json:"description"` Example string `json:"example"` Params []gofakeit.Param `json:"params"` }
func (LogInfo) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (LogInfo) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*LogInfo) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LogInfo) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface