config

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: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SUPERVISED sets the runtime mode as supervised threads.
	SUPERVISED = iota

	// UNSUPERVISED sets the runtime mode as a single thread.
	UNSUPERVISED
)

Variables

This section is empty.

Functions

func BindSourcesToStructs

func BindSourcesToStructs(service string, dst interface{}) (*gofig.Config, error)

BindSourcesToStructs assigns any config value from a config file / env variable to struct `dst`. Its only purpose is to solely modify `dst`, not dealing with the config structs; and do so in a thread safe manner.

Types

type Config

type Config struct {
	*shared.Commons `yaml:"shared"`

	Tracing        *shared.Tracing        `yaml:"tracing"`
	Log            *shared.Log            `yaml:"log"`
	CacheStore     *shared.CacheStore     `yaml:"cache_store"`
	GRPCClientTLS  *shared.GRPCClientTLS  `yaml:"grpc_client_tls"`
	GRPCServiceTLS *shared.GRPCServiceTLS `yaml:"grpc_service_tls"`
	HTTPServiceTLS shared.HTTPServiceTLS  `yaml:"http_service_tls"`

	Mode    Mode // DEPRECATED
	File    string
	OcisURL string `yaml:"ocis_url" desc:"URL, where oCIS is reachable for users."`

	Registry          string               `yaml:"registry"`
	TokenManager      *shared.TokenManager `yaml:"token_manager"`
	MachineAuthAPIKey string               `` /* 181-byte string literal not displayed */
	TransferSecret    string               `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"`
	SystemUserID      string               `` /* 305-byte string literal not displayed */
	SystemUserAPIKey  string               `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY" desc:"API key for the storage-system system user."`
	AdminUserID       string               `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges."`
	Runtime           Runtime              `yaml:"runtime"`

	AppProvider       *appProvider.Config   `yaml:"app_provider"`
	AppRegistry       *appRegistry.Config   `yaml:"app_registry"`
	Audit             *audit.Config         `yaml:"audit"`
	AuthBasic         *authbasic.Config     `yaml:"auth_basic"`
	AuthBearer        *authbearer.Config    `yaml:"auth_bearer"`
	AuthMachine       *authmachine.Config   `yaml:"auth_machine"`
	Frontend          *frontend.Config      `yaml:"frontend"`
	Gateway           *gateway.Config       `yaml:"gateway"`
	Graph             *graph.Config         `yaml:"graph"`
	Groups            *groups.Config        `yaml:"groups"`
	IDM               *idm.Config           `yaml:"idm"`
	IDP               *idp.Config           `yaml:"idp"`
	Nats              *nats.Config          `yaml:"nats"`
	Notifications     *notifications.Config `yaml:"notifications"`
	OCDav             *ocdav.Config         `yaml:"ocdav"`
	OCS               *ocs.Config           `yaml:"ocs"`
	Proxy             *proxy.Config         `yaml:"proxy"`
	Settings          *settings.Config      `yaml:"settings"`
	Sharing           *sharing.Config       `yaml:"sharing"`
	StorageSystem     *storagesystem.Config `yaml:"storage_system"`
	StoragePublicLink *storagepublic.Config `yaml:"storage_public"`
	StorageShares     *storageshares.Config `yaml:"storage_shares"`
	StorageUsers      *storageusers.Config  `yaml:"storage_users"`
	Store             *store.Config         `yaml:"store"`
	Thumbnails        *thumbnails.Config    `yaml:"thumbnails"`
	Users             *users.Config         `yaml:"users"`
	Web               *web.Config           `yaml:"web"`
	WebDAV            *webdav.Config        `yaml:"webdav"`
	Search            *search.Config        `yaml:"search"`
}

Config combines all available configuration parts.

func DefaultConfig

func DefaultConfig() *Config

type Mode

type Mode int

type Runtime

type Runtime struct {
	Port     string `yaml:"port" env:"OCIS_RUNTIME_PORT"`
	Host     string `yaml:"host" env:"OCIS_RUNTIME_HOST"`
	Services string `` /* 144-byte string literal not displayed */
	Disabled string `` /* 200-byte string literal not displayed */
}

Runtime configures the oCIS runtime when running in supervised mode.

Directories

Path Synopsis
Package envdecode is a package for populating structs from environment variables, using struct tags.
Package envdecode is a package for populating structs from environment variables, using struct tags.

Jump to

Keyboard shortcuts

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