Documentation ¶
Index ¶
- func ParseAWSCredentials(bytes []byte, keys chan Key)
- type ARN
- type AWSAccount
- type AWSAccountID
- type AWSIamAccount
- func (a *AWSIamAccount) AddBinding(k Key)
- func (a *AWSIamAccount) Bindings() <-chan KeyBindingImpl
- func (a *AWSIamAccount) ConnectionID() ID
- func (a *AWSIamAccount) Id() ID
- func (a *AWSIamAccount) Identifiers() []ID
- func (a *AWSIamAccount) Merge(other Account)
- func (a *AWSIamAccount) String() string
- type AWSInstanceAccount
- type AWSKey
- func (key *AWSKey) Expire()
- func (key *AWSKey) GetNames() StringSet
- func (key *AWSKey) Id() ID
- func (key *AWSKey) Identifiers() []ID
- func (key *AWSKey) Ids() []string
- func (key *AWSKey) IsDeprecated() bool
- func (key *AWSKey) Json() ([]byte, error)
- func (key *AWSKey) Merge(k Key)
- func (key *AWSKey) ReplacementID() ID
- func (key *AWSKey) StandardString(id ID, other ...string) string
- func (key *AWSKey) String() string
- type Account
- type BindingLocation
- type Change
- type FanInAccounts
- type FanInKeys
- type Fetcher
- type ID
- type IDList
- type Identiferser
- type Ider
- type Key
- type KeyBinding
- type KeyBindingImpl
- type PublicKey
- type SSHAccount
- type SSHBinding
- type SSHKey
- func (key *SSHKey) Expire()
- func (key *SSHKey) GetNames() StringSet
- func (key *SSHKey) Id() ID
- func (key *SSHKey) Identifiers() []ID
- func (key *SSHKey) IsDeprecated() bool
- func (key *SSHKey) Json() ([]byte, error)
- func (key *SSHKey) KeyType() string
- func (s *SSHKey) Merge(k Key)
- func (key *SSHKey) PublicKeyString() string
- func (key *SSHKey) ReplacementID() ID
- func (key *SSHKey) StandardString(id ID, other ...string) string
- func (key *SSHKey) String() string
- type StringSet
- func (set *StringSet) Add(s string)
- func (set *StringSet) AddArray(a []string)
- func (set *StringSet) AddSet(other StringSet)
- func (s *StringSet) Contains(str string) bool
- func (s *StringSet) Count() int
- func (s *StringSet) Join(sep string) string
- func (s *StringSet) MarshalJSON() ([]byte, error)
- func (s *StringSet) StringArray() []string
- func (s *StringSet) UnmarshalJSON(data []byte) error
- func (s *StringSet) Values() chan string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseAWSCredentials ¶
Types ¶
type AWSAccount ¶
type AWSAccount struct { Arn AWSAccountID Aliases StringSet // contains filtered or unexported fields }
func NewAWSAccount ¶
func NewAWSAccount(arn AWSAccountID, connID ID, keys []KeyBindingImpl, aliases ...string) *AWSAccount
func (*AWSAccount) AddBinding ¶
func (a *AWSAccount) AddBinding(k Key)
func (*AWSAccount) Bindings ¶
func (a *AWSAccount) Bindings() <-chan KeyBindingImpl
func (*AWSAccount) ConnectionID ¶
func (a *AWSAccount) ConnectionID() ID
func (*AWSAccount) Id ¶
func (a *AWSAccount) Id() ID
func (*AWSAccount) Merge ¶
func (a *AWSAccount) Merge(account Account)
func (*AWSAccount) String ¶
func (a *AWSAccount) String() string
type AWSAccountID ¶
type AWSAccountID string
type AWSIamAccount ¶
type AWSIamAccount struct { Arn ARN Username string CreateDate time.Time // contains filtered or unexported fields }
func NewIAMAccount ¶
func NewIAMAccount(md *iam.User, conn ID) *AWSIamAccount
func NewIAMAccountFromKey ¶
func NewIAMAccountFromKey(md *iam.AccessKeyMetadata, userMd *iam.User, conn ID) *AWSIamAccount
func (*AWSIamAccount) AddBinding ¶
func (a *AWSIamAccount) AddBinding(k Key)
func (*AWSIamAccount) Bindings ¶
func (a *AWSIamAccount) Bindings() <-chan KeyBindingImpl
func (*AWSIamAccount) ConnectionID ¶
func (a *AWSIamAccount) ConnectionID() ID
func (*AWSIamAccount) Id ¶
func (a *AWSIamAccount) Id() ID
func (*AWSIamAccount) Identifiers ¶
func (a *AWSIamAccount) Identifiers() []ID
func (*AWSIamAccount) Merge ¶
func (a *AWSIamAccount) Merge(other Account)
func (*AWSIamAccount) String ¶
func (a *AWSIamAccount) String() string
type AWSInstanceAccount ¶
type AWSInstanceAccount struct {
InstanceId, NameTag, PublicDNS string
// contains filtered or unexported fields
}
func NewAWSInstanceAccount ¶
func NewAWSInstanceAccount(instance *ec2.Instance, connID ID, keys []KeyBindingImpl) *AWSInstanceAccount
func (*AWSInstanceAccount) AddBinding ¶
func (a *AWSInstanceAccount) AddBinding(k Key)
func (*AWSInstanceAccount) Bindings ¶
func (a *AWSInstanceAccount) Bindings() <-chan KeyBindingImpl
func (*AWSInstanceAccount) ConnectionID ¶
func (a *AWSInstanceAccount) ConnectionID() ID
func (*AWSInstanceAccount) Id ¶
func (a *AWSInstanceAccount) Id() ID
func (*AWSInstanceAccount) Merge ¶
func (a *AWSInstanceAccount) Merge(account Account)
func (*AWSInstanceAccount) String ¶
func (a *AWSInstanceAccount) String() string
type AWSKey ¶
type AWSKey struct {
AwsKeyId, AwsSecretKey string
Active bool
// contains filtered or unexported fields
}
func (*AWSKey) Identifiers ¶
func (*AWSKey) IsDeprecated ¶
func (key *AWSKey) IsDeprecated() bool
func (*AWSKey) ReplacementID ¶
func (key *AWSKey) ReplacementID() ID
func (*AWSKey) StandardString ¶
type Account ¶
type Account interface { Ider Bindings() <-chan KeyBindingImpl Merge(a Account) ConnectionID() ID }
type BindingLocation ¶
type BindingLocation string
* Where a Key is bound on an account
const ( FILE BindingLocation = "FILE" AUTHORIZED_KEYS BindingLocation = "AUTHORIZED_KEYS" AWS_CREDENTIALS BindingLocation = "CREDENTIALS" INSTANCE_ROOT_CREDENTIALS BindingLocation = "INSTANCE ROOT" )
type Change ¶
type Change struct { Type string Account ID Add, Remove []KeyBindingImpl }
type FanInAccounts ¶
type FanInAccounts struct {
// contains filtered or unexported fields
}
func NewFanInAccount ¶
func NewFanInAccount() *FanInAccounts
func (*FanInAccounts) Add ¶
func (f *FanInAccounts) Add(c <-chan Account)
func (*FanInAccounts) DoneAdding ¶
func (f *FanInAccounts) DoneAdding()
func (*FanInAccounts) Output ¶
func (f *FanInAccounts) Output() chan Account
func (*FanInAccounts) Wait ¶
func (f *FanInAccounts) Wait()
type FanInKeys ¶
type FanInKeys struct {
// contains filtered or unexported fields
}
func NewFanInKey ¶
func (*FanInKeys) DoneAdding ¶
func (f *FanInKeys) DoneAdding()
type IDList ¶
type IDList struct {
Ids []ID
}
func (IDList) MarshalJSON ¶
func (*IDList) UnmarshalJSON ¶
type Identiferser ¶
type Identiferser interface {
Identifiers() []ID
}
type Key ¶
type Key interface { Id() ID //IdString() string Identifiers() []ID GetNames() StringSet IsDeprecated() bool Expire() ReplacementID() ID Merge(Key) }
func LoadJsonFile ¶
func LoadTypeFromJSON ¶
func SSHLoadJson ¶
type KeyBinding ¶
type KeyBindingImpl ¶
type KeyBindingImpl struct { KeyID ID //AccountID ID `json:",omitempty"` Location BindingLocation `json:",omitempty"` Name string `json:",omitempty"` }
func (*KeyBindingImpl) Describe ¶
func (k *KeyBindingImpl) Describe(keylib Fetcher) (s string, key interface{})
Describe returns a key binding description and the key described
func (*KeyBindingImpl) GetSshLine ¶
func (k *KeyBindingImpl) GetSshLine(keylib Fetcher) (string, error)
type SSHAccount ¶
type SSHAccount struct {
Username, Host string
// contains filtered or unexported fields
}
func NewSSHAccount ¶
func NewSSHAccount(username string, name string, connID ID, keys []KeyBindingImpl) *SSHAccount
func (*SSHAccount) AddBinding ¶
func (a *SSHAccount) AddBinding(k Key)
func (*SSHAccount) Bindings ¶
func (a *SSHAccount) Bindings() <-chan KeyBindingImpl
func (*SSHAccount) ConnectionID ¶
func (a *SSHAccount) ConnectionID() ID
func (*SSHAccount) Id ¶
func (a *SSHAccount) Id() ID
func (*SSHAccount) Merge ¶
func (a *SSHAccount) Merge(account Account)
func (*SSHAccount) String ¶
func (a *SSHAccount) String() string
type SSHBinding ¶
Use of a public Key, e.g. in an authorized_keys file
type SSHKey ¶
type SSHKey struct { Ids IDList PublicKey PublicKey Comments StringSet // contains filtered or unexported fields }
* An SSH Key, public and (optionally) private
func (*SSHKey) Identifiers ¶
func (*SSHKey) IsDeprecated ¶
func (key *SSHKey) IsDeprecated() bool
func (*SSHKey) PublicKeyString ¶
func (*SSHKey) ReplacementID ¶
func (key *SSHKey) ReplacementID() ID
func (*SSHKey) StandardString ¶
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
func (*StringSet) MarshalJSON ¶
func (*StringSet) StringArray ¶
func (*StringSet) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.