config

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv added in v1.16.0

func GetEnv(cfg *Config) []string

GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list with all the environment variables an extension supports.

func StructMappings added in v1.16.0

func StructMappings(cfg *Config) []shared.EnvBinding

StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets us propagate changes easier.

Types

type Asset

type Asset struct {
	Path string `ocisConfig:"asset"`
}

Asset defines the available asset configuration.

type Config

type Config struct {
	*shared.Commons

	File    string      `ocisConfig:"file"`
	Log     *shared.Log `ocisConfig:"log"`
	Debug   Debug       `ocisConfig:"debug"`
	HTTP    HTTP        `ocisConfig:"http"`
	Tracing Tracing     `ocisConfig:"tracing"`
	Asset   Asset       `ocisConfig:"asset"`
	IDP     Settings    `ocisConfig:"idp"`
	Ldap    Ldap        `ocisConfig:"ldap"`
	Service Service     `ocisConfig:"service"`

	Context    context.Context
	Supervised bool
}

Config combines all available configuration parts.

func DefaultConfig added in v1.16.0

func DefaultConfig() *Config

func New

func New() *Config

New initializes a new configuration with or without defaults.

type Debug

type Debug struct {
	Addr   string `ocisConfig:"addr"`
	Token  string `ocisConfig:"token"`
	Pprof  bool   `ocisConfig:"pprof"`
	Zpages bool   `ocisConfig:"zpages"`
}

Debug defines the available debug configuration.

type HTTP

type HTTP struct {
	Addr    string `ocisConfig:"addr"`
	Root    string `ocisConfig:"root"`
	TLSCert string `ocisConfig:"tls_cert"`
	TLSKey  string `ocisConfig:"tls_key"`
	TLS     bool   `ocisConfig:"tls"`
}

HTTP defines the available http configuration.

type Ldap

type Ldap struct {
	URI               string `ocisConfig:"uri"`
	BindDN            string `ocisConfig:"bind_dn"`
	BindPassword      string `ocisConfig:"bind_password"`
	BaseDN            string `ocisConfig:"base_dn"`
	Scope             string `ocisConfig:"scope"`
	LoginAttribute    string `ocisConfig:"login_attribute"`
	EmailAttribute    string `ocisConfig:"email_attribute"`
	NameAttribute     string `ocisConfig:"name_attribute"`
	UUIDAttribute     string `ocisConfig:"uuid_attribute"`
	UUIDAttributeType string `ocisConfig:"uuid_attribute_type"`
	Filter            string `ocisConfig:"filter"`
}

Ldap defines the available LDAP configuration.

type Service

type Service struct {
	Name      string `ocisConfig:"name"`
	Namespace string `ocisConfig:"namespace"`
	Version   string `ocisConfig:"version"`
}

Service defines the available service configuration.

type Settings added in v1.16.0

type Settings struct {
	Iss                               string   `ocisConfig:"iss"`
	IdentityManager                   string   `ocisConfig:"identity_manager"`
	URIBasePath                       string   `ocisConfig:"uri_base_path"`
	SignInURI                         string   `ocisConfig:"sign_in_uri"`
	SignedOutURI                      string   `ocisConfig:"signed_out_uri"`
	AuthorizationEndpointURI          string   `ocisConfig:"authorization_endpoint_uri"`
	EndsessionEndpointURI             string   `ocisConfig:"end_session_endpoint_uri"`
	Insecure                          bool     `ocisConfig:"insecure"`
	TrustedProxy                      []string `ocisConfig:"trusted_proxy"`
	AllowScope                        []string `ocisConfig:"allow_scope"`
	AllowClientGuests                 bool     `ocisConfig:"allow_client_guests"`
	AllowDynamicClientRegistration    bool     `ocisConfig:"allow_dynamic_client_registration"`
	EncryptionSecretFile              string   `ocisConfig:"encrypt_secret_file"`
	Listen                            string   `ocisConfig:"listen"`
	IdentifierClientDisabled          bool     `ocisConfig:"identifier_client_disabled"`
	IdentifierClientPath              string   `ocisConfig:"identifier_client_path"`
	IdentifierRegistrationConf        string   `ocisConfig:"identifier_registration_conf"`
	IdentifierScopesConf              string   `ocisConfig:"identifier_scopes_conf"`
	IdentifierDefaultSignInPageText   string   `ocisConfig:"identifier_default_sign_in_page_text"`
	IdentifierDefaultUsernameHintText string   `ocisConfig:"identifier_default_username_hint_text"`
	SigningKid                        string   `ocisConfig:"sign_in_kid"`
	SigningMethod                     string   `ocisConfig:"sign_in_method"`
	SigningPrivateKeyFiles            []string `ocisConfig:"sign_in_private_key_files"`
	ValidationKeysPath                string   `ocisConfig:"validation_keys_path"`
	CookieBackendURI                  string   `ocisConfig:"cookie_backend_uri"`
	CookieNames                       []string `ocisConfig:"cookie_names"`
	AccessTokenDurationSeconds        uint64   `ocisConfig:"access_token_duration_seconds"`
	IDTokenDurationSeconds            uint64   `ocisConfig:"id_token_duration_seconds"`
	RefreshTokenDurationSeconds       uint64   `ocisConfig:"refresh_token_duration_seconds"`
	DyamicClientSecretDurationSeconds uint64   `ocisConfig:"dynamic_client_secret_duration_seconds"`
}

type Tracing

type Tracing struct {
	Enabled   bool   `ocisConfig:"enabled"`
	Type      string `ocisConfig:"type"`
	Endpoint  string `ocisConfig:"endpoint"`
	Collector string `ocisConfig:"collector"`
	Service   string `ocisConfig:"service"`
}

Tracing defines the available tracing configuration.

Jump to

Keyboard shortcuts

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