Files
opencloud/thumbnails/pkg/config/config.go
T
A.Unger 530336a826 Add 'thumbnails/' from commit '2ebf7b2f23af96b3b499c401fe5498a9349403d8'
git-subtree-dir: thumbnails
git-subtree-mainline: ccc651a11e
git-subtree-split: 2ebf7b2f23
2020-09-18 13:02:40 +02:00

71 lines
1.4 KiB
Go

package config
// Log defines the available logging configuration.
type Log struct {
Level string
Pretty bool
Color bool
}
// Debug defines the available debug configuration.
type Debug struct {
Addr string
Token string
Pprof bool
Zpages bool
}
// Server defines the available server configuration.
type Server struct {
Name string
Namespace string
Address string
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
Server Server
Tracing Tracing
Thumbnail Thumbnail
}
// FileSystemStorage defines the available filesystem storage configuration.
type FileSystemStorage struct {
RootDirectory string
}
// WebDavSource defines the available webdav source configuration.
type WebDavSource struct {
BaseURL string
Insecure bool
}
// FileSystemSource defines the available filesystem source configuration.
type FileSystemSource struct {
BasePath string
}
// Thumbnail defines the available thumbnail related configuration.
type Thumbnail struct {
Resolutions []string
FileSystemStorage FileSystemStorage
WebDavSource WebDavSource
}
// New initializes a new configuration with or without defaults.
func New() *Config {
return &Config{}
}