Documentation
¶
Index ¶
Constants ¶
const ( EventName = "event" EventShutdown = "shutdown" )
The events of a stream of the broadcaster's events: each event, and that the server is stopping, before the stream ends, so a client knows it ended as there will be no more events
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Action EventAction `json:"action" help:"How it changed, which is create, update or delete" example:"create"`
Schema string `json:"schema,omitempty" help:"Schema of the table which changed" example:"llm"`
Table string `json:"table,omitempty" help:"Table which changed" example:"provider"`
Row string `json:"row,omitempty" help:"Row, or rows, which changed, such as by an identifier" example:"ollama"`
Data json.RawMessage `json:"data,omitempty" help:"What the table says of the change, such as a row's new serial"`
}
Event is a change: how it changed, which is its action, what changed, which is a table of a schema, and which row, or rows, changed, when it says, such as by an identifier which the rows share, and what the table says of the change, such as a row's new serial, when it says anything
type EventAction ¶
type EventAction string
EventAction is how something changed: it was created, updated or deleted
const ( EventCreate EventAction = "create" // Created EventUpdate EventAction = "update" // Updated EventDelete EventAction = "delete" // Deleted )
func (EventAction) String ¶
func (a EventAction) String() string
func (*EventAction) UnmarshalJSON ¶
func (a *EventAction) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes an action, which must be one of the actions