Documentation ¶
Overview ¶
Package subscription provides a core business API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("subscription not found") ErrUniqueViolation = errors.New("subscription already exists") )
Set of error variables for CRUD operations.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
Core manages the set of APIs for subscription access.
func (*Core) Create ¶
func (c *Core) Create(ns NewSubscription) (Subscription, error)
Create adds a new subscription to the system.
func (*Core) Delete ¶
func (c *Core) Delete(sub Subscription) error
Delete removes the specified subscription.
type NewSubscription ¶
NewSubscription contains information needed to create a new subscription.
type Storer ¶
type Storer interface { WithinTran(fn func(s Storer) error) error Create(sub Subscription) error Delete(sub Subscription) error Query(pageNumber int, rowsPerPage int) ([]Subscription, error) QueryByID(id uuid.UUID) (Subscription, error) }
Storer interface declares the behavior this package needs to perists and retrieve data.
Click to show internal directories.
Click to hide internal directories.