config

package
v2.26.7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 1 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 {
	Prefix string `mapstructure:"prefix"`
	// FilesNamespace prefixes the namespace, optionally with user information.
	// Example: if FilesNamespace is /users/{{substr 0 1 .Username}}/{{.Username}}
	// and received path is /docs the internal path will be:
	// /users/<first char of username>/<username>/docs
	FilesNamespace string `mapstructure:"files_namespace"`
	// WebdavNamespace prefixes the namespace, optionally with user information.
	// Example: if WebdavNamespace is /users/{{substr 0 1 .Username}}/{{.Username}}
	// and received path is /docs the internal path will be:
	// /users/<first char of username>/<username>/docs
	WebdavNamespace string `mapstructure:"webdav_namespace"`
	SharesNamespace string `mapstructure:"shares_namespace"`
	OCMNamespace    string `mapstructure:"ocm_namespace"`
	GatewaySvc      string `mapstructure:"gatewaysvc"`
	Timeout         int64  `mapstructure:"timeout"`
	Insecure        bool   `mapstructure:"insecure"`
	// If true, HTTP COPY will expect the HTTP-TPC (third-party copy) headers
	EnableHTTPTpc               bool                              `mapstructure:"enable_http_tpc"`
	PublicURL                   string                            `mapstructure:"public_url"`
	FavoriteStorageDriver       string                            `mapstructure:"favorite_storage_driver"`
	FavoriteStorageDrivers      map[string]map[string]interface{} `mapstructure:"favorite_storage_drivers"`
	Version                     string                            `mapstructure:"version"`
	VersionString               string                            `mapstructure:"version_string"`
	Edition                     string                            `mapstructure:"edition"`
	Product                     string                            `mapstructure:"product"`
	ProductName                 string                            `mapstructure:"product_name"`
	ProductVersion              string                            `mapstructure:"product_version"`
	AllowPropfindDepthInfinitiy bool                              `mapstructure:"allow_depth_infinity"`

	TransferSharedSecret string `mapstructure:"transfer_shared_secret"`

	NameValidation NameValidation `mapstructure:"validation"`

	MachineAuthAPIKey string `mapstructure:"machine_auth_apikey"`
}

Config holds the config options that need to be passed down to all ocdav handlers

func (*Config) Init

func (c *Config) Init()

Init initializes the configuration

type NameValidation

type NameValidation struct {
	InvalidChars []string `mapstructure:"invalid_chars"`
	MaxLength    int      `mapstructure:"max_length"`
}

NameValidation is the validation configuration for file and folder names

Jump to

Keyboard shortcuts

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