Files
opencloud/thumbnails/pkg/config/config.go
David Christofas dceb96ff98 prepare for public link thumbnails
- Implement a CS3 image source handler
 - Use checksum instead of etag for unique check
 - Simplify storage layout
2021-04-27 22:09:41 +02:00

73 lines
1.4 KiB
Go

package config
import "context"
// Log defines the available logging configuration.
type Log struct {
Level string
Pretty bool
Color bool
File string
}
// 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
Version 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
Context context.Context
Supervised bool
}
// FileSystemStorage defines the available filesystem storage configuration.
type FileSystemStorage struct {
RootDirectory string
}
// 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
WebdavAllowInsecure bool
RevaGateway string
}
// New initializes a new configuration with or without defaults.
func New() *Config {
return &Config{}
}