config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmqpLoggingConfiguration

type AmqpLoggingConfiguration struct {
	Uri        string `json:"uri"`
	Exchange   string `json:"exchange"`
	UnsafeOnly bool   `json:"unsafe_only"`
}

type ApacheLoggingConfiguration

type ApacheLoggingConfiguration struct {
	Filename string `json:"filename"`
}

type Application

type Application struct {
	Routing      Routing         `json:"routing"`
	Backend      Backend         `json:"backend"`
	Auth         ApplicationAuth `json:"auth"`
	Caching      Caching         `json:"caching"`
	RateLimiting bool            `json:"rate_limiting"`
}

type ApplicationAuth

type ApplicationAuth struct {
	Disable bool             `json:"disable"`
	Writer  AuthWriterConfig `json:"writer"`
}

type AuthWriterConfig

type AuthWriterConfig struct {
	Mode string `json:"mode"`
	Name string `json:"name"`
}

type Backend

type Backend struct {
	Url      string `json:"url"`
	Service  string `json:"service"`
	Tag      string `json:"tag"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type Caching

type Caching struct {
	Enabled   bool `json:"enabled"`
	Ttl       int  `json:"ttl"`
	AutoFlush bool `json:"auto_flush"`
}

type Configuration

type Configuration struct {
	Applications   map[string]Application `json:"applications"`
	RateLimiting   RateLimiting           `json:"rate_limiting"`
	Authentication GlobalAuth             `json:"authentication"`
	Consul         ConsulConfiguration    `json:"consul"`
	Proxy          ProxyConfiguration     `json:"proxy"`
	Redis          RedisConfiguration     `json:"redis"`
	Logging        []LoggingConfiguration `json:"logging"`
}

type ConsulConfiguration

type ConsulConfiguration struct {
	Host       string `json:"host"`
	Port       int    `json:"port"`
	DataCenter string `json:"datacenter"`
}

func (ConsulConfiguration) Address

func (c ConsulConfiguration) Address() string

type GlobalAuth

type GlobalAuth struct {
	Mode               string             `json:"mode"`
	ProviderConfig     ProviderAuthConfig `json:"provider"`
	VerificationKey    []byte             `json:"verification_key"`
	VerificationKeyUrl string             `json:"verification_key_url"`
	KeyCacheTtl        string             `json:"key_cache_ttl"`
	EnableCORS         bool               `json:"enable_cors"`
}

type LoggingConfiguration

type LoggingConfiguration struct {
	Type string `json:"type"`
	AmqpLoggingConfiguration
	ApacheLoggingConfiguration
}

type OptionsConfiguration

type OptionsConfiguration struct {
	Enabled bool `json:"enabled"`
	CORS    bool `json:"cors"`
}

type ProviderAuthConfig

type ProviderAuthConfig struct {
	Url                   string                 `json:"url"`
	Parameters            map[string]interface{} `json:"parameters"`
	PreAuthenticationHook string                 `json:"hook_pre_authentication"`
	AllowAuthentication   bool                   `json:"allow_authentication"`
	AuthenticationUri     string                 `json:"authentication_uri"`
	Service               string                 `json:"service"`
}

type ProxyConfiguration

type ProxyConfiguration struct {
	StripResponseHeaders map[string]bool      `json:"strip_res_headers"`
	SetResponseHeaders   map[string]string    `json:"set_res_headers"`
	SetRequestHeaders    map[string]string    `json:"set_req_headers"`
	OptionsConfiguration OptionsConfiguration `json:"options"`
}

type RateLimiting

type RateLimiting struct {
	Burst  int    `json:"burst"`
	Window string `json:"window"`
}

type RedisConfiguration

type RedisConfiguration struct {
	Address  string `json:"address"`
	Password string `json:"password"`
	Database int    `json:"database"`
}

func (RedisConfiguration) DialOptions added in v1.1.1

func (c RedisConfiguration) DialOptions() []redis.DialOption

type Routing

type Routing struct {
	Type     string            `json:"type"`
	Path     string            `json:"path"`
	Patterns map[string]string `json:"patterns"`
	Hostname string            `json:"hostname"`
}

Jump to

Keyboard shortcuts

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