Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Credential struct {
TargetName string
Comment string
LastWritten time.Time
CredentialBlob []byte
Attributes []CredentialAttribute
TargetAlias string
UserName string
Persist CredentialPersistence
}
type CredentialAttribute ¶
type CredentialPersistence ¶
type CredentialPersistence uint32
const ( PersistSession CredentialPersistence = 0x1 PersistLocalMachine CredentialPersistence = 0x2 PersistEnterprise CredentialPersistence = 0x3 )
type DomainPassword ¶
type DomainPassword struct {
Credential
}
func GetDomainPassword ¶
func GetDomainPassword(targetName string) (*DomainPassword, error)
Get the domain password credential with the given target host name
func NewDomainPassword ¶
func NewDomainPassword(targetName string) (result *DomainPassword)
Create a new domain password credential used for login to the given target host name
func (*DomainPassword) Delete ¶
func (t *DomainPassword) Delete() (err error)
Delete the domain password credential from Windows credential manager
func (*DomainPassword) SetPassword ¶
func (t *DomainPassword) SetPassword(pw string)
Set the CredentialBlob field of a domain password credential using an UTF16 encoded password string
func (*DomainPassword) Write ¶
func (t *DomainPassword) Write() (err error)
Persist the domain password credential to Windows credential manager
type GenericCredential ¶
type GenericCredential struct {
Credential
}
func GetGenericCredential ¶
func GetGenericCredential(targetName string) (*GenericCredential, error)
Get the generic credential with the given name from Windows credential manager
func NewGenericCredential ¶
func NewGenericCredential(targetName string) (result *GenericCredential)
Create a new generic credential with the given name
func (*GenericCredential) Delete ¶
func (t *GenericCredential) Delete() (err error)
Delete the credential from Windows credential manager
func (*GenericCredential) Write ¶
func (t *GenericCredential) Write() (err error)
Persist the credential to Windows credential manager