Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Type    string                 `yaml:"type"`    // deprecated
	Options map[string]interface{} `yaml:"options"` // deprecated
	Require []filter.RequireConfig `yaml:"require"` // deprecated
}

type CertAuthConfig

type CertAuthConfig struct {
	Name    string                 `yaml:"name"`
	Type    string                 `yaml:"type"`
	Options map[string]interface{} `yaml:"options"`
}

func (*CertAuthConfig) ApplyDefaults

func (c *CertAuthConfig) ApplyDefaults()

type Config

type Config struct {
	CertAuths []CertAuthConfig `yaml:"certauths,omitempty"`
	Auth      AuthConfig       `yaml:"auth"` // deprecated in favor of env.auth_service, server.require
	Env       envconfig.Config `yaml:"env"`
	Server    ServerConfig     `yaml:"server"`
	Services  []ServiceConfig  `yaml:"services"`
}

func (*Config) ApplyDefaults

func (c *Config) ApplyDefaults()

func (*Config) ApplyMigrations added in v0.17.0

func (c *Config) ApplyMigrations()

type ServerConfig

type ServerConfig struct {
	CertificatePath string                 `yaml:"certificate_path"`
	Host            string                 `yaml:"host"`
	Port            int                    `yaml:"port"`
	PrivateKeyPath  string                 `yaml:"private_key_path"`
	Redirect        ServerRedirectConfig   `yaml:"redirect"`
	Require         []filter.RequireConfig `yaml:"require"`
	RobotsTXT       string                 `yaml:"robotstxt"`
	TrustedProxies  ServerTrustedProxies   `yaml:"trusted_proxies"`
}

func (*ServerConfig) ApplyDefaults

func (c *ServerConfig) ApplyDefaults()

type ServerRedirectConfig

type ServerRedirectConfig struct {
	Root        string `yaml:"root"`
	AuthSuccess string `yaml:"auth_success"`
	AuthFailure string `yaml:"auth_failure"`
}

type ServerTrustedProxies added in v0.14.0

type ServerTrustedProxies []ServerTrustedProxy

func (ServerTrustedProxies) AsIPNet added in v0.14.0

func (v ServerTrustedProxies) AsIPNet() []*net.IPNet

type ServerTrustedProxy added in v0.14.0

type ServerTrustedProxy net.IPNet

func (*ServerTrustedProxy) UnmarshalYAML added in v0.14.0

func (v *ServerTrustedProxy) UnmarshalYAML(unmarshal func(interface{}) error) error

type ServiceConfig

type ServiceConfig struct {
	Name    string                 `yaml:"name"`
	Type    string                 `yaml:"type"`
	Require []filter.RequireConfig `yaml:"require"`
	Options map[string]interface{} `yaml:"options"`
}

func (*ServiceConfig) ApplyDefaults

func (c *ServiceConfig) ApplyDefaults()

Jump to

Keyboard shortcuts

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