Documentation ¶
Index ¶
- func Gunzip(data []byte) (resData []byte, err error)
- type ChangeEvent
- func (c ChangeEvent[T]) GetAfter() any
- func (c ChangeEvent[T]) GetBefore() any
- func (c ChangeEvent[T]) GetCompanyID() *string
- func (c ChangeEvent[T]) GetDiff() []string
- func (c ChangeEvent[T]) GetID() string
- func (c ChangeEvent[T]) GetKey() []string
- func (c ChangeEvent[T]) GetLocationID() *string
- func (c ChangeEvent[T]) GetMvccTimestamp() string
- func (c ChangeEvent[T]) GetOperation() ChangeEventOperation
- func (c ChangeEvent[T]) GetRegion() string
- func (c ChangeEvent[T]) GetTable() string
- func (c ChangeEvent[T]) GetTimestamp() int64
- func (c ChangeEvent[T]) GetUserID() *string
- func (c ChangeEvent[T]) GetVersion() int64
- func (c ChangeEvent[T]) String() string
- type ChangeEventOperation
- type ChangeEventPayload
- type DateTime
- type JSON
- func (j *JSON) Del(key string) error
- func (j *JSON) Get(key string) (interface{}, error)
- func (JSON) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (JSON) GormDataType() string
- func (js JSON) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (j *JSON) Has(key string) bool
- func (j JSON) MarshalJSON() ([]byte, error)
- func (j *JSON) Scan(value interface{}) error
- func (j *JSON) Set(key string, val interface{}) error
- func (j JSON) String() string
- func (j *JSON) UnmarshalJSON(b []byte) error
- func (j JSON) Value() (driver.Value, error)
- type Meta
- type NullableNumberArray
- type NullableStringArray
- type NumberArray
- type StringArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangeEvent ¶ added in v0.0.3
type ChangeEvent[T any] struct { ID string `json:"id"` Timestamp int64 `json:"timestamp"` MvccTimestamp string `json:"mvccTimestamp"` Table string `json:"table"` Key []string `json:"key"` LocationID *string `json:"locationId,omitempty"` CompanyID *string `json:"companyId,omitempty"` UserID *string `json:"userId,omitempty"` SessionID *string `json:"sessionId,omitempty"` Version int64 `json:"version"` Region string `json:"region"` Operation ChangeEventOperation `json:"operation"` Before *T `json:"before,omitempty"` After *T `json:"after,omitempty"` Diff []string `json:"diff,omitempty"` }
func (ChangeEvent[T]) GetAfter ¶ added in v0.0.3
func (c ChangeEvent[T]) GetAfter() any
func (ChangeEvent[T]) GetBefore ¶ added in v0.0.3
func (c ChangeEvent[T]) GetBefore() any
func (ChangeEvent[T]) GetCompanyID ¶ added in v0.0.6
func (c ChangeEvent[T]) GetCompanyID() *string
func (ChangeEvent[T]) GetDiff ¶ added in v0.0.6
func (c ChangeEvent[T]) GetDiff() []string
func (ChangeEvent[T]) GetID ¶ added in v0.0.6
func (c ChangeEvent[T]) GetID() string
func (ChangeEvent[T]) GetKey ¶ added in v0.0.6
func (c ChangeEvent[T]) GetKey() []string
func (ChangeEvent[T]) GetLocationID ¶ added in v0.0.6
func (c ChangeEvent[T]) GetLocationID() *string
func (ChangeEvent[T]) GetMvccTimestamp ¶ added in v0.0.6
func (c ChangeEvent[T]) GetMvccTimestamp() string
func (ChangeEvent[T]) GetOperation ¶ added in v0.0.3
func (c ChangeEvent[T]) GetOperation() ChangeEventOperation
func (ChangeEvent[T]) GetRegion ¶ added in v0.0.6
func (c ChangeEvent[T]) GetRegion() string
func (ChangeEvent[T]) GetTable ¶ added in v0.0.6
func (c ChangeEvent[T]) GetTable() string
func (ChangeEvent[T]) GetTimestamp ¶ added in v0.0.6
func (c ChangeEvent[T]) GetTimestamp() int64
func (ChangeEvent[T]) GetUserID ¶ added in v0.0.6
func (c ChangeEvent[T]) GetUserID() *string
func (ChangeEvent[T]) GetVersion ¶ added in v0.0.6
func (c ChangeEvent[T]) GetVersion() int64
func (ChangeEvent[T]) String ¶ added in v0.0.3
func (c ChangeEvent[T]) String() string
String returns a JSON stringified version of the ChangeEvent
type ChangeEventOperation ¶ added in v0.0.3
type ChangeEventOperation string
const ( ChangeEventInsert ChangeEventOperation = "INSERT" ChangeEventUpdate ChangeEventOperation = "UPDATE" ChangeEventDelete ChangeEventOperation = "DELETE" )
type ChangeEventPayload ¶ added in v0.0.6
type ChangeEventPayload interface { // GetID returns the event payload id GetID() string // GetTimestamp returns the timestamp in milliseconds when the event occurred GetTimestamp() int64 // GetMvccTimestamp returns the mvcc timestamp in microseconds when the change occurred GetMvccTimestamp() string // GetTable returns the table name GetTable() string // GetKey returns an array of primary keys GetKey() []string // GetLocationID returns the location id or nil if not provided or relevant for this table GetLocationID() *string // GetCompanyID returns the company id or nil if not provided or relevant for this table GetCompanyID() *string // GetUserID returns the user id that made the change or nil if not provided or relevant for this table GetUserID() *string // GetVersion returns a monotonically increasing version number for the change version to this record GetVersion() int64 // GetRegion returns the region where the change was processed GetRegion() string // GetOperation returns the ChangeEventOperation GetOperation() ChangeEventOperation // GetBefore returns the record as a ChangeEvent[T] before this change or nil if not provided GetBefore() any // GetAfter returns the record as a ChangeEvent[T] after this change or nil if not provided GetAfter() any // GetDiff returns an array of string keys of the properties that changed GetDiff() []string }
type DateTime ¶ added in v0.0.3
func (*DateTime) MarshalJSON ¶ added in v0.0.3
func (*DateTime) UnmarshalJSON ¶ added in v0.0.3
type JSON ¶
type JSON json.RawMessage
JSON defined JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (JSON) GormDBDataType ¶
GormDBDataType gorm db data type
func (JSON) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*JSON) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type Meta ¶
type Meta struct { UserID *string `json:"userId,omitempty"` SessionID *string `json:"sessionId,omitempty"` Version *int64 `json:"version,omitempty"` }
type NullableNumberArray ¶
type NullableNumberArray []float64
func (NullableNumberArray) GormDBDataType ¶
GormDBDataType gorm db data type
func (*NullableNumberArray) Scan ¶
func (arr *NullableNumberArray) Scan(value interface{}) error
type NullableStringArray ¶
type NullableStringArray []string
func (NullableStringArray) GormDBDataType ¶
GormDBDataType gorm db data type
func (*NullableStringArray) Scan ¶
func (arr *NullableStringArray) Scan(value interface{}) error
type NumberArray ¶
type NumberArray []float64
func (NumberArray) GormDBDataType ¶
GormDBDataType gorm db data type
func (*NumberArray) Scan ¶
func (arr *NumberArray) Scan(value interface{}) error
type StringArray ¶
type StringArray []string
func (StringArray) GormDBDataType ¶
GormDBDataType gorm db data type
func (StringArray) MarshalJSON ¶ added in v0.0.7
func (arr StringArray) MarshalJSON() ([]byte, error)
MarshalJSON to output non base64 encoded []byte
func (*StringArray) Scan ¶
func (arr *StringArray) Scan(value interface{}) error
func (*StringArray) UnmarshalJSON ¶ added in v0.0.7
func (arr *StringArray) UnmarshalJSON(b []byte) error
UnmarshalJSON to deserialize []byte
Click to show internal directories.
Click to hide internal directories.