Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConverter ¶
func NewConverter() *converter
NewConverter returns a new Converter used for conversion between repository and service representation of system sync model
func NewRepository ¶
func NewRepository(conv EntityConverter) *repository
NewRepository creates a new SystemsSync repository
func NewService ¶
func NewService(syncSystemsRepo SystemsSyncRepository) *service
NewService returns new SystemsSyncService
Types ¶
type Entity ¶
type Entity struct { ID string `db:"id"` TenantID string `db:"tenant_id"` ProductID string `db:"product_id"` LastSyncTimestamp time.Time `db:"last_sync_timestamp"` }
Entity represents the systems last sync timestamps as an entity
type EntityCollection ¶
type EntityCollection []*Entity
EntityCollection is a collection of systems last sync timestamp entities
func (EntityCollection) Len ¶
func (a EntityCollection) Len() int
Len is implementation of a repo.Collection interface
type EntityConverter ¶
type EntityConverter interface { ToEntity(in *model.SystemSynchronizationTimestamp) *Entity FromEntity(entity *Entity) *model.SystemSynchronizationTimestamp }
EntityConverter converts between the service model and entity
type SystemsSyncRepository ¶
type SystemsSyncRepository interface { ListByTenant(ctx context.Context, tenant string) ([]*model.SystemSynchronizationTimestamp, error) Upsert(ctx context.Context, in *model.SystemSynchronizationTimestamp) error }
SystemsSyncRepository represents the Systems Sync timestamps repository layer
Click to show internal directories.
Click to hide internal directories.