Versions in this module Expand all Collapse all v1 v1.0.1 Feb 3, 2021 v1.0.0 Jan 18, 2021 Changes in this version + const StatusCreated + const StatusDeleted + const StatusUpdated + const TopicSync + type Cache interface + Clear func() + Erase func(id int, layer func(id int, resource interface{})) + Get func(id int) (resource interface{}, ok bool) + GetAll func() (resources []interface{}) + Insert func(id int, resource interface{}, layer func(id int, resource interface{})) + func NewCache() Cache + type Id interface + GetId func() int + SetId func(id int) + type Model interface + Create func(resource Id, context interface{}) (int, error) + Delete func(id int, context interface{}) error + Get func(id int) (interface{}, error) + GetList func() ([]interface{}, error) + SetBeforeEraseLayer func(layer func(id int, resource interface{})) + SetBeforeInsertLayer func(layer func(id int, resource interface{})) + SetBeforeNotifyLayer func(layer func(id int, e *event.Event)) + Sync func() error + SyncSingle func(id int) (interface{}, error) + Table func() database.Table + Update func(resource Id, context interface{}) error + func New(db database.Database, resource Id, topic string, isCache bool, ...) (Model, error) + type PrimaryKey struct + func (p *PrimaryKey) GetId() int + func (p *PrimaryKey) SetId(id int) + type Resource struct + func (r *Resource) GetId() int + func (r *Resource) SetId(id int)