config

package
v2.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 2 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         *Reva         `yaml:"reva"`

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

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

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

type Debug

type Debug struct {
	Addr   string `` /* 142-byte string literal not displayed */
	Token  string `yaml:"token" env:"USERS_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint"`
	Pprof  bool   `yaml:"pprof" env:"USERS_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling"`
	Zpages bool   `yaml:"zpages" env:"USERS_DEBUG_ZPAGES" desc:"Enables zpages, which can  be used for collecting and viewing traces in-me"`
}

type Drivers

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

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

type GRPCConfig

type GRPCConfig struct {
	Addr      string `yaml:"addr" env:"USERS_GRPC_ADDR" desc:"The address of the grpc service."`
	Namespace string `yaml:"-"`
	Protocol  string `yaml:"protocol" env:"USERS_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."`
}

type JSONDriver

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

type LDAPDriver

type LDAPDriver struct {
	URI              string          `` /* 136-byte string literal not displayed */
	CACert           string          `` /* 189-byte string literal not displayed */
	Insecure         bool            `` /* 167-byte string literal not displayed */
	BindDN           string          `` /* 134-byte string literal not displayed */
	BindPassword     string          `` /* 127-byte string literal not displayed */
	UserBaseDN       string          `yaml:"user_base_dn" env:"LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN" desc:"Search base DN for looking up LDAP users."`
	GroupBaseDN      string          `yaml:"group_base_dn" env:"LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN" desc:"Search base DN for looking up LDAP groups."`
	UserScope        string          `` /* 139-byte string literal not displayed */
	GroupScope       string          `` /* 143-byte string literal not displayed */
	UserFilter       string          `` /* 162-byte string literal not displayed */
	GroupFilter      string          `` /* 136-byte string literal not displayed */
	UserObjectClass  string          `` /* 174-byte string literal not displayed */
	GroupObjectClass string          `` /* 179-byte string literal not displayed */
	IDP              string          `` /* 179-byte string literal not displayed */
	UserSchema       LDAPUserSchema  `yaml:"user_schema"`
	GroupSchema      LDAPGroupSchema `yaml:"group_schema"`
}

type LDAPGroupSchema

type LDAPGroupSchema struct {
	ID              string `` /* 179-byte string literal not displayed */
	IDIsOctetString bool   `` /* 305-byte string literal not displayed */
	Mail            string `` /* 146-byte string literal not displayed */
	DisplayName     string `` /* 190-byte string literal not displayed */
	Groupname       string `` /* 137-byte string literal not displayed */
	Member          string `` /* 129-byte string literal not displayed */
}

type LDAPUserSchema

type LDAPUserSchema struct {
	ID              string `` /* 176-byte string literal not displayed */
	IDIsOctetString bool   `` /* 301-byte string literal not displayed */
	Mail            string `` /* 128-byte string literal not displayed */
	DisplayName     string `` /* 148-byte string literal not displayed */
	Username        string `` /* 132-byte string literal not displayed */
}

type Log

type Log struct {
	Level  string `yaml:"level" env:"OCIS_LOG_LEVEL;USERS_LOG_LEVEL" desc:"The log level."`
	Pretty bool   `yaml:"pretty" env:"OCIS_LOG_PRETTY;USERS_LOG_PRETTY" desc:"Activates pretty log output."`
	Color  bool   `yaml:"color" env:"OCIS_LOG_COLOR;USERS_LOG_COLOR" desc:"Activates colorized log output."`
	File   string `yaml:"file" env:"OCIS_LOG_FILE;USERS_LOG_FILE" desc:"The target log file."`
}

type OwnCloudSQLDriver

type OwnCloudSQLDriver struct {
	DBUsername         string `` /* 129-byte string literal not displayed */
	DBPassword         string `yaml:"db_password" env:"USERS_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database user."`
	DBHost             string `yaml:"db_host" env:"USERS_OWNCLOUDSQL_DB_HOST" desc:"Hostname of the database server."`
	DBPort             int    `yaml:"db_port" env:"USERS_OWNCLOUDSQL_DB_PORT" desc:"Network port to use for the database connection."`
	DBName             string `yaml:"db_name" env:"USERS_OWNCLOUDSQL_DB_NAME" desc:"Name of the owncloud database."`
	IDP                string ``                                             /* 161-byte string literal not displayed */
	Nobody             int64  `yaml:"nobody" env:"USERS_OWNCLOUDSQL_NOBODY"` // TODO what is this?
	JoinUsername       bool   `yaml:"join_username" env:"USERS_OWNCLOUDSQL_JOIN_USERNAME" desc:"Join the user properties table to read usernames"`
	JoinOwnCloudUUID   bool   `` /* 134-byte string literal not displayed */
	EnableMedialSearch bool   `` /* 216-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 Reva

type Reva struct {
	Address string `yaml:"address" env:"REVA_GATEWAY"`
}

Reva defines all available REVA configuration.

type Service

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

type TokenManager

type TokenManager struct {
	JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;USERS_JWT_SECRET"`
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OCIS_TRACING_ENABLED;USERS_TRACING_ENABLED" desc:"Activates tracing."`
	Type      string `` /* 201-byte string literal not displayed */
	Endpoint  string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;USERS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
	Collector string `` /* 231-byte string literal not displayed */
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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