Documentation ¶
Overview ¶
Package notificationdb contains notification related CRUD functionality.
Index ¶
- type Store
- func (s *Store) Create(ntf notification.Notification) error
- func (s *Store) Delete(ntf notification.Notification) error
- func (s *Store) Query(pageNumber int, rowsPerPage int, topicID uuid.UUID) ([]notification.Notification, error)
- func (s *Store) QueryByID(id uuid.UUID) (notification.Notification, error)
- func (s *Store) WithinTran(fn func(notification.Storer) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages the set of APIs for notification database access.
func (*Store) Create ¶
func (s *Store) Create(ntf notification.Notification) error
Create inserts a new notification into the database.
func (*Store) Delete ¶
func (s *Store) Delete(ntf notification.Notification) error
Delete removes a notification from the database.
func (*Store) Query ¶
func (s *Store) Query(pageNumber int, rowsPerPage int, topicID uuid.UUID) ([]notification.Notification, error)
Query retrieves a list of notification from the database.
func (*Store) QueryByID ¶
func (s *Store) QueryByID(id uuid.UUID) (notification.Notification, error)
QueryByID gets the specified notification from the database by id.
func (*Store) WithinTran ¶
func (s *Store) WithinTran(fn func(notification.Storer) error) error
WithinTran runs passed function and do commit/rollback at the end.
Click to show internal directories.
Click to hide internal directories.