Comment on page
Record Field Classes
Description of each accessible field type Class in the Keeper Secrets Manager Go SDK
Use the
GetFieldByType
function to access record fields.loginField, ok := secret.GetFieldByType(ksm.Login{}).(*ksm.Login)
All Record Fields extend the
KeeperRecordField
class, and contain a Label
and Type
fieldstype KeeperRecordField struct {
Type string `json:"type"`
Label string `json:"label,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Type | string | Yes | "" |
type Password struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
EnforceGeneration bool `json:"enforceGeneration,omitempty"`
Complexity PasswordComplexity `json:"complexity,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
EnforceGeneration | bool | No | false |
Value | []string | Yes | |
type Url struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type FileRef struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
Value | []string | Yes | |
type OneTimeCode struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type Name struct {
First string `json:"first,omitempty"`
Middle string `json:"middle,omitempty"`
Last string `json:"last,omitempty"`
}
Name | Type | Required | Default |
First | string | No | "" |
Middle | string | No | "" |
Last | string | No | "" |
type Names struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []Name `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []Name | Yes | |
type BirthDate struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []int64 `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []int64 | Yes | |
type Date struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []int64 `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []int64 | Yes | |
type ExpirationDate struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []int64 `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []int64 | Yes | |
type Text struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type SecurityQuestion struct {
Question string `json:"question,omitempty"`
Answer string `json:"answer,omitempty"`
}
Name | Type | Required | Default |
Question | string | No | "" |
Answer | string | No | "" |
type SecurityQuestions struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []SecurityQuestion `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []SecurityQuestion | Yes | |
type Multiline struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type Email struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type CardRef struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type AddressRef struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type PinCode struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type Phone struct {
Region string `json:"region,omitempty"`
Number string `json:"number,omitempty"`
Ext string `json:"ext,omitempty"`
Type string `json:"type,omitempty"`
}
Name | Type | Required | Default |
Region | string | No | "" |
Number | string | No | "" |
Ext | string | No | "" |
Type | string | No | "" |
type Phones struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []Phone `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []Phone | Yes | |
type Secret struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type SecureNote struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type AccountNumber struct {
KeeperRecordField
Required bool `json:"required,omitempty"`
PrivacyScreen bool `json:"privacyScreen,omitempty"`
Value []string `json:"value,omitempty"`
}
Name | Type | Required | Default |
Label | string | No | "" |
Required | bool | No | false |
PrivacyScreen | bool | No | false |
Value | []string | Yes | |
type PaymentCard struct {
CardNumber string `json:"cardNumber,omitempty"`
CardExpirationDate string `json:"cardExpirationDate,omitempty"`
CardSecurityCode string `json:"cardSecurityCode,omitempty"`
}
Name | Type | Required | Default |
CardNumber | string | No | "" |
CardExpirationDate | string | No |