Files
QSfera/pkg/config/config.go
T
Jörn Friedrich Dreyer 40906fe57a read signing key from ocis-store
- adds an access token middleware to read the x-access-token header,
  extract the reva user from it and store it in the context
- implments the ocs/v[12].php/cloud/user/signing-key endpoint
  - reads or creates signing key in ocis-store

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-07-17 23:03:37 +02:00

53 lines
978 B
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
}
// HTTP defines the available http configuration.
type HTTP struct {
Addr string
Namespace string
Root string
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
}
// TokenManager is the config for using the reva token manager
type TokenManager struct {
JWTSecret string
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
HTTP HTTP
Tracing Tracing
TokenManager TokenManager
}
// New initializes a new configuration with or without defaults.
func New() *Config {
return &Config{}
}