messagesrepo

package
v0.0.0-...-cb39d06 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNotFound

type ErrNotFound struct {
	// contains filtered or unexported fields
}

ErrNotFound is returned when a message is not found

func NewErrNotFound

func NewErrNotFound() *ErrNotFound

NewErrNotFound returns a not found error

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

type MessagesRepo

type MessagesRepo struct {
	// contains filtered or unexported fields
}

MessagesRepo is the repo for storing messages

func New

func New(db db.Database) *MessagesRepo

New creates a new messages repo

func (*MessagesRepo) Create

func (r *MessagesRepo) Create(msg spec.MessageSpec) error

Create a message spec

func (*MessagesRepo) Find

func (r *MessagesRepo) Find(topic string) (spec.MessageSpec, error)

Find a message spec by topic

func (*MessagesRepo) FindAll

func (r *MessagesRepo) FindAll() ([]spec.MessageSpec, error)

FindAll returns all messages

func (*MessagesRepo) FindByExchange

func (r *MessagesRepo) FindByExchange(exchange string) ([]spec.MessageSpec, error)

FindByExchange finds all messages for a exchange

func (*MessagesRepo) Migrate

func (r *MessagesRepo) Migrate()

Migrate runs migrations for the messages repo

func (*MessagesRepo) Update

func (r *MessagesRepo) Update(msg spec.MessageSpec) error

Update a message spec

Jump to

Keyboard shortcuts

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