Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoData = noData{}
NoData is a model with no data to persist.
Functions ¶
This section is empty.
Types ¶
type Persistable ¶
type Persistable interface {
Persist(ctx context.Context, s StorageBatch) error
}
A Persistable can persist a full copy of itself or its components as part of a storage batch
type PersistableList ¶ added in v0.5.0
type PersistableList []Persistable
A PersistableList is a list of Persistables that should be persisted together
func (PersistableList) Persist ¶ added in v0.5.0
func (pl PersistableList) Persist(ctx context.Context, s StorageBatch) error
type Storage ¶ added in v0.5.0
type Storage interface {
PersistBatch(ctx context.Context, ps ...Persistable) error
}
A Storage can marshal models into a serializable format and persist them.
type StorageBatch ¶ added in v0.5.0
A StorageBatch persists a model to storage as part of a batch such as a transaction.
Click to show internal directories.
Click to hide internal directories.