config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 3 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   `mapstructure:"remote_server"`
	RemotePublicKey string   `mapstructure:"remote_public_key"`
	PrivateKey      string   `mapstructure:"private_key"`
	UrlPrefix       string   `mapstructure:"url_prefix"`
	Provider        Provider `mapstructure:"provider"`
}

type Cache

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

type Config

type Config struct {
	ListenAddr string `mapstructure:"listen_addr"`
	Tls        Tls    `mapstructure:"tls"`
	Cache      Cache  `mapstructure:"cache"`
	Auth       Auth   `mapstructure:"auth"`
	Proxy      Proxy  `mapstructure:"proxy"`
}

func LoadConfig

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

type Policy

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

type Provider

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

type Proxy

type Proxy struct {
	Policies map[string]Policy `mapstructure:"policies"`
}

type Tls

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

Jump to

Keyboard shortcuts

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