forked from ilijamt/vault-plugin-secrets-gitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflags.go
More file actions
17 lines (14 loc) · 670 Bytes
/
flags.go
File metadata and controls
17 lines (14 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package gitlab
import (
"flag"
)
type Flags struct {
ShowConfigToken bool `json:"show_config_token" mapstructure:"show_config_token"`
AllowRuntimeFlagsChange bool `json:"allow_runtime_flags_change" mapstructure:"allow_runtime_flags_change"`
}
// FlagSet returns the flag set for configuring the TLS connection
func (f *Flags) FlagSet(fs *flag.FlagSet) *flag.FlagSet {
fs.BoolVar(&f.ShowConfigToken, "show-config-token", false, "Display the token value when reading it's config the configuration endpoint.")
fs.BoolVar(&f.AllowRuntimeFlagsChange, "allow-runtime-flags-change", false, "Allows you to change the flags dynamically at runtime.")
return fs
}