config

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Datastore   string   `ocisConfig:"datastore"`
	BaseDN      string   `ocisConfig:"base_dn"`
	Insecure    bool     `ocisConfig:"insecure"`
	NameFormat  string   `ocisConfig:"name_format"`
	GroupFormat string   `ocisConfig:"group_format"`
	Servers     []string `ocisConfig:"servers"`
	SSHKeyAttr  string   `ocisConfig:"ssh_key_attr"`
	UseGraphAPI bool     `ocisConfig:"use_graph_api"`
}

Backend defined the available backend configuration.

type Config

type Config struct {
	*shared.Commons

	Service Service

	Tracing *Tracing `ocisConfig:"tracing"`
	Log     *Log     `ocisConfig:"log"`
	Debug   Debug    `ocisConfig:"debug"`

	Ldap  Ldap  `ocisConfig:"ldap"`
	Ldaps Ldaps `ocisConfig:"ldaps"`

	Backend  Backend         `ocisConfig:"backend"`
	Fallback FallbackBackend `ocisConfig:"fallback"`

	RoleBundleUUID string `ocisConfig:"role_bundle_uuid" env:"GLAUTH_ROLE_BUNDLE_ID"`

	Context context.Context
}

Config combines all available configuration parts.

func DefaultConfig added in v1.16.0

func DefaultConfig() *Config

type Debug

type Debug struct {
	Addr   string `ocisConfig:"addr" env:"GLAUTH_DEBUG_ADDR"`
	Token  string `ocisConfig:"token" env:"GLAUTH_DEBUG_TOKEN"`
	Pprof  bool   `ocisConfig:"pprof" env:"GLAUTH_DEBUG_PPROF"`
	Zpages bool   `ocisConfig:"zpages" env:"GLAUTH_DEBUG_ZPAGES"`
}

Debug defines the available debug configuration.

type FallbackBackend added in v1.17.0

type FallbackBackend struct {
	Datastore   string   `ocisConfig:"datastore"`
	BaseDN      string   `ocisConfig:"base_dn"`
	Insecure    bool     `ocisConfig:"insecure"`
	NameFormat  string   `ocisConfig:"name_format"`
	GroupFormat string   `ocisConfig:"group_format"`
	Servers     []string `ocisConfig:"servers"`
	SSHKeyAttr  string   `ocisConfig:"ssh_key_attr"`
	UseGraphAPI bool     `ocisConfig:"use_graph_api"`
}

FallbackBackend defined the available fallback backend configuration.

type Ldap

type Ldap struct {
	Enabled   bool   `ocisConfig:"enabled" env:"GLAUTH_LDAP_ENABLED"`
	Addr      string `ocisConfig:"addr" env:"GLAUTH_LDAP_ADDR"`
	Namespace string
}

Ldap defines the available LDAP configuration.

type Ldaps

type Ldaps struct {
	Enabled   bool   `ocisConfig:"enabled" env:"GLAUTH_LDAPS_ENABLED"`
	Addr      string `ocisConfig:"addr" env:"GLAUTH_LDAPS_ADDR"`
	Namespace string
	Cert      string `ocisConfig:"cert" env:"GLAUTH_LDAPS_CERT"`
	Key       string `ocisConfig:"key" env:"GLAUTH_LDAPS_KEY"`
}

Ldaps defined the available LDAPS configuration.

type Log

type Log struct {
	Level  string `mapstructure:"level" env:"OCIS_LOG_LEVEL;GLAUTH_LOG_LEVEL"`
	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;GLAUTH_LOG_PRETTY"`
	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;GLAUTH_LOG_COLOR"`
	File   string `mapstructure:"file" env:"OCIS_LOG_FILE;GLAUTH_LOG_FILE"`
}

Log defines the available log configuration.

type Service added in v1.17.0

type Service struct {
	Name string
}

Service defines the available service configuration.

type Tracing

type Tracing struct {
	Enabled   bool   `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;GLAUTH_TRACING_ENABLED"`
	Type      string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;GLAUTH_TRACING_TYPE"`
	Endpoint  string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;GLAUTH_TRACING_ENDPOINT"`
	Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;GLAUTH_TRACING_COLLECTOR"`
}

Tracing defines the available tracing configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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