config

package
v1.16.0-rc2 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: 2 Imported by: 2

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 Config

type Config struct {
	*shared.Commons

	File         string       `ocisConfig:"file"`
	Log          *shared.Log  `ocisConfig:"log"`
	Debug        Debug        `ocisConfig:"debug"`
	HTTP         HTTP         `ocisConfig:"http"`
	Server       Server       `ocisConfig:"server"`
	Tracing      Tracing      `ocisConfig:"tracing"`
	Reva         Reva         `ocisConfig:"reva"`
	TokenManager TokenManager `ocisConfig:"token_manager"`
	Spaces       Spaces       `ocisConfig:"spaces"`
	Identity     Identity     `ocisConfig:"identity"`

	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"`
	Namespace string `ocisConfig:"namespace"`
	Root      string `ocisConfig:"root"`
}

HTTP defines the available http configuration.

type Identity added in v1.16.0

type Identity struct {
	Backend string `ocisConfig:"backend"`
	LDAP    LDAP   `ocisConfig:"ldap"`
}

type LDAP added in v1.16.0

type LDAP struct {
	URI          string `ocisConfig:"uri"`
	BindDN       string `ocisConfig:"bind_dn"`
	BindPassword string `ocisConfig:"bind_password"`

	UserBaseDN               string `ocisConfig:"user_base_dn"`
	UserSearchScope          string `ocisConfig:"user_search_scope"`
	UserFilter               string `ocisConfig:"user_filter"`
	UserEmailAttribute       string `ocisConfig:"user_mail_attribute"`
	UserDisplayNameAttribute string `ocisConfig:"user_displayname_attribute"`
	UserNameAttribute        string `ocisConfig:"user_name_attribute"`
	UserIDAttribute          string `ocisConfig:"user_id_attribute"`

	GroupBaseDN        string `ocisConfig:"group_base_dn"`
	GroupSearchScope   string `ocisConfig:"group_search_scope"`
	GroupFilter        string `ocisConfig:"group_filter"`
	GroupNameAttribute string `ocisConfig:"group_name_attribute"`
	GroupIDAttribute   string `ocisConfig:"group_id_attribute"`
}

type Reva

type Reva struct {
	Address string `ocisConfig:"address"`
}

Reva defines all available REVA configuration.

type Server

type Server struct {
	Version string `ocisConfig:"version"`
	Name    string `ocisConfig:"name"`
}

Server configures a server.

type Spaces

type Spaces struct {
	WebDavBase   string `ocisConfig:"webdav_base"`
	WebDavPath   string `ocisConfig:"webdav_path"`
	DefaultQuota string `ocisConfig:"default_quota"`
}

type TokenManager

type TokenManager struct {
	JWTSecret string `ocisConfig:"jwt_secret"`
}

TokenManager is the config for using the reva token manager

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