Documentation ¶
Overview ¶
Package creds contains logic for KNE credentials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct { Node map[string]*UserPass Vendor map[tpb.Vendor]*UserPass Default *UserPass }
Credentials contains credential info for nodes in the KNE topology.
func (*Credentials) Lookup ¶
func (c *Credentials) Lookup(node string, vendor tpb.Vendor) *UserPass
Lookup returns the username/password to use for the given node name and vendor. Returns nil if no such combination exists. This method is nil-tolerant.
func (*Credentials) String ¶
func (c *Credentials) String() string
func (*Credentials) UnmarshalYAML ¶
func (c *Credentials) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML allows the Credentials type to be correctly unmarshaled from yaml.
type Flags ¶
type Flags struct {
// contains filtered or unexported fields
}
Flags are a collection of credentials flags.
func DefineFlags ¶
func DefineFlags() *Flags
DefineFlags defines flags for allowing user-specified credentials.
func (*Flags) Parse ¶
func (f *Flags) Parse() (*Credentials, error)
Parse parses the flags into Credentials.
Click to show internal directories.
Click to hide internal directories.