service

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package service provides the business logic for the todo endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

type Todo interface {
	Create(task string) (*model.Todo, error)
	Update(id int, task string, status model.Status) (*model.Todo, error)
	Delete(id int) error
	Find(id int) (*model.Todo, error)
	FindAll() ([]*model.Todo, error)
}

Todo is the service for the todo endpoint.

func NewTodo

func NewTodo(r repository.Todo) Todo

NewTodo creates a new Todo service.

Jump to

Keyboard shortcuts

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