Documentation ¶
Index ¶
- Constants
- func NewProviderArr(fields Fields) []string
- type CredDelete
- type CredFinder
- type Credential
- type DeleteManager
- type Detail
- type Field
- type Fields
- type Finder
- type ListCredData
- type ListCredDatas
- type Pather
- type Reader
- type ReaderPather
- type ReaderWriterPather
- type Resolver
- type ResolverManager
- type SetManager
- type Setter
- type Settings
- func (s Settings) CredentialsPath() string
- func (s Settings) ProviderPath() string
- func (s Settings) ReadCredentialsFields(path string) (Fields, error)
- func (s Settings) ReadCredentialsValue(path string) ([]ListCredData, error)
- func (s Settings) ReadCredentialsValueInEnv(path string, env string) ([]ListCredData, error)
- func (s Settings) WriteCredentialsFields(fields Fields, path string) error
- func (s Settings) WriteDefaultCredentialsFields(path string) error
- type Type
- type Writer
Constants ¶
View Source
const AddNew = "Add a new"
Variables ¶
This section is empty.
Functions ¶
func NewProviderArr ¶
Types ¶
type CredDelete ¶
type CredFinder ¶
type Credential ¶
A Credential represents the key-value pairs for the Service (User/Pass, Github, Jenkins, etc).
type DeleteManager ¶
type DeleteManager struct {
// contains filtered or unexported fields
}
func NewCredDelete ¶
func NewCredDelete(homePath string, env renv.Finder) DeleteManager
func (DeleteManager) Delete ¶
func (d DeleteManager) Delete(service string) error
type Detail ¶
type Detail struct { Username string `json:"username"` Credential Credential `json:"credential"` Service string `json:"service"` Type Type `json:"type"` }
Detail represents a credential information of the user.
type Fields ¶
Fields are used to represents providers.json
func NewDefaultCredentials ¶
func NewDefaultCredentials() Fields
type ListCredData ¶
type ListCredDatas ¶
type ListCredDatas []ListCredData
type Reader ¶
type Reader interface { ReadCredentialsFields(path string) (Fields, error) ReadCredentialsValue(path string) ([]ListCredData, error) ReadCredentialsValueInEnv(path string, env string) ([]ListCredData, error) }
type ReaderPather ¶
type ReaderWriterPather ¶
type ResolverManager ¶
type ResolverManager struct { CredFinder Setter prompt.InputPassword }
func NewResolver ¶
func NewResolver(cf CredFinder, cs Setter, passwordInput prompt.InputPassword) ResolverManager
NewResolver creates a credential resolver instance of Resolver interface
type SetManager ¶
type SetManager struct {
// contains filtered or unexported fields
}
func NewSetter ¶
func NewSetter( homePath string, env env.Finder, dir stream.DirCreater, ) SetManager
func (SetManager) Set ¶
func (s SetManager) Set(cred Detail) error
type Settings ¶
type Settings struct { HomeDir string // contains filtered or unexported fields }
func NewSettings ¶
func (Settings) CredentialsPath ¶
func (Settings) ProviderPath ¶
func (Settings) ReadCredentialsFields ¶
func (Settings) ReadCredentialsValue ¶
func (s Settings) ReadCredentialsValue(path string) ([]ListCredData, error)
func (Settings) ReadCredentialsValueInEnv ¶
func (s Settings) ReadCredentialsValueInEnv(path string, env string) ([]ListCredData, error)
func (Settings) WriteCredentialsFields ¶
func (Settings) WriteDefaultCredentialsFields ¶
WriteDefault is a non override version of WriteCredentialsFields used to create providers.json if user dont have it
Click to show internal directories.
Click to hide internal directories.