shared

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 4 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 MissingServiceUserPassword

func MissingServiceUserPassword(service, serviceUser string) error

func MissingSystemUserApiKeyError

func MissingSystemUserApiKeyError(service string) error

func MissingSystemUserID

func MissingSystemUserID(service string) error

func RunChecklist

func RunChecklist(checks ...Check) error

RunChecklist runs all the given checks

Types

type CacheStore

type CacheStore struct {
	Type    string `` /* 138-byte string literal not displayed */
	Address string `` /* 154-byte string literal not displayed */
	Size    int    `` /* 201-byte string literal not displayed */
}

type Check

type Check func() error

Check is a single health-check

func TCPConnect

func TCPConnect(host string) Check

TCPConnect connects to a given tcp endpoint

type Commons

type Commons struct {
	Log               *Log            `yaml:"log"`
	Tracing           *Tracing        `yaml:"tracing"`
	CacheStore        *CacheStore     `yaml:"cache_store"`
	GRPCClientTLS     *GRPCClientTLS  `yaml:"grpc_client_tls"`
	GRPCServiceTLS    *GRPCServiceTLS `yaml:"grpc_service_tls"`
	HTTPServiceTLS    HTTPServiceTLS  `yaml:"http_service_tls"`
	OcisURL           string          `yaml:"ocis_url" env:"OCIS_URL" desc:"URL, where oCIS is reachable for users."`
	TokenManager      *TokenManager   `mask:"struct" yaml:"token_manager"`
	Reva              *Reva           `yaml:"reva"`
	MachineAuthAPIKey string          `` /* 197-byte string literal not displayed */
	TransferSecret    string          `mask:"password" yaml:"transfer_secret,omitempty" env:"REVA_TRANSFER_SECRET"`
	SystemUserID      string          `` /* 305-byte string literal not displayed */
	SystemUserAPIKey  string          `mask:"password" yaml:"system_user_api_key" env:"SYSTEM_USER_API_KEY"`
	AdminUserID       string          `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges."`
}

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 `` /* 438-byte string literal not displayed */
	CACert string `` /* 191-byte string literal not displayed */
}

type GRPCServiceTLS

type GRPCServiceTLS struct {
	Enabled bool   `` /* 329-byte string literal not displayed */
	Cert    string `` /* 134-byte string literal not displayed */
	Key     string `` /* 157-byte string literal not displayed */
}

type HTTPServiceTLS

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

	Cert string `` /* 134-byte string literal not displayed */
	Key  string `` /* 157-byte string literal not displayed */
}

type Log

type Log struct {
	Level  string `` /* 148-byte string literal not displayed */
	Pretty bool   `yaml:"pretty" env:"OCIS_LOG_PRETTY" desc:"Activates pretty log output."`
	Color  bool   `yaml:"color" env:"OCIS_LOG_COLOR" desc:"Activates colorized log output."`
	File   string `yaml:"file" env:"OCIS_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set."`
}

Log defines the available logging configuration.

type Reva

type Reva struct {
	Address string        `yaml:"address" env:"REVA_GATEWAY" desc:"The CS3 gateway endpoint."`
	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 `mask:"password" yaml:"jwt_secret" env:"OCIS_JWT_SECRET" desc:"The secret to mint and validate jwt tokens."`
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OCIS_TRACING_ENABLED" desc:"Activates tracing."`
	Type      string `` /* 171-byte string literal not displayed */
	Endpoint  string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
	Collector string `` /* 204-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