AddableField represents a field that should be added to all objects of a given type that do not have a field matching Name. This is useful if some data is persisted, then a migration to add a new field is required. Rather than rewriting all existing data, a default value can be added by specifying an AddableField.
type AddableField struct { Name FieldName BoolVal *bool StringVal *string IntVal *int Int8Val *int8 Int16Val *int16 Int32Val *int32 Int64Val *int64 UintVal *uint Uint8Val *uint8 Uint16Val *uint16 Uint32Val *uint32 Uint64Val *uint64 ByteVal *byte RuneVal *rune Float32Val *float32 Float64Val *float64 Complex64Val *complex64 Complex128Val *complex128 TimeVal *time.Time }
func NewBoolAddableField(name FieldName, b bool) *AddableField
func NewByteAddableField(name FieldName, b byte) *AddableField
func NewComplex128AddableField(name FieldName, c complex128) *AddableField
func NewComplex64AddableField(name FieldName, c complex64) *AddableField
func NewFloat32AddableField(name FieldName, f float32) *AddableField
func NewFloat64AddableField(name FieldName, f float64) *AddableField
func NewInt16AddableField(name FieldName, i int16) *AddableField
func NewInt32AddableField(name FieldName, i int32) *AddableField
func NewInt64AddableField(name FieldName, i int64) *AddableField
func NewInt8AddableField(name FieldName, i int8) *AddableField
func NewIntAddableField(name FieldName, i int) *AddableField
func NewRuneAddableField(name FieldName, r rune) *AddableField
func NewStringAddableField(name FieldName, s string) *AddableField
func NewTimeAddableField(name FieldName, t time.Time) *AddableField
func NewUint16AddableField(name FieldName, u uint16) *AddableField
func NewUint32AddableField(name FieldName, u uint32) *AddableField
func NewUint64AddableField(name FieldName, u uint64) *AddableField
func NewUint8AddableField(name FieldName, u uint8) *AddableField
func NewUintAddableField(name FieldName, u uint) *AddableField
func (af *AddableField) Value() any
type EntitleEntitlement int8
const ( CannotEntitle EntitleEntitlement = iota CanEntitle )
type FieldName string
type ReadAsyncRequest struct { ReadRequest *readerp.ReadRequest Ch chan ReadAsyncResponse }
type ReadAsyncResponse struct { Event main_shared.Event ReadObjects []*ReadObject ServerStatus *ServerStatus AggregationResponse *big.Rat AggregationExists bool Error error }
type ReadEntitlement int8
const ( CannotRead ReadEntitlement = iota CanRead )
type ReadObject struct { Error error ObjectId shared.ObjectId LastWrite shared.Tt TtFrom shared.Tt TtTo shared.Tt VtFrom shared.Vt VtTo shared.Vt TtResolvedAt shared.Tt VtResolvedAt shared.Vt TimesliceId shared.TimesliceId Fqn shared.Fqn Blob *shared.Blob }
func NewReadObject(err error, oid shared.ObjectId, lastWrite shared.Tt, ttFrom shared.Tt, ttTo shared.Tt, vtFrom shared.Vt, vtTo shared.Vt, ttResolvedAt shared.Tt, vtResolvedAt shared.Vt, timesliceId shared.TimesliceId, fqn shared.Fqn, blob *shared.Blob) *ReadObject
type ServerStatus struct { GitRevision string }
func NewServerStatus(gitRevision string) *ServerStatus
type ServerType int8
const ( ReaderServerType ServerType = iota WriterServerType )
type SubscribeResponse struct { Tt shared.Tt Vt shared.Vt SubscriptionId SubscriptionId }
func (sr *SubscribeResponse) IsZero() bool
type SubscriptionId int64
type WriteAsyncRequest struct { WriteRequest *writerp.WriteRequest Ch chan WriteAsyncResponse }
type WriteAsyncResponse struct { WrittenTransactions []*WrittenTransaction Error error }
type WriteEntitlement int8
const ( CannotWrite WriteEntitlement = iota CanWrite )
type WrittenObject struct { Error error ObjectId shared.ObjectId LastWrite shared.Tt }
func NewWrittenObject(err error, oid shared.ObjectId, lastWrite shared.Tt) *WrittenObject
type WrittenTransaction struct { Error error Tt shared.Tt WrittenObjects []*WrittenObject }
func NewWrittenTransaction(err error, tt shared.Tt, writtenObjects []*WrittenObject) *WrittenTransaction