config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 3 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 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 `` /* 184-byte string literal not displayed */

	UserSharingDriver              string               `` /* 202-byte string literal not displayed */
	UserSharingDrivers             UserSharingDrivers   `yaml:"user_sharing_drivers"`
	PublicSharingDriver            string               `` /* 198-byte string literal not displayed */
	PublicSharingDrivers           PublicSharingDrivers `yaml:"public_sharing_drivers"`
	WriteableShareMustHavePassword bool                 `` /* 483-byte string literal not displayed */
	PublicShareMustHavePassword    bool                 `` /* 242-byte string literal not displayed */
	EnableExpiredSharesCleanup     bool                 `yaml:"enable_expired_shares_cleanup"`
	PasswordPolicy                 PasswordPolicy       `yaml:"password_policy"`

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

type Debug

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

type Events

type Events struct {
	Addr              string `` /* 245-byte string literal not displayed */
	ClusterID         string `` /* 287-byte string literal not displayed */
	TLSInsecure       bool   `` /* 147-byte string literal not displayed */
	TLSRootCaCertPath string `` /* 276-byte string literal not displayed */
	EnableTLS         bool   `` /* 257-byte string literal not displayed */
	AuthUsername      string `` /* 146-byte string literal not displayed */
	AuthPassword      string `` /* 146-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." introductionVersion:"1.0.0"`
	TLS       *shared.GRPCServiceTLS `yaml:"tls"`
	Namespace string                 `yaml:"-"`
	Protocol  string                 `` /* 139-byte string literal not displayed */
}

type Log

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

type PasswordPolicy

type PasswordPolicy struct {
	Disabled               bool   `` /* 186-byte string literal not displayed */
	MinCharacters          int    `` /* 207-byte string literal not displayed */
	MinLowerCaseCharacters int    `` /* 239-byte string literal not displayed */
	MinUpperCaseCharacters int    `` /* 239-byte string literal not displayed */
	MinDigits              int    `` /* 186-byte string literal not displayed */
	MinSpecialCharacters   int    `` /* 273-byte string literal not displayed */
	BannedPasswordsList    string `` /* 289-byte string literal not displayed */
}

PasswordPolicy configures reva password policy

type PublicSharingCS3Driver

type PublicSharingCS3Driver struct {
	ProviderAddr     string `` /* 138-byte string literal not displayed */
	SystemUserID     string `` /* 370-byte string literal not displayed */
	SystemUserIDP    string `` /* 166-byte string literal not displayed */
	SystemUserAPIKey string `` /* 173-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 OpenCloud product, therefore not part of docs
}

type PublicSharingJSONCS3Driver

type PublicSharingJSONCS3Driver struct {
	ProviderAddr     string `` /* 142-byte string literal not displayed */
	SystemUserID     string `` /* 374-byte string literal not displayed */
	SystemUserIDP    string `` /* 170-byte string literal not displayed */
	SystemUserAPIKey string `` /* 177-byte string literal not displayed */
}

PublicSharingJSONCS3Driver holds the jsoncs3 driver config

type PublicSharingJSONDriver

type PublicSharingJSONDriver struct {
	File string `` /* 304-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 `` /* 135-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;SHARING_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 210-byte string literal not displayed */
	Endpoint  string `` /* 136-byte string literal not displayed */
	Collector string `` /* 256-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 UserSharingCS3Driver

type UserSharingCS3Driver struct {
	ProviderAddr     string `` /* 136-byte string literal not displayed */
	SystemUserID     string `` /* 368-byte string literal not displayed */
	SystemUserIDP    string `` /* 164-byte string literal not displayed */
	SystemUserAPIKey string `` /* 171-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 OpenCloud product, therefore not part of docs
}

type UserSharingJSONCS3Driver

type UserSharingJSONCS3Driver struct {
	ProviderAddr     string `` /* 140-byte string literal not displayed */
	SystemUserID     string `` /* 372-byte string literal not displayed */
	SystemUserIDP    string `` /* 168-byte string literal not displayed */
	SystemUserAPIKey string `` /* 175-byte string literal not displayed */
	CacheTTL         int    `` /* 128-byte string literal not displayed */
	MaxConcurrency   int    `` /* 330-byte string literal not displayed */
}

UserSharingJSONCS3Driver holds the jsoncs3 driver config

type UserSharingJSONDriver

type UserSharingJSONDriver struct {
	File string `` /* 205-byte string literal not displayed */
}

type UserSharingOwnCloudSQLDriver

type UserSharingOwnCloudSQLDriver struct {
	DBUsername         string `yaml:"db_username" env:"SHARING_USER_OWNCLOUDSQL_DB_USERNAME" desc:"Username for the database." introductionVersion:"1.0.0"`
	DBPassword         string `yaml:"db_password" env:"SHARING_USER_OWNCLOUDSQL_DB_PASSWORD" desc:"Password for the database." introductionVersion:"1.0.0"`
	DBHost             string `` /* 127-byte string literal not displayed */
	DBPort             int    `` /* 135-byte string literal not displayed */
	DBName             string `yaml:"db_name" env:"SHARING_USER_OWNCLOUDSQL_DB_NAME" desc:"Name of the database to be used." introductionVersion:"1.0.0"`
	UserStorageMountID string `` /* 190-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