mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 01:41:13 -06:00
31 lines
657 B
Go
31 lines
657 B
Go
package account
|
|
|
|
import (
|
|
"github.com/opencloud-eu/opencloud/pkg/log"
|
|
)
|
|
|
|
// Option defines a single option function.
|
|
type Option func(o *Options)
|
|
|
|
// Options defines the available options for this package.
|
|
type Options struct {
|
|
// Logger to use for logging, must be set
|
|
Logger log.Logger
|
|
// JWTSecret is the jwt secret for the reva token manager
|
|
JWTSecret string
|
|
}
|
|
|
|
// Logger provides a function to set the logger option.
|
|
func Logger(l log.Logger) Option {
|
|
return func(o *Options) {
|
|
o.Logger = l
|
|
}
|
|
}
|
|
|
|
// JWTSecret provides a function to set the jwt secret option.
|
|
func JWTSecret(s string) Option {
|
|
return func(o *Options) {
|
|
o.JWTSecret = s
|
|
}
|
|
}
|