server

package
v0.0.0-...-246ae54 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAggregateEventHandler

func FetchAggregateEventHandler(w http.ResponseWriter, r *http.Request)

func FetchAllEventHandler

func FetchAllEventHandler(w http.ResponseWriter, r *http.Request)

func HealthHandler

func HealthHandler(w http.ResponseWriter, r *http.Request)

func RetrieveHandler

func RetrieveHandler(w http.ResponseWriter, r *http.Request)

func Serve

func Serve(db *gorm.DB)

func SlaveSync

func SlaveSync(db *gorm.DB)

func StoreHandler

func StoreHandler(w http.ResponseWriter, r *http.Request)

Types

type EventData

type EventData struct {
	AggregateName string `json:"aggregate_name"`
	AggregateID   string `json:"aggregate_id"`
	EventName     string `json:"event_name"`
	Version       int64  `json:"version"`
	Data          any    `json:"data"`
	TimeMillis    int64  `json:"time_millis"`
}

type FetchAggregateEventInput

type FetchAggregateEventInput struct {
	WaitTimeMillisIfEmpty int64  `json:"wait_time_millis_if_empty"`
	AggregateName         string `json:"aggregate_name"`
	AfterID               int    `json:"after_id"`
	Limit                 int    `json:"limit"`
}

type FetchAllEventInput

type FetchAllEventInput struct {
	WaitTimeMillisIfEmpty int64 `json:"wait_time_millis_if_empty"`
	AfterID               int   `json:"after_id"`
	Limit                 int   `json:"limit"`
}

type RetrieveInput

type RetrieveInput struct {
	AggregateID   string `json:"aggregate_id"`
	AggregateName string `json:"aggregate_name"`
	AfterVersion  int    `json:"after_version"`
}

Jump to

Keyboard shortcuts

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