usecase

package
v0.0.0-...-ca35f81 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WireSet = wire.NewSet(
	DefaultTodo,
)

WireSet all entities for wire inject

Functions

This section is empty.

Types

type Todo

type Todo struct {
	// contains filtered or unexported fields
}

Todo is domain logic for todo entity

func DefaultTodo

func DefaultTodo() *Todo

DefaultTodo is get default todo usecase

func (*Todo) CreateTodo

func (s *Todo) CreateTodo(ctx context.Context, v *entity.Todo) error

CreateTodo is create todo entity

func (*Todo) DeleteTodo

func (s *Todo) DeleteTodo(ctx context.Context, id string) error

DeleteTodo is delete todo entity

func (*Todo) ListTodos

func (s *Todo) ListTodos(ctx context.Context) (ret []*entity.Todo, err error)

ListTodos is get all todo entity

func (*Todo) Subscribe

func (s *Todo) Subscribe(handler event.Subscription, evt event.Event) func()

Subscribe is subscribe entity change event

func (*Todo) UpdateTodo

func (s *Todo) UpdateTodo(ctx context.Context, v *entity.Todo) error

UpdateTodo is update todo entity

Jump to

Keyboard shortcuts

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