Documentation
¶
Index ¶
- Constants
- Variables
- type Credentials
- type InputReader
- type Manager
- func (m *Manager) Default(registry string)
- func (m *Manager) Delete() error
- func (m *Manager) Exists() bool
- func (m *Manager) Find(registry string) (*Credentials, bool)
- func (m *Manager) GetPath() string
- func (m *Manager) Input(registry string) error
- func (m *Manager) Load() error
- func (m *Manager) Save() error
Constants ¶
View Source
const ( DefaultConfigFile = ".smrctl/auth.yaml" ConfigFilePermissions = 0600 ConfigDirPermissions = 0700 )
View Source
const (
DefaultRegistry = "registry.simplecontainer.io"
)
Variables ¶
View Source
var ( ErrRegistryRequired = errors.New("registry URL is required") ErrPasswordRequired = errors.New("password is required when username is provided") ErrCredentialsNil = errors.New("credentials cannot be nil") ErrInvalidCredentials = errors.New("invalid credentials") ErrUnknownConfigKey = errors.New("unknown credentials key") ErrInvalidInputFormat = errors.New("invalid input format") )
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials struct {
Registry string `yaml:"registry" json:"registry"`
Username string `yaml:"username,omitempty" json:"username,omitempty"`
Password string `yaml:"password,omitempty" json:"password,omitempty"`
}
func Default ¶
func Default(registry string) *Credentials
func New ¶
func New() *Credentials
func (*Credentials) Clone ¶
func (c *Credentials) Clone() *Credentials
func (*Credentials) IsAnonymous ¶
func (c *Credentials) IsAnonymous() bool
func (*Credentials) Validate ¶
func (c *Credentials) Validate() error
type InputReader ¶
type InputReader struct {
// contains filtered or unexported fields
}
func NewInputReader ¶
func NewInputReader() *InputReader
func (*InputReader) PromptForCredentials ¶
func (ir *InputReader) PromptForCredentials(registry string) (*Credentials, error)
func (*InputReader) ReadFromStdin ¶
func (ir *InputReader) ReadFromStdin(registry string) (*Credentials, error)
type Manager ¶
type Manager struct {
Credentials map[string]*Credentials
// contains filtered or unexported fields
}
func NewManager ¶
Click to show internal directories.
Click to hide internal directories.