Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRepository = errors.New("unable to handle request") ErrNotFound = errors.New("event not found") ErrIDExists = errors.New("event id already exists") ErrNameExists = errors.New("event name already exists") )
Common Errors
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { ID uuid.UUID TenantID uuid.UUID Name string }
Event holds event details
type Repository ¶
type Repository interface { Create(ctx context.Context, event Event) (*uuid.UUID, error) Get(ctx context.Context, id uuid.UUID) (*Event, error) Update(ctx context.Context, event Event) error Delete(ctx context.Context, tenantID uuid.UUID, id uuid.UUID) error List(ctx context.Context, tenantID uuid.UUID) ([]*Event, error) }
Repository describes the resource methods needed for this service.
Click to show internal directories.
Click to hide internal directories.