Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Journal ¶
type Journal struct {
CreateDate int64 `json:"createDate" bson:"createDate"`
UpdateDate int64 `json:"updateDate" bson:"updateDate"`
DeleteDate int64 `json:"deleteDate" bson:"deleteDate"`
Note string `json:"note" bson:"note"`
Revision int64 `json:"signature" bson:"signature"`
}
Journal tracks a summary of changes to an object over time. Journal implements *most* of the data.Object interface (except for the ID function) right out of the box, so it's a useful example for implementing the data.Object interface, or even to embed directly into an existing model object.
func (*Journal) ETag ¶
ETag returns the signature for this object. It currently returns the "revision number" which should be fine unless we make out-of-band updates to objects.
func (*Journal) IsDeleted ¶
IsDeleted returns TRUE if the object has been "virtually deleted" from the database
func (*Journal) SetCreated ¶
SetCreated must be called whenever a new object is added to the database
func (*Journal) SetDeleted ¶
SetDeleted must be called to "virtual-delete" an object in the database
func (*Journal) SetUpdated ¶
SetUpdated must be called whenever an existing object is updated in the database