Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // TrueMode always activates the feature. TrueMode = TrueFalseAutoMode{Mode: trueModeStr, Resolved: func() *bool { b := true; return &b }()} // FalseMode always deactivates the feature. FalseMode = TrueFalseAutoMode{Mode: falseModeStr, Resolved: func() *bool { b := false; return &b }()} // AutoMode decides automatically based on context. AutoMode = TrueFalseAutoMode{Mode: autoModeStr} )
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration is a wrapper type that parses time duration from text.
func NewDuration ¶
NewDuration returns Duration wrapper
func (Duration) JSONSchema ¶
func (Duration) JSONSchema() *jsonschema.Schema
JSONSchema returns a custom schema to be used for the JSON Schema generation of this type
func (*Duration) UnmarshalText ¶
UnmarshalText unmarshalls time duration from text.
type KeystoreFileConfig ¶
type KeystoreFileConfig struct {
// Path is the file path for the key store file
Path string `mapstructure:"Path"`
// Password is the password to decrypt the key store file
Password string `mapstructure:"Password"`
}
KeystoreFileConfig has all the information needed to load a private key from a key store file
type TrueFalseAutoMode ¶
TrueFalseAutoMode represents a tri-state config value: true, false, or auto. Mode is set from the config file via UnmarshalText; Resolved is set programmatically.
func (*TrueFalseAutoMode) Resolve ¶
func (m *TrueFalseAutoMode) Resolve(autoModeResult bool) bool
Resolve converts the mode to a boolean using autoModeResult for AutoMode, stores the result in Resolved, and returns it.
func (TrueFalseAutoMode) String ¶
func (m TrueFalseAutoMode) String() string
String returns the mode string ("true", "false", "auto", or "").
func (*TrueFalseAutoMode) UnmarshalText ¶
func (m *TrueFalseAutoMode) UnmarshalText(text []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (TrueFalseAutoMode) Validate ¶
func (m TrueFalseAutoMode) Validate(fieldName string) error
Validate checks that the mode is a valid value. Empty mode is allowed.