api

package
Version: v0.0.0-...-56e15b1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URLPrefix         = "/.well-known/acme-challenge/"
	ACMEResponderPort = 56791
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUser

type AuthUser struct {
	Username  string
	Password  string
	Encrypted bool
}

type Backend

type Backend struct {
	Name          string
	NameGenerated bool
	BasicAuth     *BasicAuth

	BackendRules []string
	// Deprecated
	RewriteRules []string
	// Deprecated
	HeaderRules []string
	Endpoints   []*Endpoint

	Sticky           bool
	StickyCookieName string
	StickyCookieHash string

	ALPNOptions string
	Proto       string

	LoadBalanceOn string
}

type BasicAuth

type BasicAuth struct {
	Realm     string
	UserLists []string
}

type CORSConfig

type CORSConfig struct {
	CORSEnabled          bool
	CORSAllowedOrigin    string
	CORSAllowedMethods   string
	CORSAllowedHeaders   string
	CORSAllowCredentials bool
}

type Endpoint

type Endpoint struct {
	Name            string
	IP              string
	Port            string
	Weight          int
	MaxConnections  int
	ExternalName    string
	UseDNSResolver  bool
	DNSResolver     string
	CheckHealth     bool
	CheckHealthPort string
	TLSOption       string
	SendProxy       string
	AgentPort       string
	AgentInterval   string
}

type ErrorFile

type ErrorFile struct {
	StatusCode string
	Command    string
	Value      string
}

type ExternalAuth

type ExternalAuth struct {
	AuthBackend     string
	AuthBackendPath string
	AuthPath        string
	SigninPath      string
	Paths           []string
}

type HTTPHost

type HTTPHost struct {
	Host         string
	Paths        []*HTTPPath
	ExternalAuth *ExternalAuth
}

type HTTPPath

type HTTPPath struct {
	//Host        string
	Path        string
	Backend     *Backend
	SSLRedirect bool
}

type HTTPService

type HTTPService struct {
	*SharedInfo

	FrontendName   string
	Address        string
	Port           int
	NodePort       int32
	NodePortFor443 int32
	OffloadSSL     bool
	ALPNOptions    string
	Proto          string
	FrontendRules  []string
	BasicAuth      *BasicAuth
	TLSAuth        *TLSAuth
	Hosts          []*HTTPHost
}

func (HTTPService) RedirectSSL

func (svc HTTPService) RedirectSSL() bool

func (*HTTPService) RemoveBackendAuth

func (svc *HTTPService) RemoveBackendAuth()

type Limit

type Limit struct {
	Connection int
	TimeSecond int
	Rate       int
}

type OptionConfig

type OptionConfig struct {
	Option  string
	Enabled bool
}

func OptionConfigs

func OptionConfigs(in map[string]bool) []OptionConfig

type SharedInfo

type SharedInfo struct {
	// Add accept-proxy to bind statements
	AcceptProxy           bool
	DefaultBackend        *Backend
	CORSConfig            CORSConfig
	ProxyBodySize         string
	EnableHSTS            bool
	HSTSMaxAge            int
	HSTSPreload           bool
	HSTSIncludeSubDomains bool
	WhitelistSourceRange  string
	MaxConnections        int
	UseNodePort           bool
	Limit                 *Limit
	HardStopAfter         string
}

type StatsInfo

type StatsInfo struct {
	Port     int
	Username string
	PassWord string
}

type TCPHost

type TCPHost struct {
	Host    string
	Backend *Backend
}

type TCPService

type TCPService struct {
	*SharedInfo

	FrontendName  string
	Address       string
	Port          string
	FrontendRules []string
	OffloadSSL    bool
	ALPNOptions   string
	Proto         string
	TLSAuth       *TLSAuth
	Hosts         []*TCPHost
}

type TLSAuth

type TLSAuth struct {
	CAFile       string
	CRLFile      string
	VerifyClient string
	Headers      []TLSHeader
	ErrorPage    string
	ErrorPath    string
}

type TLSHeader

type TLSHeader struct {
	Header string
	Value  string
}

func TLSHeaders

func TLSHeaders(in map[string]string) []TLSHeader

type TemplateData

type TemplateData struct {
	*SharedInfo
	TimeoutDefaults []TimeoutConfig
	OptionsDefaults []OptionConfig
	Stats           *StatsInfo
	DNSResolvers    []*api.DNSResolver
	HTTPService     []*HTTPService
	TCPService      []*TCPService
	ErrorFiles      []*ErrorFile
	UserLists       []UserList
}

func (*TemplateData) Canonicalize

func (td *TemplateData) Canonicalize()

func (*TemplateData) IsValid

func (td *TemplateData) IsValid() error

func (TemplateData) String

func (td TemplateData) String() string

func (TemplateData) UsesTLSAuth

func (td TemplateData) UsesTLSAuth() bool

type TimeoutConfig

type TimeoutConfig struct {
	Phase    string
	Duration string
}

func TimeOutConfigs

func TimeOutConfigs(in map[string]string) []TimeoutConfig

type UserList

type UserList struct {
	Name  string
	Users []AuthUser
}

Source Files

Jump to

Keyboard shortcuts

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