Documentation
¶
Index ¶
- Variables
- func ValidateUrl(apiEndpoint string) (*url.URL, error)
- type Credential
- type Manager
- func (man *Manager) EnsureExists() error
- func (man *Manager) Import(filePath, fenceToken string) (*Credential, error)
- func (man *Manager) IsCredentialValid(profileConfig *Credential) (bool, error)
- func (man *Manager) IsTokenValid(tokenStr string) (bool, error)
- func (man *Manager) IsValid(profileConfig *Credential) (bool, error)
- func (man *Manager) Load(profile string) (*Credential, error)
- func (man *Manager) Save(profileConfig *Credential) error
- type ManagerInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrProfileNotFound = errors.New("profile not found in config file")
Functions ¶
Types ¶
type Credential ¶
type Manager ¶
func (*Manager) EnsureExists ¶
func (*Manager) Import ¶
func (man *Manager) Import(filePath, fenceToken string) (*Credential, error)
func (*Manager) IsCredentialValid ¶
func (man *Manager) IsCredentialValid(profileConfig *Credential) (bool, error)
func (*Manager) Save ¶
func (man *Manager) Save(profileConfig *Credential) error
type ManagerInterface ¶
type ManagerInterface interface {
// Loads credential from ~/.gen3/ credential file
Import(filePath, fenceToken string) (*Credential, error)
// Loads credential from ~/.gen3/config.ini
Load(profile string) (*Credential, error)
Save(cred *Credential) error
EnsureExists() error
IsCredentialValid(*Credential) (bool, error)
IsTokenValid(string) (bool, error)
}
func NewConfigure ¶
func NewConfigure(logs *slog.Logger) ManagerInterface
Click to show internal directories.
Click to hide internal directories.