Documentation ¶
Index ¶
- func Gunzip(data []byte) (resData []byte, err error)
- type ChangeEvent
- type ChangeEventHelper
- type ChangeEventOperation
- 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]) GetOperation ¶ added in v0.0.3
func (c ChangeEvent[T]) GetOperation() ChangeEventOperation
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 ChangeEventHelper ¶ added in v0.0.3
type ChangeEventHelper interface { GetOperation() ChangeEventOperation GetBefore() any GetAfter() any }
type ChangeEventOperation ¶ added in v0.0.3
type ChangeEventOperation string
const ( ChangeEventInsert ChangeEventOperation = "INSERT" ChangeEventUpdate ChangeEventOperation = "UPDATE" ChangeEventDelete ChangeEventOperation = "DELETE" )
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) Scan ¶
func (arr *StringArray) Scan(value interface{}) error
Click to show internal directories.
Click to hide internal directories.