usecase

package
v0.0.0-...-6d66e07 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 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 ContentUsecase

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

func NewContentUsecase

func NewContentUsecase(repo domain.ContentRepo) *ContentUsecase

func (*ContentUsecase) Create

func (uc *ContentUsecase) Create(ctx context.Context, content *domain.Content) (int32, error)

func (*ContentUsecase) Get

func (uc *ContentUsecase) Get(ctx context.Context, id int32) (*domain.Content, error)

func (*ContentUsecase) Update

func (uc *ContentUsecase) Update(ctx context.Context, id int32, content *domain.Content) error

type IndexUsecase

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

func NewIndexUsecase

func NewIndexUsecase(repo domain.IndexRepo) *IndexUsecase

func (*IndexUsecase) Create

func (uc *IndexUsecase) Create(ctx context.Context, index *domain.Index) error

func (*IndexUsecase) Delete

func (uc *IndexUsecase) Delete(ctx context.Context, id int32) error

func (*IndexUsecase) List

func (uc *IndexUsecase) List(ctx context.Context, page, pageSize int) ([]*domain.Index, error)

func (*IndexUsecase) Update

func (uc *IndexUsecase) Update(ctx context.Context, id int32, index *domain.Index) (int32, error)

Jump to

Keyboard shortcuts

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