persistence

package
v0.0.0-...-4402e7d Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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

func (*MemoryTaskRepository) Store

func (m *MemoryTaskRepository) Store(id string, task *entity.Task) error

Store stores a task

func (*MemoryTaskRepository) Update

func (m *MemoryTaskRepository) Update(id string, task *entity.Task) error

Update updates a task

Jump to

Keyboard shortcuts

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