settings

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptySettings

type EmptySettings struct {
}

func (*EmptySettings) GetBoolOption added in v0.9.6

func (empty *EmptySettings) GetBoolOption(_ string, defaultValue bool) bool

func (*EmptySettings) GetStringOption added in v0.9.6

func (empty *EmptySettings) GetStringOption(string) string

func (*EmptySettings) IsToggleOff

func (empty *EmptySettings) IsToggleOff(string) bool

func (*EmptySettings) IsToggleOn

func (empty *EmptySettings) IsToggleOn(string) bool

func (*EmptySettings) ResponseHeaders

func (empty *EmptySettings) ResponseHeaders() map[string]string

func (*EmptySettings) StaticMappings added in v0.5.0

func (empty *EmptySettings) StaticMappings() map[string]string

func (*EmptySettings) Transport added in v0.9.6

func (empty *EmptySettings) Transport() TransportSettings

func (*EmptySettings) Variable

func (empty *EmptySettings) Variable(string) *string

type RouteSettings

type RouteSettings interface {
	Variable(name string) *string
	IsToggleOn(name string) bool
	IsToggleOff(name string) bool
	ResponseHeaders() map[string]string
	StaticMappings() map[string]string
	Transport() TransportSettings
	GetStringOption(name string) string
	GetBoolOption(name string, defaultValue bool) bool
}

func GetSettings

func GetSettings() RouteSettings

type TlsConfig added in v0.9.6

type TlsConfig struct {
	Enabled    *bool  `json:"enabled,omitempty"`
	PublicKey  string `json:"public-key,omitempty"`
	PrivateKey string `json:"private-key,omitempty"`
}

type TransportSettings added in v0.9.6

type TransportSettings struct {
	Port int        `json:"port"`
	Tls  *TlsConfig `json:"tls,omitempty"`
}

Jump to

Keyboard shortcuts

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