replication

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperationSchemaCollectionUpsert  = "schema.collection_upsert"
	OperationSchemaCollectionDelete  = "schema.collection_delete"
	OperationSchemaCollectionsImport = "schema.collections_import"
	OperationRecordCreate            = "record.create"
	OperationRecordUpdate            = "record.update"
	OperationRecordDelete            = "record.delete"
	OperationAdminUpsert             = "admin.upsert"
	OperationAdminDelete             = "admin.delete"
	OperationParamUpsert             = "param.upsert"
	OperationParamDelete             = "param.delete"
)

Variables

This section is empty.

Functions

func Apply

func Apply(dao *daos.Dao, op vector.ReplicatedOperation) error

func NewAdminDeleteOperation

func NewAdminDeleteOperation(admin *models.Admin) (vector.ReplicatedOperation, error)

func NewAdminUpsertOperation

func NewAdminUpsertOperation(admin *models.Admin, isNew bool) (vector.ReplicatedOperation, error)

func NewCollectionDeleteOperation

func NewCollectionDeleteOperation(collection *models.Collection) (vector.ReplicatedOperation, error)

func NewCollectionUpsertOperation

func NewCollectionUpsertOperation(collection *models.Collection, isNew bool) (vector.ReplicatedOperation, error)

func NewCollectionsImportOperation

func NewCollectionsImportOperation(collections []*models.Collection, deleteMissing bool) (vector.ReplicatedOperation, error)

func NewParamDeleteOperation

func NewParamDeleteOperation(param *models.Param) (vector.ReplicatedOperation, error)

func NewParamUpsertOperation

func NewParamUpsertOperation(param *models.Param, isNew bool) (vector.ReplicatedOperation, error)

func NewRecordDeleteOperation

func NewRecordDeleteOperation(record *models.Record) (vector.ReplicatedOperation, error)

func NewRecordUpsertOperation

func NewRecordUpsertOperation(record *models.Record, isNew bool) (vector.ReplicatedOperation, error)

Types

type AdminDeletePayload

type AdminDeletePayload struct {
	Admin *models.Admin `json:"admin"`
}

type AdminUpsertPayload

type AdminUpsertPayload struct {
	Admin           *models.Admin  `json:"admin"`
	TokenKey        string         `json:"tokenKey"`
	PasswordHash    string         `json:"passwordHash"`
	LastResetSentAt types.DateTime `json:"lastResetSentAt"`
	IsNew           bool           `json:"isNew"`
}

type CollectionDeletePayload

type CollectionDeletePayload struct {
	Collection *models.Collection `json:"collection"`
}

type CollectionUpsertPayload

type CollectionUpsertPayload struct {
	Collection *models.Collection `json:"collection"`
	IsNew      bool               `json:"isNew"`
}

type CollectionsImportPayload

type CollectionsImportPayload struct {
	Collections   []*models.Collection `json:"collections"`
	DeleteMissing bool                 `json:"deleteMissing"`
}

type ParamDeletePayload

type ParamDeletePayload struct {
	Param *models.Param `json:"param"`
}

type ParamUpsertPayload

type ParamUpsertPayload struct {
	Param *models.Param `json:"param"`
	IsNew bool          `json:"isNew"`
}

type RecordDeletePayload

type RecordDeletePayload struct {
	CollectionID string `json:"collectionId"`
	RecordID     string `json:"recordId"`
}

type RecordUpsertPayload

type RecordUpsertPayload struct {
	CollectionID string         `json:"collectionId"`
	Data         map[string]any `json:"data"`
}

Jump to

Keyboard shortcuts

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