Documentation ¶
Index ¶
- Variables
- func CreateInfraIdentity(name string) (*api.CreateIdentityResponse, error)
- func GetIdentityFromName(client *api.Client, name string, providerID uid.ID) (*api.Identity, error)
- func GetProviderByName(client *api.Client, name string) (*api.Provider, error)
- func NewRootCmd() *cobra.Command
- func UpdateIdentity(name, newPassword string) error
- type ClientConfig
- type ClientConfigV0dot1
- type ClientConfigV0dot2
- type ClientHostConfig
- type ClientHostConfigV0dot2
- type CodeResponse
- type ErrResultTimedOut
- type FailedLoginError
- type LocalServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //lint:ignore ST1005, user facing error ErrConfigNotFound = errors.New(`Could not read local credentials. Are you logged in? Use "infra login" to login`) ErrProviderNotUnique = errors.New(`more than one provider exists with this name`) ErrUserNotFound = errors.New(`no users found with this name`) )
internal errors
View Source
var (
ErrTLSNotVerified = errors.New(`The authenticity of the host can't be established.`)
)
user facing terminal constant errors - not meant for a stack trace, but a conversation
Functions ¶
func CreateInfraIdentity ¶ added in v0.9.0
func CreateInfraIdentity(name string) (*api.CreateIdentityResponse, error)
func GetIdentityFromName ¶ added in v0.9.0
func GetProviderByName ¶ added in v0.6.1
func NewRootCmd ¶ added in v0.0.3
func UpdateIdentity ¶ added in v0.9.0
Types ¶
type ClientConfig ¶ added in v0.4.0
type ClientConfig struct { Version string `json:"version"` Hosts []ClientHostConfig `json:"hosts"` }
current: v0.3
func NewClientConfig ¶ added in v0.3.0
func NewClientConfig() *ClientConfig
func (ClientConfig) HostNames ¶ added in v0.8.0
func (c ClientConfig) HostNames() []string
type ClientConfigV0dot1 ¶ added in v0.3.0
type ClientConfigV0dot1 struct { Version string `json:"version"` // always blank in v0.1 Name string `json:"name"` Host string `json:"host"` Token string `json:"token"` SkipTLSVerify bool `json:"skip-tls-verify"` SourceID string `json:"source-id"` }
func (ClientConfigV0dot1) ToV0dot2 ¶ added in v0.3.0
func (c ClientConfigV0dot1) ToV0dot2() *ClientConfigV0dot2
ToV0dot2 upgrades the config to the 0.2 version
type ClientConfigV0dot2 ¶ added in v0.3.0
type ClientConfigV0dot2 struct { Version string `json:"version"` // v0.2 Hosts []ClientHostConfigV0dot2 `json:"hosts"` }
func (ClientConfigV0dot2) ToV0dot3 ¶ added in v0.4.0
func (c ClientConfigV0dot2) ToV0dot3() *ClientConfig
ToV0dot3 upgrades the config to the 0.3 version
type ClientHostConfig ¶ added in v0.4.0
type ClientHostConfig struct { PolymorphicID uid.PolymorphicID `json:"polymorphic-id"` Name string `json:"name"` Host string `json:"host"` AccessKey string `json:"access-key,omitempty"` SkipTLSVerify bool `json:"skip-tls-verify"` // where is the other cert info stored? ProviderID uid.ID `json:"provider-id"` Expires api.Time `json:"expires"` Current bool `json:"current"` }
current: v0.3
type ClientHostConfigV0dot2 ¶ added in v0.4.0
type CodeResponse ¶
type ErrResultTimedOut ¶ added in v0.3.2
type ErrResultTimedOut struct{}
func (*ErrResultTimedOut) Error ¶ added in v0.3.2
func (e *ErrResultTimedOut) Error() string
type FailedLoginError ¶ added in v0.9.0
type FailedLoginError struct { LoggedInIdentity string LoginMethod loginMethod }
func (*FailedLoginError) Error ¶ added in v0.9.0
func (e *FailedLoginError) Error() string
type LocalServer ¶
type LocalServer struct { ResultChan chan CodeResponse // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.