config

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadClusterConfig added in v0.0.5

func LoadClusterConfig() (armometadata.ClusterConfig, error)

func LoadServiceURLs added in v0.0.5

func LoadServiceURLs(filePath string) (schema.IBackendServices, error)

Types

type AuthenticationServerConfig added in v0.0.5

type AuthenticationServerConfig struct {
	Url                       string            `mapstructure:"url"`
	HeaderToQueryParamMapping map[string]string `mapstructure:"headerToQueryParamMapping"`
	HeaderToHeaderMapping     map[string]string `mapstructure:"headerToHeaderMapping"`
}

type Backend

type Backend struct {
	AuthenticationServer *AuthenticationServerConfig `mapstructure:"authenticationServer"`
	Subscription         string                      `mapstructure:"subscription"`
	PulsarConfig         *pulsarconfig.PulsarConfig  `mapstructure:"pulsarConfig"`
	Topic                pulsarconnector.TopicName   `mapstructure:"topic"`
}

type Config

type Config struct {
	Backend   Backend   `mapstructure:"backend"`
	InCluster InCluster `mapstructure:"inCluster"`
}

func LoadConfig

func LoadConfig(path string) (Config, error)

LoadConfig reads configuration from file or environment variables.

type InCluster

type InCluster struct {
	ServerUrl   string     `mapstructure:"serverUrl"`
	ClusterName string     `mapstructure:"clusterName"`
	Account     string     `mapstructure:"account"`
	AccessKey   string     `mapstructure:"accessKey"`
	Resources   []Resource `mapstructure:"resources"`
}

func (*InCluster) ValidateConfig added in v0.0.5

func (c *InCluster) ValidateConfig()

type Resource

type Resource struct {
	Group    string          `mapstructure:"group"`
	Version  string          `mapstructure:"version"`
	Resource string          `mapstructure:"resource"`
	Strategy domain.Strategy `mapstructure:"strategy"`
}

func (Resource) String

func (r Resource) String() string

Kind returns group/version/resource as a string.

Jump to

Keyboard shortcuts

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