shad-go/shopfront/model.go
2022-03-31 16:21:18 +03:00

19 lines
298 B
Go

package shopfront
import "context"
type (
ItemID int64
UserID int64
)
type Item struct {
ViewCount int
Viewed bool
}
type Counters interface {
GetItems(ctx context.Context, ids []ItemID, userID UserID) ([]Item, error)
RecordView(ctx context.Context, id ItemID, userID UserID) error
}