config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audience

type Audience string

Audience

func (Audience) String

func (a Audience) String() string

type Audiences

type Audiences []Audience

func (Audiences) SetValue

func (a Audiences) SetValue() []oauth2.AuthCodeOption

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"`
	ProxySSLVerify string `yaml:"proxy_ssl_verify" toml:"proxy_ssl_verify" json:"proxy_ssl_verify"`
	Urls           []Urls `yaml:"urls" toml:"urls" json:"urls"`
}

Locations

func (*Locations) IsProxySSLVerify

func (l *Locations) IsProxySSLVerify() bool

type Logging

type Logging struct {
	Level      string `yaml:"level" toml:"level" json:"level"`
	FileName   string `yaml:"filename" toml:"filename" json:"filename"`
	LogFormat  string `yaml:"logformat" toml:"logformat" json:"logformat"`
	TimeFormat string `yaml:"timeformat" toml:"timeformat" json:"timeformat"`
	// 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"`
	// GrantType    string    `yaml:"grant_type" toml:"grant_type" json:"grant_type"`
	Audiences []string `yaml:"audiences" toml:"audiences" json:"audiences"`
}

Oidc

func (*Oidc) SetValues

func (o *Oidc) SetValues() []oauth2.AuthCodeOption

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"`
	CookieName string      `yaml:"cookie_name" toml:"cookie_name" json:"cookie_name"`
	ServerName string      `yaml:"server_name" toml:"server_name" json:"server_name"`
	Port       int         `yaml:"port" toml:"port" json:"port"`
	Session    Session     `yaml:"session" toml:"session" json:"session"`
	Login      string      `yaml:"login" toml:"login" json:"login"`
	Callback   string      `yaml:"callback" toml:"callback" json:"callback"`
	Logout     string      `yaml:"logout" toml:"logout" json:"logout"`
	Redirect   bool        `yaml:"redirect" toml:"redirect" json:"redirect"`
}

Servers

func (*Servers) GetHostname

func (s *Servers) GetHostname() string

func (*Servers) Is

func (s *Servers) Is() error

type Session

type Session struct {
	Name   string                 `yaml:"name" toml:"name" json:"name"`
	Plugin bool                   `yaml:"plugin" toml:"plugin" json:"plugin"`
	Codecs []string               `yaml:"codecs" toml:"codecs" json:"codecs"`
	Args   map[string]interface{} `yaml:"args" toml:"args" json:"args"`
}

Session

func (*Session) GetCodecs

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

func (*Session) GetSessionPlugin

func (c *Session) GetSessionPlugin() string

func (*Session) IsCodecs

func (c *Session) IsCodecs() bool

type Urls

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

Urls

Jump to

Keyboard shortcuts

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