Record Field Classes
Description of each accessible field type Class in the Keeper Secrets Manager Go SDK
Record fields in the Keeper Secrets Manager Go SDK are represented as strongly-typed Go structs. Each field type extends the base KeeperRecordField type.
Accessing Record Fields
Use the GetFieldsByType function to access record fields.
Using GetFieldsByType:
GetFieldsByType(fieldType string) []map[string]interface{}
Returns all standard fields matching the given type as a slice of raw maps. Fields are not automatically deserialized. Access values via map key and type assertion, or unmarshal into a typed struct (see Example 2).
// Get login field from record
if loginFields := record.GetFieldsByType("login"); len(loginFields) > 0 {
loginField := loginFields[0]
// loginField is map[string]interface{} — access values via key
if values, ok := loginField["value"].([]interface{}); ok && len(values) > 0 {
loginValue := values[0].(string)
fmt.Printf("Login: %s\n", loginValue)
}
}Using GetFieldValueByType (recommended for simplicity):
import ksm "github.com/keeper-security/secrets-manager-go/core"
// Get login value directly
login := record.GetFieldValueByType("login")
fmt.Printf("Login: %s\n", login)
// Get password value
password := record.GetFieldValueByType("password")
fmt.Printf("Password: %s\n", password)Field Type Classes Reference
KeeperRecordField
All Record Fields extend the KeeperRecordField class, and contain a Label and Type fields
Field Values
Label
string
No
""
Type
string
Yes
""
Login
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
PasswordComplexity
Field Values
Length
int
No
0
Total password length
Caps
int
No
0
Minimum uppercase letters
Lowercase
int
No
0
Minimum lowercase letters
Digits
int
No
0
Minimum digits
Special
int
No
0
Minimum special characters
Password
Field Values
Name
Type
Required
Default
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
EnforceGeneration
bool
No
false
Value
[]string
Yes
Url
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
FileRef
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]string
Yes
OneTimeCode
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
OneTimePassword
JSON field type string: "otp" (distinct from OneTimeCode which uses "oneTimeCode").
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
Name
Field Values
First
string
No
""
Middle
string
No
""
Last
string
No
""
Names
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]Name
Yes
BirthDate
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]int64
Yes
Date
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]int64
Yes
ExpirationDate
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]int64
Yes
Text
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
SecurityQuestion
Field Values
Question
string
No
""
Answer
string
No
""
SecurityQuestions
Field Values
Name
Type
Required
Default
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]SecurityQuestion
Yes
Multiline
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
CardRef
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
AddressRef
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
PinCode
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
Phone
Field Values
Region
string
No
""
Number
string
No
""
Ext
string
No
""
Type
string
No
""
Phones
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]Phone
Yes
Secret
Field Values
Name
Type
Required
Default
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
SecureNote
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
AccountNumber
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
PaymentCard
Field Values
Name
Type
Required
Default
CardNumber
string
No
""
CardExpirationDate
string
No
""
CardSecurityCode
string
No
""
PaymentCards
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]PaymentCard
Yes
BankAccount
Field Values
AccountType
string
No
""
RoutingNumber
string
No
""
AccountNumber
string
No
""
OtherType
string
No
""
BankAccounts
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]BankAccount
Yes
KeyPair
PublicKey
string
No
""
PrivateKey
string
No
""
KeyPairs
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]KeyPair
Yes
Host
Field Values
Hostname
string
No
""
Port
string
No
""
Hosts
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]Host
Yes
Address
Field Values
Street1
string
No
""
Street2
string
No
""
City
string
No
""
State
string
No
""
Country
string
No
""
Zip
string
No
""
Addresses
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]Address
Yes
LicenseNumber
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]string
Yes
RecordRef
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]string
Yes
Checkbox
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]bool
Yes
Dropdown
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]string
Yes
Schedule
Field Values
Type
string
No
""
Schedule type (e.g. "weekly")
Cron
string
No
""
Cron expression
Time
string
No
""
Time of day (replaces deprecated UtcTime)
Tz
string
No
""
IANA timezone (e.g. "America/Chicago")
Weekday
string
No
""
Day of week for weekly schedules
IntervalCount
int
No
0
Repeat interval count
Schedules
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]Schedule
Yes
DirectoryType
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]string
Yes
DatabaseType
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]string
Yes
PamHostname
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]Host
Yes
Value uses the same Host struct as Hosts. See Host.
AllowedSettings
Field Values
Connections
bool
No
false
PortForwards
bool
No
false
Rotation
bool
No
false
SessionRecording
bool
No
false
TypescriptRecording
bool
No
false
PamResource
Field Values
ControllerUid
string
No
""
FolderUid
string
No
""
ResourceRef
[]string
No
nil
AllowedSettings
AllowedSettings
No
PamResources
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]PamResource
Yes
Script
Field Values
FileRef
string
No
""
UID of the attached script file
Command
string
No
""
Shell command to execute
RecordRef
[]string
No
nil
UIDs of records passed as script context
Scripts
Field Values
Label
string
No
""
Required
bool
No
false
PrivacyScreen
bool
No
false
Value
[]Script
Yes
PamSettingsPortForward
Field Values
ReusePort
bool
No
false
Port
string
No
""
PamSettingsConnection
Field Values
Protocol
string
No
""
UserRecords
[]string
No
nil
Security
string
No
""
IgnoreCert
bool
No
false
ResizeMethod
string
No
""
ColorScheme
string
No
""
PamSetting
Field Values
PortForward
[]PamSettingsPortForward
No
nil
Connection
[]PamSettingsConnection
No
nil
PamSettings
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]PamSetting
Yes
PamRbiConnection
Field Values
Protocol
string
No
""
UserRecords
[]string
No
nil
AllowUrlManipulation
bool
No
false
AllowedUrlPatterns
string
No
""
AllowedResourceUrlPatterns
string
No
""
HttpCredentialsUid
string
No
""
AutofillConfiguration
string
No
""
PamRemoteBrowserSetting
Field Values
Connection
PamRbiConnection
No
PamRemoteBrowserSettings
Field Values
Label
string
No
""
Required
bool
No
false
Value
[]PamRemoteBrowserSetting
Yes
KeeperFileData
Field Values
Title
string
Display title for the file attachment
Name
string
Original filename
Type
string
MIME type
Size
int64
File size in bytes
LastModified
int64
Last modified timestamp (Unix milliseconds)
Field Access Best Practices
Safe Field Access Pattern
When accessing record fields, always check for:
Field existence - The field may not be present in the record
Value existence - The field may exist but have no value
Type assertions - The value may not be in the expected format
Recommended pattern:
Using GetFieldValueByType (simpler):
Handling Broken Fields
If a record contains fields with broken encryption:
Valid fields are still accessible
Broken fields are silently skipped
No errors are thrown for individual field failures
Example:
Common Field Access Patterns
Example 1: Retrieve All Fields from a Login Record
Example 2: Access Complex Fields (Phone, Address)
Example 3: Check if Field Exists Before Accessing
Related Documentation
Go SDK Main Documentation - SDK initialization, configuration, and operations
Keeper Notation - Advanced field access notation syntax
Record Types - Complete list of record types and their fields
Last updated

