interactor

package
v0.0.0-...-833cb33 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryRootUseCase

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

func NewCategoryRootUseCase

func NewCategoryRootUseCase(logger log.Logger, repo domain.CategoryRootRepository,
	categoryRepo domain.CategoryRepository) *CategoryRootUseCase

func (*CategoryRootUseCase) Add

func (u *CategoryRootUseCase) Add(ctx context.Context, categoryID, rootID string) error

func (*CategoryRootUseCase) CreateList

func (u *CategoryRootUseCase) CreateList(ctx context.Context, categoryID, rootID string) (*domain.CategoryByRoot, error)

func (*CategoryRootUseCase) DeleteItem

func (u *CategoryRootUseCase) DeleteItem(ctx context.Context, rootID, categoryID string) error

func (*CategoryRootUseCase) DeleteList

func (u *CategoryRootUseCase) DeleteList(ctx context.Context, rootID string) error

func (*CategoryRootUseCase) GetByRoot

func (u *CategoryRootUseCase) GetByRoot(ctx context.Context, rootID string) (*domain.CategoryByRoot, error)

func (*CategoryRootUseCase) List

func (u *CategoryRootUseCase) List(ctx context.Context, token, limit string) ([]*domain.CategoryByRoot, string, error)

type CategoryUseCase

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

func NewCategoryUseCase

func NewCategoryUseCase(logger log.Logger, repo domain.CategoryRepository, event domain.CategoryEventBus) *CategoryUseCase

func (*CategoryUseCase) Create

func (u *CategoryUseCase) Create(ctx context.Context, name string) (*domain.Category, error)

func (*CategoryUseCase) Delete

func (u *CategoryUseCase) Delete(ctx context.Context, id string) error

func (*CategoryUseCase) Get

func (*CategoryUseCase) HardDelete

func (u *CategoryUseCase) HardDelete(ctx context.Context, id string) error

func (*CategoryUseCase) List

func (u *CategoryUseCase) List(ctx context.Context, token, limit string, filter core.FilterParams) ([]*domain.Category, string, error)

func (*CategoryUseCase) Restore

func (u *CategoryUseCase) Restore(ctx context.Context, id string) error

func (*CategoryUseCase) Update

func (u *CategoryUseCase) Update(ctx context.Context, id, name string) (*domain.Category, error)

Jump to

Keyboard shortcuts

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