config

package
v0.4.0-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnableDebug

func GetEnableDebug() bool

func GetIdentity

func GetIdentity() spiffeid.ID

func GetInsecureSkipVerify

func GetInsecureSkipVerify() bool

func GetLastAuthRules

func GetLastAuthRules() []string

func GetLogFileConfig

func GetLogFileConfig() (bool, string)

func GetMetricsEnabled

func GetMetricsEnabled() bool

func GetMtlsEnable

func GetMtlsEnable() bool

func GetPathCAFile

func GetPathCAFile() string

func GetPathCertFile

func GetPathCertFile() string

func GetPathKeyFile

func GetPathKeyFile() string

func GetPrometheusHTTPConfig

func GetPrometheusHTTPConfig() (bool, int)

func GetServerSideFlag

func GetServerSideFlag() bool

func SetIdentity

func SetIdentity(id spiffeid.ID)

func SetLastAuthRules

func SetLastAuthRules(spiffeURI []string)

func SetMtlsEnable

func SetMtlsEnable(flag bool)

func SetServerSideFlag

func SetServerSideFlag(f bool)

Types

type AccessConfigs

type AccessConfigs struct {
	Path string `mapstructure:"path"`
}

type AuthzConfig

type AuthzConfig struct {
	Quicsec AuthzQuicsecConfig `json:"quicsec"`
}

AuthzConfig struct to parse the authz json file

type AuthzConfigs

type AuthzConfigs struct {
	SpiffeID []string
}

type AuthzQuicsecConfig

type AuthzQuicsecConfig struct {
	AuthzRules []string `json:"authz_rules"`
}

type CertificatesConfigs

type CertificatesConfigs struct {
	CaPath   string `mapstructure:"ca_path"`
	KeyPath  string `mapstructure:"key_path"`
	CertPath string `mapstructure:"cert_path"`
}

Identity Manager identityManager - certificates

type Config

type Config struct {
	Log      LogConfigs
	HTTP     HttpConfigs
	Quic     QuicConfigs
	Metrics  MetricsConfigs
	Certs    CertificatesConfigs
	Security SecurityConfigs
	Local    LocalConfigs
}

func LoadConfig

func LoadConfig() Config

func (Config) ShowConfig

func (c Config) ShowConfig()

type HttpConfigs

type HttpConfigs struct {
	Access AccessConfigs `mapstructure:"access"`
}

type LocalConfigs

type LocalConfigs struct {
	// Identity (x509)
	Identity spiffeid.ID

	// Server=1/Client=0
	ServerSideFlag bool
}

LocalConfigs

type LogConfigs

type LogConfigs struct {
	LogOutputFileFlag       bool
	LogAccessOutputFileFlag bool
	Debug                   bool   `mapstructure:"debug"`
	Path                    string `mapstructure:"path"`
}

opsManager - logs

type MetricsConfigs

type MetricsConfigs struct {
	BindEnableFlag bool
	Enable         bool `mapstructure:"enable"`
	BindPort       int  `mapstructure:"bind_port"`
}

Operations Manager opsManager - metrics

type MtlsConfig

type MtlsConfig struct {
	Enable          bool
	InsecSkipVerify bool `mapstructure:"insec_skip_verify"`
	Authz           AuthzConfigs
}

type QuicConfigs

type QuicConfigs struct {
	Debug QuicDebugConfigs `mapstructure:"debug"`
}

opsManager - shared secret dump

type QuicDebugConfigs

type QuicDebugConfigs struct {
	SecretFilePathEnableFlag bool
	QlogEnableFlag           bool
	SecretFilePath           string `mapstructure:"secret_path"`
	QlogDirPath              string `mapstructure:"qlog_path"`
}

opsManager - shared secret dump

type SecurityConfigs

type SecurityConfigs struct {
	Mtls MtlsConfig
}

Jump to

Keyboard shortcuts

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