config

package
v0.0.0-...-24b49fa Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(defaultRelConfigPath string)

Types

type Config

type Config struct {
	OAuth2 GiteaOauth2Config  `yaml:"oauth2"`
	Remote RemoteConfigCenter `yaml:"remote"`
	DB     DBConfig           `yaml:"db"`
	Redis  RedisConfig        `yaml:"redis"`
	Sarama SaramaConfig       `yaml:"sarama"`
	GRPC   GRPCConfig         `yaml:"grpc"`
}
var Cfg Config

type DBConfig

type DBConfig struct {
	DSN string `yaml:"dsn"`
}

type GRPCConfig

type GRPCConfig struct {
	Secure bool       `yaml:"secure"`
	Intr   IntrConfig `yaml:"intr"`
}

type GiteaOauth2Config

type GiteaOauth2Config struct {
	BaseURL      string `yaml:"baseURL"`
	ClientID     string `yaml:"clientID"`
	ClientSecret string `yaml:"clientSecret"`
}

type IntrConfig

type IntrConfig struct {
	Threshold int32  `yaml:"threshold"`
	Addr      string `yaml:"addr"`
}

type RedisConfig

type RedisConfig struct {
	Addr string `yaml:"addr"`
}

type RemoteConfigCenter

type RemoteConfigCenter struct {
	Provider string `yaml:"provider"`
	EndPoint string `yaml:"endpoint"`
	Path     string `yaml:"path"`
}

type SaramaConfig

type SaramaConfig struct {
	Addr []string `yaml:"addr"`
}

Jump to

Keyboard shortcuts

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