model

package
v2.13.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name           string
	Domains        []string `` /* 137-byte string literal not displayed */
	Whitelist      []string `` /* 181-byte string literal not displayed */
	ConnectTimeout string   `key:"connectTimeout" constraint:"^[1-9]\\d*(ms|[smhdwMy])?$"`
	TCPTimeout     string   `key:"tcpTimeout" constraint:"^[1-9]\\d*(ms|[smhdwMy])?$"`
	ServiceIP      string
	CertMappings   map[string]string `` /* 168-byte string literal not displayed */
	Certificates   map[string]*Certificate
	Available      bool
	Maintenance    bool            `key:"maintenance" constraint:"(?i)^(true|false)$"`
	SSLConfig      *SSLConfig      `key:"ssl"`
	Nginx          *NginxAppConfig `key:"nginx"`
}

AppConfig encapsulates the configuration for all routes to a single back end.

type BuilderConfig

type BuilderConfig struct {
	ConnectTimeout string `key:"connectTimeout" constraint:"^[1-9]\\d*(ms|[smhdwMy])?$"`
	TCPTimeout     string `key:"tcpTimeout" constraint:"^[1-9]\\d*(ms|[smhdwMy])?$"`
	ServiceIP      string
}

BuilderConfig encapsulates the configuration of the deis-builder-- if it's in use.

type Certificate

type Certificate struct {
	Cert string
	Key  string
}

Certificate represents an SSL certificate for use in securing routable applications.

type GzipConfig

type GzipConfig struct {
	Enabled     bool   `key:"enabled" constraint:"(?i)^(true|false)$"`
	CompLevel   string `key:"compLevel" constraint:"^[1-9]$"`
	Disable     string `key:"disable"`
	HTTPVersion string `key:"httpVersion" constraint:"^(1\\.0|1\\.1)$"`
	MinLength   string `key:"minLength" constraint:"^\\d+$"`
	Proxied     string `key:"proxied" constraint:"^((off|expired|no-cache|no-store|private|no_last_modified|no_etag|auth|any)\\s*)+$"`
	Types       string `key:"types" constraint:"(?i)^([a-z\\d]+/[a-z\\d][a-z\\d+\\-\\.]*[a-z\\d]\\s*)+$"`
	Vary        string `key:"vary" constraint:"^(on|off)$"`
}

GzipConfig encapsulates gzip configuration.

type HSTSConfig

type HSTSConfig struct {
	Enabled           bool `key:"enabled" constraint:"(?i)^(true|false)$"`
	MaxAge            int  `key:"maxAge" constraint:"^[1-9]\\d*$"`
	IncludeSubDomains bool `key:"includeSubDomains" constraint:"(?i)^(true|false)$"`
	Preload           bool `key:"preload" constraint:"(?i)^(true|false)$"`
}

HSTSConfig represents configuration options having to do with HTTP Strict Transport Security.

type NginxAppConfig

type NginxAppConfig struct {
	ProxyBuffersConfig *ProxyBuffersConfig `key:"proxyBuffers"`
}

NginxAppConfig is a wrapper for all Nginx-specific app configurations. These options shouldn't be expected to be universally supported by alternative router implementations.

type ProxyBuffersConfig

type ProxyBuffersConfig struct {
	Enabled  bool   `key:"enabled" constraint:"(?i)^(true|false)$"`
	Number   int    `key:"number" constraint:"^[1-9]\\d*$"`
	Size     string `key:"size" constraint:"^[1-9]\\d*[kKmM]?$"`
	BusySize string `key:"busySize" constraint:"^[1-9]\\d*[kKmM]?$"`
}

ProxyBuffersConfig represents configuration options having to do with Nginx proxy buffers.

type RouterConfig

