database

package
v0.0.0-...-a52efcf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL