config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service
	Service Service         `yaml:"-"`
	Tracing *Tracing        `yaml:"tracing"`
	Log     *Log            `yaml:"log"`
	Debug   Debug           `yaml:"debug"`

	GRPC GRPCConfig `yaml:"grpc"`

	TokenManager *TokenManager `yaml:"token_manager"`
	Reva         *shared.Reva  `yaml:"reva"`

	SkipUserGroupsInToken bool `` /* 182-byte string literal not displayed */

	Driver  string  `` /* 168-byte string literal not displayed */
	Drivers Drivers `yaml:"drivers"`

	Context context.Context `yaml:"-"`
}

type Debug

type Debug struct {
	Addr   string `` /* 170-byte string literal not displayed */
	Token  string `yaml:"token" env:"USERS_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint." introductionVersion:"1.0.0"`
	Pprof  bool   `yaml:"pprof" env:"USERS_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling." introductionVersion:"1.0.0"`
	Zpages bool   `` /* 152-byte string literal not displayed */
}

type Drivers

type Drivers struct {
	LDAP        LDAPDriver        `yaml:"ldap"`
	OwnCloudSQL OwnCloudSQLDriver `yaml:"owncloudsql"`

	JSON JSONDriver   `yaml:"json,omitempty"` // not supported by the OpenCloud product, therefore not part of docs
	REST RESTProvider `yaml:"rest,omitempty"` // not supported by the OpenCloud product, therefore not part of docs
}

type GRPCConfig

type GRPCConfig struct {
	Addr      string                 `yaml:"addr" env:"USERS_GRPC_ADDR" desc:"The bind address of the GRPC service." introductionVersion:"1.0.0"`
	TLS       *shared.GRPCServiceTLS `yaml:"tls"`
	Namespace string                 `yaml:"-"`
	Protocol  string                 `` /* 137-byte string literal not displayed */
}

type JSONDriver

type JSONDriver struct {
	File string `yaml:"file"`
}

type LDAPDriver

type LDAPDriver struct {
	URI                      string          `` /* 167-byte string literal not displayed */
	CACert                   string          `` /* 281-byte string literal not displayed */
	Insecure                 bool            `` /* 198-byte string literal not displayed */
	BindDN                   string          `` /* 165-byte string literal not displayed */
	BindPassword             string          `` /* 158-byte string literal not displayed */
	UserBaseDN               string          `` /* 147-byte string literal not displayed */
	GroupBaseDN              string          `` /* 151-byte string literal not displayed */
	UserScope                string          `` /* 193-byte string literal not displayed */
	GroupScope               string          `` /* 197-byte string literal not displayed */
	UserSubstringFilterType  string          `` /* 358-byte string literal not displayed */
	UserFilter               string          `` /* 196-byte string literal not displayed */
	GroupFilter              string          `` /* 167-byte string literal not displayed */
	UserObjectClass          string          `` /* 208-byte string literal not displayed */
	GroupObjectClass         string          `` /* 212-byte string literal not displayed */
	IDP                      string          `` /* 203-byte string literal not displayed */
	DisableUserMechanism     string          `` /* 466-byte string literal not displayed */
	UserTypeAttribute        string          `` /* 226-byte string literal not displayed */
	LdapDisabledUsersGroupDN string          `` /* 280-byte string literal not displayed */
	UserSchema               LDAPUserSchema  `yaml:"user_schema"`
	GroupSchema              LDAPGroupSchema `yaml:"group_schema"`
}

type LDAPGroupSchema

type LDAPGroupSchema struct {
	ID              string `` /* 208-byte string literal not displayed */
	IDIsOctetString bool   `` /* 337-byte string literal not displayed */
	Mail            string `` /* 177-byte string literal not displayed */
	DisplayName     string `` /* 222-byte string literal not displayed */
	Groupname       string `` /* 169-byte string literal not displayed */
	Member          string `` /* 160-byte string literal not displayed */
}

type LDAPUserSchema

type LDAPUserSchema struct {
	ID              string `` /* 205-byte string literal not displayed */
	IDIsOctetString bool   `` /* 333-byte string literal not displayed */
	Mail            string `` /* 159-byte string literal not displayed */
	DisplayName     string `` /* 179-byte string literal not displayed */
	Username        string `` /* 163-byte string literal not displayed */
	Enabled         string `` /* 201-byte string literal not displayed */
}

type Log

type Log struct {
	Level  string `` /* 176-byte string literal not displayed */
	Pretty bool   `yaml:"pretty" env:"OC_LOG_PRETTY;USERS_LOG_PRETTY" desc:"Activates pretty log output." introductionVersion:"1.0.0"`
	Color  bool   `yaml:"color" env:"OC_LOG_COLOR;USERS_LOG_COLOR" desc:"Activates colorized log output." introductionVersion:"1.0.0"`
	File   string `` /* 144-byte string literal not displayed */
}

type OwnCloudSQLDriver

type OwnCloudSQLDriver struct {
	DBUsername         string `` /* 157-byte string literal not displayed */
	DBPassword         string `yaml:"db_password" env:"USERS_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database user." introductionVersion:"1.0.0"`
	DBHost             string `yaml:"db_host" env:"USERS_OWNCLOUDSQL_DB_HOST" desc:"Hostname of the database server." introductionVersion:"1.0.0"`
	DBPort             int    `` /* 130-byte string literal not displayed */
	DBName             string `yaml:"db_name" env:"USERS_OWNCLOUDSQL_DB_NAME" desc:"Name of the owncloud database." introductionVersion:"1.0.0"`
	IDP                string `` /* 189-byte string literal not displayed */
	Nobody             int64  `` /* 146-byte string literal not displayed */
	JoinUsername       bool   `` /* 142-byte string literal not displayed */
	JoinOwnCloudUUID   bool   `` /* 152-byte string literal not displayed */
	EnableMedialSearch bool   `` /* 247-byte string literal not displayed */
}

type RESTProvider

type RESTProvider struct {
	ClientID          string
	ClientSecret      string
	RedisAddr         string
	RedisUsername     string
	RedisPassword     string
	IDProvider        string
	APIBaseURL        string
	OIDCTokenEndpoint string
	TargetAPI         string
}

type Service

type Service struct {
	Name string `yaml:"-"`
}

type TokenManager

type TokenManager struct {
	JWTSecret string `` /* 133-byte string literal not displayed */
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OC_TRACING_ENABLED;USERS_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 208-byte string literal not displayed */
	Endpoint  string `` /* 134-byte string literal not displayed */
	Collector string `` /* 254-byte string literal not displayed */
}

Tracing defines the configuration options for tracing.

func (Tracing) Convert

func (t Tracing) Convert() tracing.Config

Convert Tracing to the tracing package's Config struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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