internal

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbCommandToBaseCommand

func DbCommandToBaseCommand(dbCmd *Command) (comby.Command, error)

func DbCommandsToBaseCommands

func DbCommandsToBaseCommands(dbCommands []*Command) ([]comby.Command, error)

func DbEventToBaseEvent

func DbEventToBaseEvent(dbEvent *Event) (comby.Event, error)

func DbEventsToBaseEvents

func DbEventsToBaseEvents(dbEvents []*Event) ([]comby.Event, error)

func Deserialize

func Deserialize(dataBytes []byte, dst interface{}) error

func Serialize

func Serialize(src interface{}) ([]byte, error)

Types

type Command

type Command struct {
	// system fields
	ID sql.NullInt64

	// fields
	InstanceId int64  `json:"instance_id"`
	Uuid       string `json:"uuid"`
	TenantUuid string `json:"tenant_uuid"`
	Domain     string `json:"domain"`
	CreatedAt  int64  `json:"created_at"`
	DataType   string `json:"data_type"`
	DataBytes  string `json:"data_bytes"`
	ReqCtx     string `json:"req_ctx"`
}

func BaseCommandToDbCommand

func BaseCommandToDbCommand(cmd comby.Command) (*Command, error)

type Event

type Event struct {
	// system fields
	ID sql.NullInt64

	// fields
	InstanceId    int64  `json:"instance_id"`
	Uuid          string `json:"uuid"`
	TenantUuid    string `json:"tenant_uuid"`
	CommandUuid   string `json:"command_uuid"`
	Domain        string `json:"domain"`
	AggregateUuid string `json:"aggregate_uuid"`
	Version       int64  `json:"version"`
	CreatedAt     int64  `json:"created_at"`
	DataType      string `json:"data_type"`
	DataBytes     string `json:"data_bytes"`
}

func BaseEventToDbEvent

func BaseEventToDbEvent(evt comby.Event) (*Event, error)

helpers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL