config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v1.0.0

type Cache struct {
	Name      string   `yaml:"name" toml:"name" json:"name"`
	Codecs    []string `yaml:"codecs" toml:"codecs" json:"codecs"`
	Endpoints []string `yaml:"endpoints" toml:"endpoints" json:"endpoints"`
	CacheTime int      `yaml:"cache_time" toml:"cache_time" json:"cache_time"`
	Username  string   `yaml:"username" toml:"username" json:"username"`
	Password  string   `yaml:"password" toml:"password" json:"password"`
}

Cache

func (*Cache) GetCacheName added in v1.0.0

func (c *Cache) GetCacheName() string

func (*Cache) GetCodecs added in v1.0.0

func (c *Cache) GetCodecs() [][]byte

func (*Cache) IsCodecs added in v1.0.0

func (c *Cache) IsCodecs() bool

type Config

type Config struct {
	Logging           Logging    `yaml:"logging" toml:"logging" json:"logging"`
	Servers           []*Servers `yaml:"servers" toml:"servers" json:"servers"`
	Port              int        `yaml:"port" toml:"port" json:"port"`
	SslCertificate    string     `yaml:"ssl_certificate" toml:"ssl_certificate" json:"ssl_certificate"`
	SslCertificateKey string     `yaml:"ssl_certificate_key" toml:"ssl_certificate_key" json:"ssl_certificate_key"`
	// contains filtered or unexported fields
}

Config

func New

func New(filename string) (Config, error)

func ReadConfig

func ReadConfig(filename string) (Config, error)

func (*Config) GetPort

func (c *Config) GetPort() string

func (*Config) GetServerConfig

func (c *Config) GetServerConfig(serverName string) *Servers

func (*Config) Output

func (c *Config) Output(filename string) error

type Extension

type Extension int
const (
	Yaml Extension = iota
	Toml
	Json
)

func GetExtension

func GetExtension(filename string) Extension

type GetConfiguration

type GetConfiguration func() Servers

type Locations

type Locations struct {
	ProxyPass string `yaml:"proxy_pass" toml:"proxy_pass" json:"proxy_pass"`
	Urls      []Urls `yaml:"urls" toml:"urls" json:"urls"`
}

Locations

type Logging

type Logging struct {
	Level    string `yaml:"level" toml:"level" json:"level"`
	FileName string `yaml:"filename" toml:"filename" json:"filename"`
	Prefix   string `yaml:"prefix" toml:"prefix" json:"prefix"`
	// contains filtered or unexported fields
}

Logging

func (*Logging) GetLogger

func (l *Logging) GetLogger() logger.ILogger

type Oidc

type Oidc struct {
	Scopes       []string `yaml:"scopes" toml:"scopes" json:"scopes"`
	Provider     string   `yaml:"provider" toml:"provider" json:"provider"`
	ClientId     string   `yaml:"client_id" toml:"client_id" json:"client_id"`
	ClientSecret string   `yaml:"client_secret" toml:"client_secret" json:"client_secret"`
	RedirectUrl  string   `yaml:"redirect_url" toml:"redirect_url" json:"redirect_url"`
	Logout       string   `yaml:"logout" toml:"logout" json:"logout"`
}

Oidc

type Servers

type Servers struct {
	Oidc        Oidc              `yaml:"oidc" toml:"oidc" json:"oidc"`
	Locations   []Locations       `yaml:"locations" toml:"locations" json:"locations"`
	Logging     Logging           `yaml:"logging" toml:"logging" json:"logging"`
	SessionName string            `yaml:"session_name" toml:"session_name" json:"session_name"`
	ServerName  string            `yaml:"server_name" toml:"server_name" json:"server_name"`
	CacheConfig Cache             `yaml:"cache" toml:"cache" json:"cache"`
	Login       string            `yaml:"login" toml:"login" json:"login"`
	Callback    string            `yaml:"callback" toml:"callback" json:"callback"`
	Logout      string            `yaml:"logout" toml:"logout" json:"logout"`
	Store       *store.CacheStore `yaml:"-" toml:"-" json:"-"`
	Log         logger.ILogger    `yaml:"-" toml:"-" json:"-"`
	// contains filtered or unexported fields
}

Servers

func (*Servers) GetHostname

func (s *Servers) GetHostname() string

func (*Servers) Is

func (s *Servers) Is() error

type Urls

type Urls struct {
	Path  string `yaml:"path" toml:"path" json:"path"`
	Token string `yaml:"token" toml:"token" json:"token"`
}

Urls

Jump to

Keyboard shortcuts

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