shared

package
v1.1.0-alpha.2 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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MissingAdminUserID

func MissingAdminUserID(service string) error

func MissingJWTTokenError

func MissingJWTTokenError(service string) error

func MissingLDAPBindPassword

func MissingLDAPBindPassword(service string) error

func MissingMachineAuthApiKeyError

func MissingMachineAuthApiKeyError(service string) error

func MissingRevaTransferSecretError

func MissingRevaTransferSecretError(service string) error

func MissingServiceAccountID

func MissingServiceAccountID(service string) error

func MissingServiceAccountSecret

func MissingServiceAccountSecret(service string) error

func MissingServiceUserPassword

func MissingServiceUserPassword(service, serviceUser string) error

func MissingSystemUserApiKeyError

func MissingSystemUserApiKeyError(service string) error

func MissingSystemUserID

func MissingSystemUserID(service string) error

func MissingWOPISecretError

func MissingWOPISecretError(service string) error

Types

type Cache

type Cache struct {
	Store              string        `` /* 207-byte string literal not displayed */
	Nodes              []string      `` /* 288-byte string literal not displayed */
	Database           string        `` /* 131-byte string literal not displayed */
	Table              string        `yaml:"table" env:"OC_CACHE_STORE_TABLE" desc:"The database table the store should use." introductionVersion:"1.0.0"`
	TTL                time.Duration `` /* 182-byte string literal not displayed */
	DisablePersistence bool          `` /* 207-byte string literal not displayed */
	AuthUsername       string        `` /* 181-byte string literal not displayed */
	AuthPassword       string        `` /* 181-byte string literal not displayed */
}

type Commons

type Commons struct {
	Log               *Log            `yaml:"log"`
	Tracing           *Tracing        `yaml:"tracing"`
	Cache             *Cache          `yaml:"cache"`
	GRPCClientTLS     *GRPCClientTLS  `yaml:"grpc_client_tls"`
	GRPCServiceTLS    *GRPCServiceTLS `yaml:"grpc_service_tls"`
	HTTPServiceTLS    HTTPServiceTLS  `yaml:"http_service_tls"`
	OpenCloudURL      string          `yaml:"opencloud_url" env:"OC_URL" desc:"URL, where OpenCloud is reachable for users." introductionVersion:"1.0.0"`
	TokenManager      *TokenManager   `mask:"struct" yaml:"token_manager"`
	Reva              *Reva           `yaml:"reva"`
	MachineAuthAPIKey string          `` /* 223-byte string literal not displayed */
	TransferSecret    string          `` /* 199-byte string literal not displayed */
	SystemUserID      string          `` /* 336-byte string literal not displayed */
	SystemUserAPIKey  string          `` /* 133-byte string literal not displayed */
	AdminUserID       string          `` /* 265-byte string literal not displayed */

	// NOTE: you will not fing GRPCMaxReceivedMessageSize size being used in the code. The envvar is actually extracted in revas `pool` package: https://github.com/cs3org/reva/blob/edge/pkg/rgrpc/todo/pool/connection.go
	// It is mentioned here again so it is documented
	GRPCMaxReceivedMessageSize int `` /* 344-byte string literal not displayed */
}

Commons holds configuration that are common to all extensions. Each extension can then decide whether to overwrite its values.

type EnvBinding

type EnvBinding struct {
	EnvVars     []string    // name of the environment var.
	Destination interface{} // pointer to the original config value to modify.
}

EnvBinding represents a direct binding from an env variable to a go kind. Along with gookit/config, its primal goal is to unpack environment variables into a Go value. We do so with reflection, and this data structure is just a step in between.

type GRPCClientTLS

type GRPCClientTLS struct {
	Mode   string `` /* 462-byte string literal not displayed */
	CACert string `` /* 217-byte string literal not displayed */
}

type GRPCServiceTLS

type GRPCServiceTLS struct {
	Enabled bool   `` /* 347-byte string literal not displayed */
	Cert    string `` /* 160-byte string literal not displayed */
	Key     string `` /* 183-byte string literal not displayed */
}

type HTTPServiceTLS

type HTTPServiceTLS struct {
	Enabled bool `` /* 342-byte string literal not displayed */

	Cert string `` /* 160-byte string literal not displayed */
	Key  string `` /* 183-byte string literal not displayed */
}

type Log

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

Log defines the available logging configuration.

type Reva

type Reva struct {
	Address string        `yaml:"address" env:"OC_REVA_GATEWAY" desc:"The CS3 gateway endpoint." introductionVersion:"1.0.0"`
	TLS     GRPCClientTLS `yaml:"tls"`
}

Reva defines all available REVA client configuration.

func DefaultRevaConfig

func DefaultRevaConfig() *Reva

func (*Reva) GetGRPCClientConfig

func (r *Reva) GetGRPCClientConfig() map[string]interface{}

func (*Reva) GetRevaOptions

func (r *Reva) GetRevaOptions() []pool.Option

type TokenManager

type TokenManager struct {
	JWTSecret string `` /* 132-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" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 189-byte string literal not displayed */
	Endpoint  string `yaml:"endpoint" env:"OC_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent." introductionVersion:"1.0.0"`
	Collector string `` /* 230-byte string literal not displayed */
}

Tracing defines the available tracing configuration.

Jump to

Keyboard shortcuts

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