repositories

package
v0.0.0-...-9845e40 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MONGODB_TASK = "tasks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDBLayer

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

func (*MongoDBLayer) AddTask

func (mgoLayer *MongoDBLayer) AddTask(task entities.Task) ([]byte, error)

func (*MongoDBLayer) ExecuteCommand

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

func (*MongoDBLayer) FindTaskByOrderId

func (mgoLayer *MongoDBLayer) FindTaskByOrderId(orderId []byte) (entities.Task, error)

func (*MongoDBLayer) GetAllTasks

func (mgoLayer *MongoDBLayer) GetAllTasks() ([]entities.Task, error)

type TaskRepository

type TaskRepository interface {
	AddTask(task entities.Task) ([]byte, error)
	FindTaskByOrderId(orderId []byte) (entities.Task, error)

	ExecuteCommand(interface{}) (interface{}, error)
	GetAllTasks() ([]entities.Task, error)
}

func NewMongoDBLayer

func NewMongoDBLayer(connection string) (TaskRepository, error)

func NewTaskRepository

func NewTaskRepository(connection string) (TaskRepository, error)

Jump to

Keyboard shortcuts

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