usecase

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserInteractor

type UserInteractor struct {
	UserRepository UserRepository
}

func (*UserInteractor) Create

func (interactor *UserInteractor) Create(u models.User) (user models.User, err error)

func (*UserInteractor) Delete

func (interactor *UserInteractor) Delete(id uuid.UUID) (err error)

func (*UserInteractor) Index

func (interactor *UserInteractor) Index() (users models.Users, err error)

func (*UserInteractor) Show

func (interactor *UserInteractor) Show(id uuid.UUID) (user models.User, err error)

func (*UserInteractor) Update

func (interactor *UserInteractor) Update(id uuid.UUID, u models.User) (user models.User, err error)

type UserRepository

type UserRepository interface {
	FindAll() (models.Users, error)
	FindById(id uuid.UUID) (models.User, error)
	Store(user models.User) (models.User, error)
	Update(id uuid.UUID, user models.User) (models.User, error)
	DeleteById(id uuid.UUID) error
}

Jump to

Keyboard shortcuts

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