Documentation ¶
Index ¶
- Constants
- type DocumentBase
- func (d *DocumentBase) Clear()
- func (d *DocumentBase) Create() error
- func (d *DocumentBase) Init(data any, clear func(), store diface.ICollection, key key.Key)
- func (d *DocumentBase) InitWithCache(data any, clear func(), store diface.ICollection, key key.Key, ...)
- func (d *DocumentBase) InitWithVersion(data any, clear func(), store diface.ICollection, key key.Key, ...)
- func (d *DocumentBase) Load() error
- func (d *DocumentBase) Save() error
- func (d *DocumentBase) Update(f func() bool) error
- type VersionCache
Constants ¶
View Source
const MaxRetries = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentBase ¶
type DocumentBase struct { Key key.Key DocumentStore diface.ICollection // contains filtered or unexported fields }
func (*DocumentBase) Clear ¶
func (d *DocumentBase) Clear()
Clear clears all data on this DocumentBase.
func (*DocumentBase) Create ¶
func (d *DocumentBase) Create() error
Create creates this DocumentBase if it doesn't already exist.
func (*DocumentBase) Init ¶
func (d *DocumentBase) Init( data any, clear func(), store diface.ICollection, key key.Key, )
Init performs an in-place initialization of a DocumentBase.
func (*DocumentBase) InitWithCache ¶
func (d *DocumentBase) InitWithCache( data any, clear func(), store diface.ICollection, key key.Key, cache diface.ICache, )
func (*DocumentBase) InitWithVersion ¶
func (d *DocumentBase) InitWithVersion( data any, clear func(), store diface.ICollection, key key.Key, version noptions.Version, )
func (*DocumentBase) Load ¶
func (d *DocumentBase) Load() error
Load loads this DocumentBase from its store if it exists.
func (*DocumentBase) Save ¶
func (d *DocumentBase) Save() error
Save saves this DocumentBase to the database if it's based on the latest version that Couchbase knows about.
func (*DocumentBase) Update ¶
func (d *DocumentBase) Update(f func() bool) error
type VersionCache ¶ added in v1.0.1
VersionCache is a cache of a version and its data structure.
Click to show internal directories.
Click to hide internal directories.