config

package
v1.1.0-alpha.3 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: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	GroupMembersPatchLimit  int    `` /* 182-byte string literal not displayed */
	UsernameMatch           string `` /* 349-byte string literal not displayed */
	AssignDefaultUserRole   bool   `` /* 371-byte string literal not displayed */
	IdentitySearchMinLength int    `` /* 221-byte string literal not displayed */
	ShowUserEmailInResults  bool   `` /* 270-byte string literal not displayed */
}

API represents API configuration parameters.

type Application

type Application struct {
	ID          string `` /* 155-byte string literal not displayed */
	DisplayName string `yaml:"displayname" env:"GRAPH_APPLICATION_DISPLAYNAME" desc:"The OpenCloud application name." introductionVersion:"1.0.0"`
}

Application defines the available graph application configuration.

type CORS

type CORS struct {
	AllowedOrigins   []string `` /* 365-byte string literal not displayed */
	AllowedMethods   []string `` /* 369-byte string literal not displayed */
	AllowedHeaders   []string `` /* 371-byte string literal not displayed */
	AllowCredentials bool     `` /* 317-byte string literal not displayed */
}

CORS defines the available cors configuration.

type Cache

type Cache struct {
	Store              string        `` /* 225-byte string literal not displayed */
	Nodes              []string      `` /* 362-byte string literal not displayed */
	Database           string        `` /* 134-byte string literal not displayed */
	Table              string        `yaml:"table" env:"GRAPH_CACHE_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"1.0.0"`
	TTL                time.Duration `` /* 220-byte string literal not displayed */
	DisablePersistence bool          `` /* 239-byte string literal not displayed */
	AuthUsername       string        `` /* 207-byte string literal not displayed */
	AuthPassword       string        `` /* 207-byte string literal not displayed */
}

Cache defines the available configuration for a cache store

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"`
	Cache   *Cache   `yaml:"cache"`
	Debug   Debug    `yaml:"debug"`

	HTTP HTTP `yaml:"http"`

	API API `yaml:"api"`

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

	Application       Application  `yaml:"application"`
	Spaces            Spaces       `yaml:"spaces"`
	Identity          Identity     `yaml:"identity"`
	IncludeOCMSharees bool         `` /* 147-byte string literal not displayed */
	Events            Events       `yaml:"events"`
	UnifiedRoles      UnifiedRoles `yaml:"unified_roles"`
	MaxConcurrency    int          `` /* 171-byte string literal not displayed */

	Keycloak       Keycloak       `yaml:"keycloak"`
	ServiceAccount ServiceAccount `yaml:"service_account"`

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

Config combines all available configuration parts.

type Debug

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

Debug defines the available debug configuration.

type Events

type Events struct {
	Endpoint             string `` /* 293-byte string literal not displayed */
	Cluster              string `` /* 242-byte string literal not displayed */
	TLSInsecure          bool   `` /* 145-byte string literal not displayed */
	TLSRootCACertificate string `` /* 274-byte string literal not displayed */
	EnableTLS            bool   `` /* 255-byte string literal not displayed */
	AuthUsername         string `` /* 260-byte string literal not displayed */
	AuthPassword         string `` /* 260-byte string literal not displayed */
}

Events combines the configuration options for the event bus.

type HTTP

type HTTP struct {
	Addr      string                `yaml:"addr" env:"GRAPH_HTTP_ADDR" desc:"The bind address of the HTTP service." introductionVersion:"1.0.0"`
	Namespace string                `yaml:"-"`
	Root      string                `` /* 128-byte string literal not displayed */
	TLS       shared.HTTPServiceTLS `yaml:"tls"`
	APIToken  string                `yaml:"apitoken" env:"GRAPH_HTTP_API_TOKEN" desc:"An optional API bearer token" introductionVersion:"1.0.0"`
	CORS      CORS                  `yaml:"cors"`
}

HTTP defines the available http configuration.

type Identity

type Identity struct {
	Backend string `` /* 158-byte string literal not displayed */
	LDAP    LDAP   `yaml:"ldap"`
}

type Keycloak

type Keycloak struct {
	BasePath           string `` /* 132-byte string literal not displayed */
	ClientID           string `` /* 149-byte string literal not displayed */
	ClientSecret       string `` /* 160-byte string literal not displayed */
	ClientRealm        string `` /* 149-byte string literal not displayed */
	UserRealm          string `` /* 136-byte string literal not displayed */
	InsecureSkipVerify bool   `` /* 242-byte string literal not displayed */
}

Keycloak configuration

type LDAP

