config

package
v0.0.1-alpha4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCombinedHelmRepositories

func InitCombinedHelmRepositories(defaultRepos, extraRepos []HelmRepository)

InitCombinedHelmRepositories initializes the combined list of default and extra repositories.

Types

type Config

type Config struct {
	HTTP           *HTTPConfig       `mapstructure:"http"`
	SSHClient      *ssh.Client       `mapstructure:"ssh"`
	ExtraHelmRepos *[]HelmRepository `mapstructure:"extraHelmRepos"`
	LogLevel       string            `mapstructure:"logLevel"`
	Kubeconfig     string            `mapstructure:"kubeconfig"`
}

Config is the configuration for the app

func Load

func Load(c *cli.Context) (*Config, error)

type HTTPAuthConfig

type HTTPAuthConfig struct {
	Basic *HTTPBasicAuthConfig `mapstructure:"basic" json:"basic"`
	JWT   *HTTPJWTAuthConfig   `mapstructure:"jwt" json:"jwt"`
	Type  string               `mapstructure:"type" json:"type"`
}

HTTPAuthConfig is the configuration for HTTP authentication

type HTTPBasicAuthConfig

type HTTPBasicAuthConfig struct {
	Username string `mapstructure:"username" json:"username"`
	Password string `mapstructure:"password" json:"password"`
}

HTTPBasicAuthConfig is the configuration for HTTP basic authentication

type HTTPConfig

type HTTPConfig struct {
	CORS      *HTTPCorsConfig `mapstructure:"cors"`
	Auth      *HTTPAuthConfig `mapstructure:"auth"`
	Port      int             `mapstructure:"port"`
	EnableLog bool            `mapstructure:"enableLog"`
}

HTTPConfig is the configuration for the HTTP server

type HTTPCorsConfig

type HTTPCorsConfig struct {
	AllowOrigins []string `mapstructure:"allowOrigins"`
	Enabled      bool     `mapstructure:"enabled"`
}

HTTPCorsConfig is the configuration for CORS

type HTTPJWTAuthConfig

type HTTPJWTAuthConfig struct {
	Issuer      string `mapstructure:"issuer" json:"issuer"`
	ClientID    string `mapstructure:"clientId" json:"clientId"`
	JWKEndpoint string `mapstructure:"jwkEndpoint" json:"jwkEndpoint"`
}

HTTPJWTAuthConfig is the configuration for HTTP JWT authentication

type HelmRepository

type HelmRepository struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

HelmRepository represents a Helm chart repository.

func GetCombinedHelmRepositories

func GetCombinedHelmRepositories() []HelmRepository

GetCombinedHelmRepositories returns the combined list of default and extra repositories.

func GetDefaulHelmRepositories

func GetDefaulHelmRepositories() []HelmRepository

GetDefaulHelmRepositories returns the default list of repositories.

Jump to

Keyboard shortcuts

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