Documentation
¶
Index ¶
Constants ¶
View Source
const ( Created = "created" Updated = "updated" SoftDeleted = "soft-deleted" Undeleted = "undeleted" HardDeleted = "hard-deleted" )
View Source
const (
RevisionResourceType = "corteza::system:revision"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
// changed field
Key string `json:"key"`
Old []any `json:"old,omitempty"`
New []any `json:"new,omitempty"`
}
func (*Change) MarshalJSON ¶
type Filter ¶
type Filter struct {
ResourceID uint64 `json:"resourceID,string"`
}
func (Filter) Constraints ¶
func (Filter) Cursor ¶
func (f Filter) Cursor() *filter.PagingCursor
func (Filter) Expression ¶
func (Filter) OrderBy ¶
func (f Filter) OrderBy() filter.SortExprSet
type Revision ¶
type Revision struct {
ID uint64 `json:"changeID,string"`
Timestamp time.Time `json:"timestamp"`
ResourceID uint64 `json:"resourceID,string"`
Revision int `json:"revision"`
Operation Operation `json:"operation"`
UserID uint64 `json:"userID,string"`
Changes []*Change `json:"changes"`
Comment string `json:"comment"`
}
generic revision struct
func (*Revision) CollectChanges ¶
func (r *Revision) CollectChanges(new, old dal.ValueGetter, skip ...string) (err error)
untested
func (*Revision) CountValues ¶
CountValues satisfies dal.ValueGetter interface
Click to show internal directories.
Click to hide internal directories.