type LDAP struct {
	URI                string `` /* 167-byte string literal not displayed */
	CACert             string `` /* 280-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 */
	UseServerUUID      bool   `` /* 226-byte string literal not displayed */
	UsePasswordModExOp bool   `` /* 189-byte string literal not displayed */
	WriteEnabled       bool   `` /* 364-byte string literal not displayed */
	RefintEnabled      bool   `` /* 180-byte string literal not displayed */

	UserBaseDN               string `` /* 147-byte string literal not displayed */
	UserSearchScope          string `` /* 200-byte string literal not displayed */
	UserFilter               string `` /* 196-byte string literal not displayed */
	UserObjectClass          string `` /* 204-byte string literal not displayed */
	UserEmailAttribute       string `` /* 178-byte string literal not displayed */
	UserDisplayNameAttribute string `` /* 197-byte string literal not displayed */
	UserNameAttribute        string `` /* 172-byte string literal not displayed */
	UserIDAttribute          string `` /* 224-byte string literal not displayed */
	UserIDIsOctetString      bool   `` /* 333-byte string literal not displayed */
	UserTypeAttribute        string `` /* 226-byte string literal not displayed */
	UserEnabledAttribute     string `` /* 206-byte string literal not displayed */
	DisableUserMechanism     string `` /* 489-byte string literal not displayed */
	LdapDisabledUsersGroupDN string `` /* 275-byte string literal not displayed */

	GroupBaseDN          string `` /* 151-byte string literal not displayed */
	GroupCreateBaseDN    string `` /* 438-byte string literal not displayed */
	GroupSearchScope     string `` /* 211-byte string literal not displayed */
	GroupFilter          string `` /* 167-byte string literal not displayed */
	GroupObjectClass     string `` /* 208-byte string literal not displayed */
	GroupNameAttribute   string `` /* 177-byte string literal not displayed */
	GroupMemberAttribute string `` /* 179-byte string literal not displayed */
	GroupIDAttribute     string `` /* 227-byte string literal not displayed */
	GroupIDIsOctetString bool   `` /* 338-byte string literal not displayed */

	EducationResourcesEnabled bool `` /* 176-byte string literal not displayed */
	EducationConfig           LDAPEducationConfig
}

type LDAPEducationConfig

type LDAPEducationConfig struct {
	SchoolBaseDN      string `` /* 132-byte string literal not displayed */
	SchoolSearchScope string `` /* 194-byte string literal not displayed */

	SchoolFilter      string `` /* 149-byte string literal not displayed */
	SchoolObjectClass string `` /* 169-byte string literal not displayed */

	SchoolNameAttribute   string `` /* 150-byte string literal not displayed */
	SchoolNumberAttribute string `` /* 156-byte string literal not displayed */
	SchoolIDAttribute     string `` /* 206-byte string literal not displayed */

	SchoolTerminationGraceDays int `` /* 240-byte string literal not displayed */
}

LDAPEducationConfig represents the LDAP configuration for education related resources

type Log

type Log struct {
	Level  string `` /* 184-byte string literal not displayed */
	Pretty bool   `mapstructure:"pretty" env:"OC_LOG_PRETTY;GRAPH_LOG_PRETTY" desc:"Activates pretty log output." introductionVersion:"1.0.0"`
	Color  bool   `mapstructure:"color" env:"OC_LOG_COLOR;GRAPH_LOG_COLOR" desc:"Activates colorized log output." introductionVersion:"1.0.0"`
	File   string `` /* 152-byte string literal not displayed */
}

Log defines the available log configuration.

type Service

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

Service defines the available service configuration.

type ServiceAccount

type ServiceAccount struct {
	ServiceAccountID     string `` /* 228-byte string literal not displayed */
	ServiceAccountSecret string `` /* 153-byte string literal not displayed */
}

ServiceAccount is the configuration for the used service account

type Spaces

type Spaces struct {
	WebDavBase                      string `yaml:"webdav_base" env:"OC_URL;GRAPH_SPACES_WEBDAV_BASE" desc:"The public facing URL of WebDAV." introductionVersion:"1.0.0"`
	WebDavPath                      string `yaml:"webdav_path" env:"GRAPH_SPACES_WEBDAV_PATH" desc:"The WebDAV sub-path for spaces." introductionVersion:"1.0.0"`
	DefaultQuota                    string `yaml:"default_quota" env:"GRAPH_SPACES_DEFAULT_QUOTA" desc:"The default quota in bytes." introductionVersion:"1.0.0"`
	ExtendedSpacePropertiesCacheTTL int    `` /* 182-byte string literal not displayed */
	UsersCacheTTL                   int    `` /* 139-byte string literal not displayed */
	GroupsCacheTTL                  int    `` /* 142-byte string literal not displayed */
	StorageUsersAddress             string `` /* 146-byte string literal not displayed */
	DefaultLanguage                 string `` /* 226-byte string literal not displayed */
	TranslationPath                 string `` /* 287-byte string literal not displayed */
}

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;GRAPH_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 available tracing configuration.

func (Tracing) Convert

func (t Tracing) Convert() tracing.Config

Convert Tracing to the tracing package's Config struct.

type UnifiedRoles

type UnifiedRoles struct {
	AvailableRoles []string `` /* 152-byte string literal not displayed */
}

UnifiedRoles contains all settings related to unified roles.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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