Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PivnetProfile ¶
type PivnetProfile struct { Name string `yaml:"name"` APIToken string `yaml:"api_token"` Host string `yaml:"host"` AccessToken string `yaml:"access_token"` AccessTokenExpiry int64 `yaml:"access_token_expiry"` }
func (*PivnetProfile) Validate ¶
func (p *PivnetProfile) Validate() error
type PivnetRC ¶
type PivnetRC struct {
Profiles []PivnetProfile `yaml:"profiles"`
}
type PivnetRCReadWriter ¶
type RCHandler ¶
type RCHandler struct {
// contains filtered or unexported fields
}
func NewRCHandler ¶
func NewRCHandler(rcReadWriter PivnetRCReadWriter) *RCHandler
func (*RCHandler) ProfileForName ¶
func (h *RCHandler) ProfileForName(profileName string) (*PivnetProfile, error)
ProfileForName will return (nil,nil) if the file does not exist, or if the profile does not exist, but will return (nil,err) for other reasons e.g. the file cannot be read.
func (*RCHandler) RemoveProfileWithName ¶
RemoveProfileWithName will return error for all errors except if file does not exist
Click to show internal directories.
Click to hide internal directories.