Record Field Classes

Description of each accessible field type Class in the Keeper Secrets Manager Go SDK

Accessing Record Fields

Use the GetFieldByType function to access record fields.

loginField, ok := secret.GetFieldByType(ksm.Login{}).(*ksm.Login)

Field Type Classes Reference

KeeperRecordField

All Record Fields extend the KeeperRecordField class, and contain a Label and Type fields

type KeeperRecordField struct {
	Type  string `json:"type"`
	Label string `json:"label,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Type

string

Yes

""

Password

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"`
}

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

type Url struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

FileRef

type FileRef struct {
	KeeperRecordField
	Required bool     `json:"required,omitempty"`
	Value    []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

Value

[]string

Yes

OneTimeCode

type OneTimeCode struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

Name

type Name struct {
	First  string `json:"first,omitempty"`
	Middle string `json:"middle,omitempty"`
	Last   string `json:"last,omitempty"`
}

Field Values

Name

Type

Required

Default

First

string

No

""

Middle

string

No

""

Last

string

No

""

Names

type Names struct {
	KeeperRecordField
	Required      bool   `json:"required,omitempty"`
	PrivacyScreen bool   `json:"privacyScreen,omitempty"`
	Value         []Name `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]Name

Yes

BirthDate

type BirthDate struct {
	KeeperRecordField
	Required      bool    `json:"required,omitempty"`
	PrivacyScreen bool    `json:"privacyScreen,omitempty"`
	Value         []int64 `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]int64

Yes

Date

type Date struct {
	KeeperRecordField
	Required      bool    `json:"required,omitempty"`
	PrivacyScreen bool    `json:"privacyScreen,omitempty"`
	Value         []int64 `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]int64

Yes

ExpirationDate

type ExpirationDate struct {
	KeeperRecordField
	Required      bool    `json:"required,omitempty"`
	PrivacyScreen bool    `json:"privacyScreen,omitempty"`
	Value         []int64 `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]int64

Yes

Text

type Text struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

SecurityQuestion

type SecurityQuestion struct {
	Question string `json:"question,omitempty"`
	Answer   string `json:"answer,omitempty"`
}

Field Values

Name

Type

Required

Default

Question

string

No

""

Answer

string

No

""

SecurityQuestions

type SecurityQuestions struct {
	KeeperRecordField
	Required      bool               `json:"required,omitempty"`
	PrivacyScreen bool               `json:"privacyScreen,omitempty"`
	Value         []SecurityQuestion `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]SecurityQuestion

Yes

Multiline

type Multiline struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

Email

type Email struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

CardRef

type CardRef struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

AddressRef

type AddressRef struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

PinCode

type PinCode struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

Phone

type Phone struct {
	Region string `json:"region,omitempty"`
	Number string `json:"number,omitempty"`
	Ext    string `json:"ext,omitempty"`
	Type   string `json:"type,omitempty"`
}

Field Values

Name

Type

Required

Default

Region

string

No

""

Number

string

No

""

Ext

string

No

""

Type

string

No

""

Phones

type Phones struct {
	KeeperRecordField
	Required      bool    `json:"required,omitempty"`
	PrivacyScreen bool    `json:"privacyScreen,omitempty"`
	Value         []Phone `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]Phone

Yes

Secret

type Secret struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

SecureNote

type SecureNote struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

AccountNumber

type AccountNumber struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

PaymentCard

type PaymentCard struct {
	CardNumber         string `json:"cardNumber,omitempty"`
	CardExpirationDate string `json:"cardExpirationDate,omitempty"`
	CardSecurityCode   string `json:"cardSecurityCode,omitempty"`
}

Field Values

Name

Type

Required

Default

CardNumber

string

No

""

CardExpirationDate

string

No

""

CardSecurityCode

string

No

""

PaymentCards

type PaymentCards struct {
	KeeperRecordField
	Required      bool          `json:"required,omitempty"`
	PrivacyScreen bool          `json:"privacyScreen,omitempty"`
	Value         []PaymentCard `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]PaymentCard

Yes

BankAccount

type BankAccount struct {
	AccountType   string `json:"accountType,omitempty"`
	RoutingNumber string `json:"routingNumber,omitempty"`
	AccountNumber string `json:"accountNumber,omitempty"`
	OtherType     string `json:"otherType,omitempty"`
}

Field Values

Name

Type

Required

Default

AccountType

string

No

""

RoutingNumber

string

No

""

AccountNumber

string

No

""

OtherType

string

No

""

BankAccounts

type BankAccounts struct {
	KeeperRecordField
	Required      bool          `json:"required,omitempty"`
	PrivacyScreen bool          `json:"privacyScreen,omitempty"`
	Value         []BankAccount `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]BankAccount

Yes

KeyPair

type KeyPair struct {
	PublicKey  string `json:"publicKey,omitempty"`
	PrivateKey string `json:"privateKey,omitempty"`
}

Name

Type

Required

Default

PublicKey

string

No

""

PrivateKey

string

No

""

KeyPairs

type KeyPairs struct {
	KeeperRecordField
	Required      bool      `json:"required,omitempty"`
	PrivacyScreen bool      `json:"privacyScreen,omitempty"`
	Value         []KeyPair `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]KeyPair

Yes

Host

type Host struct {
	Hostname string `json:"hostName,omitempty"`
	Port     string `json:"port,omitempty"`
}

Field Values

Name

Type

Required

Default

Hostname

string

No

""

Port

string

No

""

Hosts

type Hosts struct {
	KeeperRecordField
	Required      bool   `json:"required,omitempty"`
	PrivacyScreen bool   `json:"privacyScreen,omitempty"`
	Value         []Host `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]Host

Yes

Address

type Address struct {
	Street1 string `json:"street1,omitempty"`
	Street2 string `json:"street2,omitempty"`
	City    string `json:"city,omitempty"`
	State   string `json:"state,omitempty"`
	Country string `json:"country,omitempty"`
	Zip     string `json:"zip,omitempty"`
}

Field Values

Name

Type

Required

Default

Street1

string

No

""

Street2

string

No

""

City

string

No

""

State

string

No

""

Country

string

No

""

Zip

string

No

""

Addresses

type Addresses struct {
	KeeperRecordField
	Required      bool      `json:"required,omitempty"`
	PrivacyScreen bool      `json:"privacyScreen,omitempty"`
	Value         []Address `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]Address

Yes

LicenseNumber

type LicenseNumber struct {
	KeeperRecordField
	Required      bool     `json:"required,omitempty"`
	PrivacyScreen bool     `json:"privacyScreen,omitempty"`
	Value         []string `json:"value,omitempty"`
}

Field Values

Name

Type

Required

Default

Label

string

No

""

Required

bool

No

false

PrivacyScreen

bool

No

false

Value

[]string

Yes

KeeperFileData

type KeeperFileData struct {
	Title        string `json:"title,omitempty"`
	Name         string `json:"name,omitempty"`
	Type         string `json:"type,omitempty"`
	Size         int64  `json:"size,omitempty"`
	LastModified int64  `json:"lastModified,omitempty"`
}

Field Values

Name

Type

Required

Default

Title

string

Yes

Name

string

Yes

Type

string

Yes

Size

int64

Yes

LastModified

int64

Yes

Last updated