config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	RemoteServer    string   `yaml:"remote_server"`
	RemotePublicKey string   `yaml:"remote_public_key"`
	PrivateKey      string   `yaml:"private_key"`
	UrlPrefix       string   `yaml:"url_prefix"`
	Provider        Provider `yaml:"provider"`
}

type Cache

type Cache struct {
	Type          string `yaml:"type"`
	RedisAddr     string `yaml:"redis_addr"`
	RedisDB       int    `yaml:"redis_db"`
	RedisPassword string `yaml:"redis_password"`
}

type Config

type Config struct {
	ListenAddr string  `yaml:"listen_addr"`
	Metrics    Metrics `yaml:"metrics"`
	Tls        Tls     `yaml:"tls"`
	Cache      Cache   `yaml:"cache"`
	Auth       Auth    `yaml:"auth"`
	Proxy      Proxy   `yaml:"proxy"`
	Relay      Relay   `yaml:"relay"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type Metrics added in v0.7.0

type Metrics struct {
	ListenAddr string `yaml:"listen_addr"`
}

type Policy

type Policy struct {
	Subs    []string `yaml:"subs"`
	Emails  []string `yaml:"emails"`
	Filters []string `yaml:"filters"`
	Targets []string `yaml:"targets"`
}

type Provider

type Provider struct {
	Type         string   `yaml:"type"`
	Issuer       string   `yaml:"issuer"`
	ClientID     string   `yaml:"client_id"`
	ClientSecret string   `yaml:"client_secret"`
	Scopes       []string `yaml:"additional_scopes"`
}

type Proxy

type Proxy struct {
	PrivateKey string            `yaml:"private_key"`
	Policies   map[string]Policy `yaml:"policies"`
}

type Relay added in v0.8.0

type Relay struct {
	PrivateKey      string `yaml:"private_key"`
	RemoteServer    string `yaml:"remote_server"`
	RemotePublicKey string `yaml:"remote_public_key"`
}

type Tls

type Tls struct {
	Disable  bool   `yaml:"disable"`
	CertFile string `yaml:"cert_file"`
	KeyFile  string `yaml:"key_file"`
}

Jump to

Keyboard shortcuts

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