repositories

package
v0.0.0-...-34e87ae Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MONGODB_BREWJOBCOLLECTION = "brewjob"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Brewjobrepository

type Brewjobrepository interface {
	AddBrewJob(entities.BrewJob) ([]byte, error)
	FindByBrewJobById([]byte) (entities.BrewJob, error)
	FindAllBrewJobs() ([]entities.BrewJob, error)
	ChangeStatus([]byte, string) error

	ExecuteCommand(interface{}) (interface{}, error)
}

func NewEventRepository

func NewEventRepository(connection string) (Brewjobrepository, error)

func NewMongoDBLayer

func NewMongoDBLayer(connection string) (Brewjobrepository, error)

type MongoDBLayer

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

func (*MongoDBLayer) AddBrewJob

func (mgoLayer *MongoDBLayer) AddBrewJob(brewjob entities.BrewJob) ([]byte, error)

func (*MongoDBLayer) ChangeStatus

func (mgoLayer *MongoDBLayer) ChangeStatus(brewJobId []byte, status string) error

func (*MongoDBLayer) ExecuteCommand

func (mgoLayer *MongoDBLayer) ExecuteCommand(cmd interface{}) (interface{}, error)

func (*MongoDBLayer) FindAllBrewJobs

func (mgoLayer *MongoDBLayer) FindAllBrewJobs() ([]entities.BrewJob, error)

func (*MongoDBLayer) FindByBrewJobById

func (mgoLayer *MongoDBLayer) FindByBrewJobById(brewJobId []byte) (entities.BrewJob, error)

Jump to

Keyboard shortcuts

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