mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-06-20 13:59:21 -04:00
added namespace to http functional options
This commit is contained in:
BIN
cmd/ocis-ocs/ocis-ocs
Executable file
BIN
cmd/ocis-ocs/ocis-ocs
Executable file
Binary file not shown.
@@ -14,11 +14,12 @@ type Option func(o *Options)
|
||||
|
||||
// Options defines the available options for this package.
|
||||
type Options struct {
|
||||
Logger log.Logger
|
||||
Context context.Context
|
||||
Config *config.Config
|
||||
Metrics *metrics.Metrics
|
||||
Flags []cli.Flag
|
||||
Namespace string
|
||||
Logger log.Logger
|
||||
Context context.Context
|
||||
Config *config.Config
|
||||
Metrics *metrics.Metrics
|
||||
Flags []cli.Flag
|
||||
}
|
||||
|
||||
// newOptions initializes the available default options.
|
||||
@@ -66,3 +67,10 @@ func Flags(val []cli.Flag) Option {
|
||||
o.Flags = append(o.Flags, val...)
|
||||
}
|
||||
}
|
||||
|
||||
// Namespace provides a function to set the Namespace option.
|
||||
func Namespace(val string) Option {
|
||||
return func(o *Options) {
|
||||
o.Namespace = val
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user