Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyExists = errors.New("already exists") ErrNotFound = errors.New("not found") )
Functions ¶
func NewTodoService ¶
func NewTodoService( logger log.Logger, dbRW repository.DatabaseReaderWriter, cacheRW repository.CacheReaderWriter, ) *todoService
Types ¶
type Middleware ¶
type Middleware func(TodoService) TodoService
func NewMiddleware ¶
func NewMiddleware(logger log.Logger) Middleware
type TodoService ¶
type TodoService interface { GetAllTodo(ctx context.Context, req entity.GetAllTodoRequest) ([]entity.Todo, error) GetTodoByID(ctx context.Context, req entity.GetTodoByIDRequest) (entity.Todo, error) CreateTodo(ctx context.Context, req entity.CreateTodoRequest) error UpdateTodo(ctx context.Context, req entity.UpdateTodoRequest) error DeleteTodo(ctx context.Context, req entity.DeleteTodoRequest) error }
Click to show internal directories.
Click to hide internal directories.