ocdav

package
v2.29.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ServerName to use when announcing the service to the registry
	ServerName = "ocdav"
)

Variables

This section is empty.

Functions

func Service

func Service(opts ...Option) (micro.Service, error)

Service initializes the ocdav service and underlying http server.

Types

type Option

type Option func(o *Options)

Option defines a single option function.

func Address

func Address(val string) Option

Address provides a function to set the address option.

func AllowCredentials

func AllowCredentials(val bool) Option

AllowCredentials provides a function to set the AllowCredentials option.

func AllowDepthInfinity

func AllowDepthInfinity(val bool) Option

func AllowedHeaders

func AllowedHeaders(val []string) Option

AllowedHeaders provides a function to set the AllowedHeaders option.

func AllowedMethods

func AllowedMethods(val []string) Option

AllowedMethods provides a function to set the AllowedMethods option.

func AllowedOrigins

func AllowedOrigins(val []string) Option

AllowedOrigins provides a function to set the AllowedOrigins option.

func Broker

func Broker(b broker.Broker) Option

Broker provides a function to set the Broker option.

func Context

func Context(val context.Context) Option

Context provides a function to set the context option.

func FavoriteManager

func FavoriteManager(val favorite.Manager) Option

FavoriteManager provides a function to set the FavoriteManager option.

func FilesNamespace

func FilesNamespace(val string) Option

FilesNamespace provides a function to set the FilesNamespace config option.

func GatewaySelector

func GatewaySelector(val pool.Selectable[gateway.GatewayAPIClient]) Option

GatewaySelector provides a function to set the GatewaySelector option.

func GatewaySvc

func GatewaySvc(val string) Option

GatewaySvc provides a function to set the GatewaySvc config option.

func Insecure

func Insecure(val bool) Option

Insecure provides a function to set the Insecure config option.

func ItemNameInvalidChars

func ItemNameInvalidChars(chars []string) Option

ItemNameInvalidChars provides a function to set forbidden characters in file or folder names

func ItemNameMaxLength

func ItemNameMaxLength(i int) Option

ItemNameMaxLength provides a function to set the maximum length of a file or folder name

func JWTSecret

func JWTSecret(s string) Option

JWTSecret provides a function to set the jwt secret option.

func LockSystem

func LockSystem(val ocdav.LockSystem) Option

LockSystem provides a function to set the LockSystem option.

func Logger

func Logger(val zerolog.Logger) Option

Logger provides a function to set the logger option.

func MachineAuthAPIKey

func MachineAuthAPIKey(s string) Option

MachineAuthAPIKey provides a function to set the machine auth api key option.

func MetricsEnabled

func MetricsEnabled(val bool) Option

MetricsEnabled provides a function to set the MetricsEnabled config option.

func MetricsNamespace

func MetricsNamespace(val string) Option

MetricsNamespace provides a function to set the MetricsNamespace config option.

func MetricsSubsystem

func MetricsSubsystem(val string) Option

MetricsSubsystem provides a function to set the MetricsSubsystem config option.

func Name

func Name(val string) Option

Name provides a function to set the Name option.

func OCMNamespace

func OCMNamespace(val string) Option

OCMNamespace provides a function to set the OCMNamespace config option.

func Prefix

func Prefix(val string) Option

Prefix provides a function to set the prefix config option.

func Product

func Product(val string) Option

Product provides a function to set the Product config option.

func ProductName

func ProductName(val string) Option

ProductName provides a function to set the ProductName config option.

func ProductVersion

func ProductVersion(val string) Option

ProductVersion provides a function to set the ProductVersion config option.

func PublicURL

func PublicURL(val string) Option

PublicURL provides a function to set the PublicURL config option.

func RegisterInterval

func RegisterInterval(interval time.Duration) Option

RegisterInterval provides a function to set the RegisterInterval option.

func RegisterTTL

func RegisterTTL(ttl time.Duration) Option

RegisterTTL provides a function to set the RegisterTTL option.

func SharesNamespace

func SharesNamespace(val string) Option

SharesNamespace provides a function to set the SharesNamespace config option.

func TLSConfig

func TLSConfig(config *tls.Config) Option

TLSConfig provides a function to set the TLSConfig option.

func Timeout

func Timeout(val int64) Option

Timeout provides a function to set the Timeout config option.

func Tracing

func Tracing(endpoint, collector string) Option

Tracing enables tracing Deprecated: use WithTracingEndpoint and WithTracingEnabled, Collector is unused

func Version

func Version(val string) Option

Version provides a function to set the Version config option.

func VersionString

func VersionString(val string) Option

VersionString provides a function to set the VersionString config option.

func WebdavNamespace

func WebdavNamespace(val string) Option

WebdavNamespace provides a function to set the WebdavNamespace config option.

func WithTraceProvider

func WithTraceProvider(provider trace.TracerProvider) Option

WithTraceProvider option

func WithTracingEnabled

func WithTracingEnabled(enabled bool) Option

WithTracingEnabled option

func WithTracingEndpoint

func WithTracingEndpoint(endpoint string) Option

WithTracingEndpoint option

func WithTracingExporter

func WithTracingExporter(exporter string) Option

WithTracingExporter option Deprecated: unused

func WithTracingInsecure

func WithTracingInsecure() Option

WithTracingInsecure option

func WithTracingTransportCredentials

func WithTracingTransportCredentials(v credentials.TransportCredentials) Option

WithTracingTransportCredentials option

type Options

type Options struct {
	TLSConfig *tls.Config
	Broker    broker.Broker
	Address   string
	Logger    zerolog.Logger
	Context   context.Context
	// Metrics   *metrics.Metrics
	// Flags     []cli.Flag
	Name      string
	JWTSecret string

	FavoriteManager favorite.Manager
	GatewaySelector pool.Selectable[gateway.GatewayAPIClient]

	TracingEnabled              bool
	TracingInsecure             bool
	TracingEndpoint             string
	TracingTransportCredentials credentials.TransportCredentials

	TraceProvider trace.TracerProvider

	MetricsEnabled   bool
	MetricsNamespace string
	MetricsSubsystem string

	AllowCredentials   bool
	AllowedOrigins     []string
	AllowedHeaders     []string
	AllowedMethods     []string
	AllowDepthInfinity bool

	RegisterTTL      time.Duration
	RegisterInterval time.Duration
	// contains filtered or unexported fields
}

Options defines the available options for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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