Documentation ¶
Index ¶
- type MemoryTaskRepository
- func (m *MemoryTaskRepository) Find(id string) (*entity.Task, error)
- func (m *MemoryTaskRepository) FindAll() ([]*entity.Task, error)
- func (m *MemoryTaskRepository) Remove(id string) error
- func (m *MemoryTaskRepository) SafeStore(id string, task *entity.Task) error
- func (m *MemoryTaskRepository) Store(id string, task *entity.Task) error
- func (m *MemoryTaskRepository) Update(id string, task *entity.Task) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryTaskRepository ¶
type MemoryTaskRepository struct {
// contains filtered or unexported fields
}
func NewMemoryTaskRepository ¶
func NewMemoryTaskRepository() *MemoryTaskRepository
NewMemoryRepository creates a new memory repository
func (*MemoryTaskRepository) Find ¶
func (m *MemoryTaskRepository) Find(id string) (*entity.Task, error)
Find returns a task by id
func (*MemoryTaskRepository) FindAll ¶
func (m *MemoryTaskRepository) FindAll() ([]*entity.Task, error)
FindAll returns all tasks
func (*MemoryTaskRepository) Remove ¶
func (m *MemoryTaskRepository) Remove(id string) error
Remove removes a task by id
func (*MemoryTaskRepository) SafeStore ¶
func (m *MemoryTaskRepository) SafeStore(id string, task *entity.Task) error
SafeStore stores a task and return an error if the task already exists
Click to show internal directories.
Click to hide internal directories.