type RouterConfig struct {
	WorkerProcesses          string      `key:"workerProcesses" constraint:"^(auto|[1-9]\\d*)$"`
	MaxWorkerConnections     string      `key:"maxWorkerConnections" constraint:"^[1-9]\\d*$"`
	TrafficStatusZoneSize    string      `key:"trafficStatusZoneSize" constraint:"^[1-9]\\d*[kKmM]?$"`
	DefaultTimeout           string      `key:"defaultTimeout" constraint:"^[1-9]\\d*(ms|[smhdwMy])?$"`
	ServerNameHashMaxSize    string      `key:"serverNameHashMaxSize" constraint:"^[1-9]\\d*[kKmM]?$"`
	ServerNameHashBucketSize string      `key:"serverNameHashBucketSize" constraint:"^[1-9]\\d*[kKmM]?$"`
	GzipConfig               *GzipConfig `key:"gzip"`
	BodySize                 string      `key:"bodySize" constraint:"^[0-9]\\d*[kKmM]?$"`
	ProxyRealIPCIDRs         []string    `` /* 188-byte string literal not displayed */
	ErrorLogLevel            string      `key:"errorLogLevel" constraint:"^(debug|info|notice|warn|error|crit|alert|emerg)$"`
	PlatformDomain           string      `key:"platformDomain" constraint:"(?i)^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z0-9]+(-*[a-z0-9]+)+$"`
	UseProxyProtocol         bool        `key:"useProxyProtocol" constraint:"(?i)^(true|false)$"`
	DisableServerTokens      bool        `key:"disableServerTokens" constraint:"(?i)^(true|false)$"`
	EnforceWhitelists        bool        `key:"enforceWhitelists" constraint:"(?i)^(true|false)$"`
	DefaultWhitelist         []string    `` /* 188-byte string literal not displayed */
	WhitelistMode            string      `key:"whitelistMode" constraint:"^(extend|override)$"`
	DefaultServiceIP         string      `key:"defaultServiceIP"`
	DefaultAppName           string      `key:"defaultAppName"`
	DefaultServiceEnabled    bool        `key:"defaultServiceEnabled" constraint:"(?i)^(true|false)$"`
	RequestIDs               bool        `key:"requestIDs" constraint:"(?i)^(true|false)$"`
	SSLConfig                *SSLConfig  `key:"ssl"`
	AppConfigs               []*AppConfig
	BuilderConfig            *BuilderConfig
	PlatformCertificate      *Certificate
	HTTP2Enabled             bool                `key:"http2Enabled" constraint:"(?i)^(true|false)$"`
	LogFormat                string              `key:"logFormat"`
	ProxyBuffersConfig       *ProxyBuffersConfig `key:"proxyBuffers"`
}

RouterConfig is the primary type used to encapsulate all router configuration.

func Build

func Build(kubeClient *kubernetes.Clientset) (*RouterConfig, error)

Build creates a RouterConfig configuration object by querying the k8s API for relevant metadata concerning itself and all routable services.

type SSLConfig

type SSLConfig struct {
	Enforce           bool        `key:"enforce" constraint:"(?i)^(true|false)$"`
	Protocols         string      `key:"protocols" constraint:"^((SSLv2|SSLv3|TLSv1|TLSv1\\.1|TLSv1\\.2)\\s*)+$"`
	Ciphers           string      `key:"ciphers" constraint:"^(!?[A-Z][A-Z\\d\\+-]+:?)*$"`
	SessionCache      string      `key:"sessionCache" constraint:"^(off|none|((builtin(:[1-9]\\d*)?|shared:\\w+:[1-9]\\d*[kKmM]?)\\s*){1,2})$"`
	SessionTimeout    string      `key:"sessionTimeout" constraint:"^[1-9]\\d*(ms|[smhdwMy])?$"`
	UseSessionTickets bool        `key:"useSessionTickets" constraint:"(?i)^(true|false)$"`
	BufferSize        string      `key:"bufferSize" constraint:"^[1-9]\\d*[kKmM]?$"`
	HSTSConfig        *HSTSConfig `key:"hsts"`
	DHParam           string
}

SSLConfig represents SSL-related configuration options.

Jump to

Keyboard shortcuts

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