Documentation ¶
Index ¶
- Constants
- type MongoDBLayer
- func (mgoLayer *MongoDBLayer) AddTask(task entities.Task) ([]byte, error)
- func (mgoLayer *MongoDBLayer) ExecuteCommand(cmd interface{}) (interface{}, error)
- func (mgoLayer *MongoDBLayer) FindTaskByOrderId(orderId []byte) (entities.Task, error)
- func (mgoLayer *MongoDBLayer) GetAllTasks() ([]entities.Task, error)
- type TaskRepository
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)
Click to show internal directories.
Click to hide internal directories.