config

package
v2.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Instances []Instance
)

Functions

func ParseConfiguration

func ParseConfiguration()

func ValidateConfiguration

func ValidateConfiguration()

Types

type Instance

type Instance struct {
	Name        string `json:"name"`
	BaseUrl     string `json:"baseUrl"`
	HeaderKey   string `json:"headerKey"`
	HeaderValue string `json:"headerValue"`
}

func FindInstanceByName

func FindInstanceByName(name string) (*Instance, error)

func (*Instance) CreatePluginAtAnyLevel

func (i *Instance) CreatePluginAtAnyLevel(plugin *kong.Plugin) (*kong.Plugin, error)

func (*Instance) DeletePluginForRoute

func (i *Instance) DeletePluginForRoute(routeId *string, nameOrID *string) error

func (*Instance) DeletePluginForService

func (i *Instance) DeletePluginForService(serviceId *string, nameOrID *string) error

func (*Instance) FindConsumer

func (i *Instance) FindConsumer(nameOrId *string) (*kong.Consumer, error)

func (*Instance) FindRoute

func (i *Instance) FindRoute(service *kong.Service, nameOrId *string) (*kong.Route, error)

func (*Instance) FindService

func (i *Instance) FindService(nameOrId *string) (*kong.Service, error)

func (*Instance) GetClient

func (i *Instance) GetClient() (*kong.Client, error)

func (*Instance) GetRoutesForService

func (i *Instance) GetRoutesForService(serviceNameOrID *string) ([]*kong.Route, *kong.ListOpt, error)

func (*Instance) GetServices

func (i *Instance) GetServices() ([]*kong.Service, error)

func (*Instance) IsAuthenticated

func (i *Instance) IsAuthenticated() bool

func (*Instance) UpdatePluginForRoute

func (i *Instance) UpdatePluginForRoute(routeId *string, plugin *kong.Plugin) (*kong.Plugin, error)

func (*Instance) UpdatePluginForService

func (i *Instance) UpdatePluginForService(serviceId *string, plugin *kong.Plugin) (*kong.Plugin, error)

type Specification

type Specification struct {
	DiscoveryAttributesExcludesService []string `json:"discoveryAttributesExcludesService" split_words:"true" required:"false"`
	DiscoveryAttributesExcludesRoute   []string `json:"discoveryAttributesExcludesRoute" split_words:"true" required:"false"`
}

Specification is the configuration specification for the extension. Configuration values can be applied through environment variables. Learn more through the documentation of the envconfig package. https://github.com/kelseyhightower/envconfig

var (
	Config Specification
)

Jump to

Keyboard shortcuts

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