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: 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         *shared.Reva  `yaml:"reva"`
	Events       Events        `yaml:"events"`

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

	UserSharingDriver    string               `` /* 161-byte string literal not displayed */
	UserSharingDrivers   UserSharingDrivers   `yaml:"user_sharing_drivers"`
	PublicSharingDriver  string               `` /* 157-byte string literal not displayed */
	PublicSharingDrivers PublicSharingDrivers `yaml:"public_sharing_drivers"`

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

type Debug

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

type Events

type Events struct {
	Addr              string `` /* 198-byte string literal not displayed */
	ClusterID         string `` /* 241-byte string literal not displayed */
	TLSInsecure       bool   `yaml:"tls_insecure" env:"OCIS_INSECURE;SHARING_EVENTS_TLS_INSECURE" desc:"Whether to verify the server TLS certificates."`
	TLSRootCaCertPath string `` /* 207-byte string literal not displayed */
	EnableTLS         bool   `` /* 227-byte string literal not displayed */
}

type GRPCConfig

type GRPCConfig struct {
	Addr      string                 `yaml:"addr" env:"SHARING_GRPC_ADDR" desc:"The bind address of the GRPC service."`
	TLS       *shared.GRPCServiceTLS `yaml:"tls"`
	Namespace string                 `yaml:"-"`
	Protocol  string                 `yaml:"protocol" env:"SHARING_GRPC_PROTOCOL" desc:"The transport protocol of the GRPC service."`
}

type Log

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

type PublicSharingCS3Driver

type PublicSharingCS3Driver struct {
	ProviderAddr     string `yaml:"provider_addr" env:"SHARING_PUBLIC_CS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM service."`
	SystemUserID     string `` /* 339-byte string literal not displayed */
	SystemUserIDP    string `` /* 135-byte string literal not displayed */
	SystemUserAPIKey string `` /* 147-byte string literal not displayed */
}

type PublicSharingDrivers

type PublicSharingDrivers struct {
	JSON    PublicSharingJSONDriver    `yaml:"json"`
	JSONCS3 PublicSharingJSONCS3Driver `yaml:"jsoncs3"`
	CS3     PublicSharingCS3Driver     `yaml:"cs3"`

	SQL PublicSharingSQLDriver `yaml:"sql,omitempty"` // not supported by the oCIS product, therefore not part of docs
}

type PublicSharingJSONCS3Driver

type PublicSharingJSONCS3Driver struct {
	ProviderAddr     string `yaml:"provider_addr" env:"SHARING_PUBLIC_JSONCS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM service."`
	SystemUserID     string `` /* 343-byte string literal not displayed */
	SystemUserIDP    string `` /* 139-byte string literal not displayed */
	SystemUserAPIKey string `` /* 151-byte string literal not displayed */
}

PublicSharingJSONCS3Driver holds the jsoncs3 driver config

type PublicSharingJSONDriver

type PublicSharingJSONDriver struct {
	File string `` /* 200-byte string literal not displayed */
}

type PublicSharingSQLDriver

type PublicSharingSQLDriver struct {
	DBUsername                 string `yaml:"db_username"`
	DBPassword                 string `yaml:"db_password"`
	DBHost                     string `yaml:"db_host"`
	DBPort                     int    `yaml:"db_port"`
	DBName                     string `yaml:"db_name"`
	PasswordHashCost           int    `yaml:"password_hash_cost"`
	EnableExpiredSharesCleanup bool   `yaml:"enable_expired_shares_cleanup"`
	JanitorRunInterval         int    `yaml:"janitor_run_interval"`
	UserStorageMountID         string `yaml:"user_storage_mount_id"`
}

type Service

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

type TokenManager

type TokenManager struct {
	JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;SHARING_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;SHARING_TRACING_ENABLED" desc:"Activates tracing."`
	Type      string `` /* 192-byte string literal not displayed */
	Endpoint  string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;SHARING_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
	Collector string `` /* 230-byte string literal not displayed */
}

type UserSharingCS3Driver

type UserSharingCS3Driver struct {
	ProviderAddr     string `yaml:"provider_addr" env:"SHARING_USER_CS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM service."`
	SystemUserID     string `` /* 337-byte string literal not displayed */
	SystemUserIDP    string `` /* 133-byte string literal not displayed */
	SystemUserAPIKey string `` /* 145-byte string literal not displayed */
}

type UserSharingDrivers

type UserSharingDrivers struct {
	JSONCS3     UserSharingJSONCS3Driver     `yaml:"jsoncs3"`
	JSON        UserSharingJSONDriver        `yaml:"json"`
	CS3         UserSharingCS3Driver         `yaml:"cs3"`
	OwnCloudSQL UserSharingOwnCloudSQLDriver `yaml:"owncloudsql"`

	SQL UserSharingSQLDriver `yaml:"sql,omitempty"` // not supported by the oCIS product, therefore not part of docs
}

type UserSharingJSONCS3Driver

type UserSharingJSONCS3Driver struct {
	ProviderAddr     string `yaml:"provider_addr" env:"SHARING_USER_JSONCS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM service."`
	SystemUserID     string `` /* 341-byte string literal not displayed */
	SystemUserIDP    string `` /* 137-byte string literal not displayed */
	SystemUserAPIKey string `` /* 149-byte string literal not displayed */
	CacheTTL         int    `yaml:"cache_ttl" env:"SHARING_USER_JSONCS3_CACHE_TTL" desc:"TTL for the internal caches in seconds."`
}

UserSharingJSONCS3Driver holds the jsoncs3 driver config

type UserSharingJSONDriver

type UserSharingJSONDriver struct {
	File string `yaml:"file" env:"SHARING_USER_JSON_FILE" desc:"Path to the JSON file where shares will be persisted."`
}

type UserSharingOwnCloudSQLDriver

type UserSharingOwnCloudSQLDriver struct {
	DBUsername         string `yaml:"db_username" env:"SHARING_USER_OWNCLOUDSQL_DB_USERNAME" desc:"Username for the database."`
	DBPassword         string `yaml:"db_password" env:"SHARING_USER_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database."`
	DBHost             string `yaml:"db_host" env:"SHARING_USER_OWNCLOUDSQL_DB_HOST" desc:"Hostname or IP of the database server."`
	DBPort             int    `yaml:"db_port" env:"SHARING_USER_OWNCLOUDSQL_DB_PORT" desc:"Port that the database server is listening on."`
	DBName             string `yaml:"db_name" env:"SHARING_USER_OWNCLOUDSQL_DB_NAME" desc:"Name of the database to be used."`
	UserStorageMountID string `` /* 162-byte string literal not displayed */
}

type UserSharingSQLDriver

type UserSharingSQLDriver struct {
	DBUsername                 string `yaml:"db_username"`
	DBPassword                 string `yaml:"db_password"`
	DBHost                     string `yaml:"db_host"`
	DBPort                     int    `yaml:"db_port"`
	DBName                     string `yaml:"db_name"`
	PasswordHashCost           int    `yaml:"password_hash_cost"`
	EnableExpiredSharesCleanup bool   `yaml:"enable_expired_shares_cleanup"`
	JanitorRunInterval         int    `yaml:"janitor_run_interval"`
	UserStorageMountID         string `yaml:"user_storage_mount_id"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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