Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
// The human-readable title of this field.
Title string
// Whether this field is for use by the system, meaning primarily that it
// can't be removed or modified by the user in any way.
IsSystemField bool
// The data this field contains, or the empty string if it contains no data.
Data string
// A slice of validation functions to use on this field. Each function should
// take a pointer to a single field, then return whether the field is
// considered "valid" or not.
Validators []func(*Field) bool
}
A single field within a record. Certain fields are special and cannot be modified.
type Record ¶
type Record struct {
Id UniqueId
CreatedAt time.Time
// The dates this item existed during. If it's the first version of the
// record, `ValidFrom` will be identical to `CreatedAt`. If it's the current
// version of the record, `ValidTo` will be `nil`.
ValidFrom time.Time
ValidTo time.Time
// The title of this record.
Title string
// An array of GMail-like string tags, in sorted order, de-duplicated.
Tags []string
// The fields used by this record.
Data []*Field
}
Click to show internal directories.
Click to hide internal directories.