config

package
v1.20.30 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustLoad added in v1.20.21

func MustLoad()

func Save

func Save() error

func Set

func Set(set func(c *ConfigData))

Types

type CommandLineArgs added in v1.20.21

type CommandLineArgs struct {
	Configpath string
	Retries    int
}

func GetCommandLineArgs added in v1.20.21

func GetCommandLineArgs() CommandLineArgs

type Config

type Config struct {
	// contains filtered or unexported fields
}

func (*Config) Get added in v1.0.9

func (c *Config) Get() *ConfigData

func (*Config) ReadFromFile added in v1.20.21

func (c *Config) ReadFromFile(configpath string) error

func (*Config) Save added in v1.20.21

func (c *Config) Save() error

func (*Config) SaveToFile added in v1.20.21

func (c *Config) SaveToFile(configpath string) error

func (*Config) Set added in v1.0.9

func (c *Config) Set(setterFunc func(c *ConfigData))

type ConfigData added in v1.0.9

type ConfigData struct {
	Bind struct {
		Http string `yaml:"http"`
		Udp  string `yaml:"udp"`
		Grpc string `yaml:"grpc"`
	} `yaml:"bind"`
	OAuth struct {
		Github struct {
			Org          string `yaml:"org"           json:"org"`
			ClientId     string `yaml:"client_id"     json:"client_id"`
			ClientSecret string `yaml:"client_secret" json:"-"`
		} `yaml:"github"`
		JwtSecret string `yaml:"jwt_secret"`
	} `yaml:"oauth"`
	Clickhouse    string `yaml:"clickhouse"`
	Mysql         string `yaml:"mysql"`
	Redis         string `yaml:"redis"`
	AllowNoCipher bool   `yaml:"allow_no_cipher"`
	DemoDash      struct {
		Enabled bool   `yaml:"enabled"`
		Llm     string `yaml:"llm"`
	} `yaml:"demo_dash"`
	RecaptchaSecret string `yaml:"recaptcha"`
}

func Get

func Get() *ConfigData

func (*ConfigData) GetJwtSecret added in v1.0.9

func (c *ConfigData) GetJwtSecret() string

func (*ConfigData) IsSetupRequired added in v1.20.21

func (c *ConfigData) IsSetupRequired() bool

Jump to

Keyboard shortcuts

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