config

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminConfig added in v0.8.1

type AdminConfig struct {
	SuperUser *SuperUser `json:"superUser"`
}

AdminConfig holds configuration for the admin API.

type AuthConfig added in v0.8.1

type AuthConfig struct {
	Methods *AuthMethods `json:"methods"`
	Scheme  *AuthScheme  `json:"scheme"`
	Order   int          `json:"order"`
}

AuthConfig holds configuration for authentication and authorization.

type AuthMapping added in v0.8.1

type AuthMapping struct {
	Backend       string   `json:"backend"`
	Method        string   `json:"method"`
	Exempt        []string `json:"exempt"`
	Authorization *AuthZ   `json:"authorization"`
}

type AuthMethodBasic added in v0.8.1

type AuthMethodBasic struct{}

type AuthMethods added in v0.8.1

type AuthMethods struct {
	Basic *AuthMethodBasic `json:"basic"`
}

type AuthScheme added in v0.8.1

type AuthScheme struct {
	Mappings []*AuthMapping `json:"mappings"`
}

type AuthZ added in v0.8.1

type AuthZ struct {
	Groups []string            `json:"groups"`
	Paths  map[string][]string `json:"paths"`
}

type OASBackendMapping added in v0.8.1

type OASBackendMapping struct {
	Backend       string                 `json:"backend"`
	Specification string                 `json:"specification"`
	Options       *OASBackendMappingOpts `json:"options"`
}

type OASBackendMappingOpts added in v0.8.1

type OASBackendMappingOpts struct {
	ValidateBody bool `json:"validateBody"`
}

type OASConfig added in v0.8.1

type OASConfig struct {
	Order    int                  `json:"order"`
	Mappings []*OASBackendMapping `json:"mappings"`
}

OASConfig holds configuration for OAS-based request routing and validation.

type ObservabilityConfig added in v0.8.1

type ObservabilityConfig struct {
	Enabled        bool `json:"enabled"`
	RuntimeMetrics bool `json:"runtimeMetrics"`
}

ObservabilityConfig holds configuration for observability features.

type RootConfig added in v0.8.1

type RootConfig struct {
	*ObservabilityConfig `json:"observability"`
	*RouterConfig        `json:"router"`
	*AdminConfig         `json:"admin"`
	*OASConfig           `json:"oas,omitempty"`
	*AuthConfig          `json:"auth,omitempty"`
	// contains filtered or unexported fields
}

func New

func New() *RootConfig

func (*RootConfig) AuthEnabled added in v0.8.1

func (rc *RootConfig) AuthEnabled() bool

func (*RootConfig) Load added in v0.8.1

func (rc *RootConfig) Load(data []byte)

func (*RootConfig) OASEnabled added in v0.8.1

func (rc *RootConfig) OASEnabled() bool

func (*RootConfig) Parse added in v0.8.1

func (rc *RootConfig) Parse() error

type RouterBackend added in v0.8.1

type RouterBackend struct {
	Name string `json:"name"`
	Host string `json:"host"`
	Port int    `json:"port"`
}

type RouterConfig added in v0.8.1

type RouterConfig struct {
	Backends []*RouterBackend `json:"backends"`
}

RouterConfig holds configuration for the request router.

type SuperUser added in v0.8.1

type SuperUser struct {
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
}

Jump to

Keyboard shortcuts

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