config

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Vault = "vault"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationInfo

type AuthenticationInfo struct {
	AuthType  string
	AuthToken string
}

AuthenticationInfo contains authentication information to be used when communicating with an HTTP based provider

type BootstrapConfiguration

type BootstrapConfiguration struct {
	Service *ServiceInfo
}

BootstrapConfiguration defines the configuration elements required by the bootstrap.

type GeneralConfiguration

type GeneralConfiguration struct {
	LogLevel        string
	Service         ServiceInfo
	SecretStore     SecretStoreInfo
	InsecureSecrets InsecureSecrets
	Mqtt5Configs    Mqtt5Configs
}

func (*GeneralConfiguration) GetBootstrap added in v1.0.4

func (c *GeneralConfiguration) GetBootstrap() BootstrapConfiguration

GetBootstrap returns the configuration elements required by the bootstrap.

func (*GeneralConfiguration) GetInsecureSecrets added in v1.0.4

func (c *GeneralConfiguration) GetInsecureSecrets() InsecureSecrets

GetInsecureSecrets gets the config.InsecureSecrets field from the ConfigurationStruct.

func (*GeneralConfiguration) GetLogLevel added in v1.0.4

func (c *GeneralConfiguration) GetLogLevel() string

GetLogLevel returns the current ConfigurationStruct's log level.

func (*GeneralConfiguration) GetMqtt5Configs added in v1.0.4

func (c *GeneralConfiguration) GetMqtt5Configs() Mqtt5Configs

GetMqtt5Configs gets the config.Mqtt5Configs from the configuration struct.

type InsecureSecrets

type InsecureSecrets map[string]InsecureSecretsInfo

InsecureSecrets is used to hold the secrets stored in the configuration

type InsecureSecretsInfo

type InsecureSecretsInfo struct {
	SecretName string
	SecretData map[string]string
}

InsecureSecretsInfo encapsulates info used to retrieve insecure secrets

type Mqtt5Configs added in v1.0.4

type Mqtt5Configs map[string]models.Mqtt5Config

type SecretStoreInfo

type SecretStoreInfo struct {
	Type           string
	Host           string
	Port           int
	StoreName      string
	Protocol       string
	Namespace      string
	RootCaCertPath string
	ServerName     string
	Authentication AuthenticationInfo
	// TokenFile provides a location to a token file.
	TokenFile string
	// SecretsFile is optional Path to JSON file containing secrets to seed into service's SecretStore
	SecretsFile string
	// DisableScrubSecretsFile specifies to not scrub secrets file after importing. Service will fail start-up if
	// not disabled and file can not be written.
	DisableScrubSecretsFile bool
}

SecretStoreInfo encapsulates configuration properties used to create a SecretClient.

type SecretsSetupInfo added in v1.0.29

type SecretsSetupInfo struct {
	// CertConfig is used for auto-generating the TLS certificates when user didn't specify the TLS_KEY_PATH and TLS_CERT_PATH
	CertConfig string
	// CertOutputDir indicates the folder for auto-generated TLS certificates
	CertOutputDir string
}

SecretsSetupInfo encapsulates the configuration used to auto-generate TLS certificates This is not a general config for all services. Only services that require auto-generated TLS certificates need this config.

type ServiceInfo

type ServiceInfo struct {
	// Host is the hostname or IP address of the service.
	Host string
	// Port is the HTTP port of the service.
	Port int
	// ServerBindAddr specifies an IP address or hostname
	// for ListenAndServe to bind to, such as 0.0.0.0
	ServerBindAddr string
	// StartupMsg specifies a string to log once service
	// initialization and startup is completed.
	StartupMsg string
	// MaxResultCount specifies the maximum size list supported
	// in response to REST calls to other services.
	MaxResultCount int
	// MaxRequestSize defines the maximum size of http request body in kilobytes
	MaxRequestSize int64
	// RequestTimeout specifies a timeout (in ISO8601 format) for
	// processing REST request calls from other services.
	RequestTimeout string
}

ServiceInfo contains configuration settings necessary for the basic operation of any Edge service.

Jump to

Keyboard shortcuts

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