usecase

package
v0.0.0-...-d49c957 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseUsecase

type BaseUsecase[E, T any] struct {
	Repo *repo.BaseRepo[E, T]
}

func (*BaseUsecase[E, T]) Add

func (u *BaseUsecase[E, T]) Add(ctx context.Context, do E) (E, error)

func (*BaseUsecase[E, T]) Delete

func (u *BaseUsecase[E, T]) Delete(ctx context.Context, id uint64) error

func (*BaseUsecase[E, T]) DeleteByIDs

func (u *BaseUsecase[E, T]) DeleteByIDs(ctx context.Context, ids []uint64) error

func (*BaseUsecase[E, T]) Edit

func (u *BaseUsecase[E, T]) Edit(ctx context.Context, m map[string]any) (E, error)

func (*BaseUsecase[E, T]) Find

func (u *BaseUsecase[E, T]) Find(ctx context.Context, id uint64, lockMode ...repo.LockMode) (E, error)

func (*BaseUsecase[E, T]) FindByField

func (u *BaseUsecase[E, T]) FindByField(ctx context.Context, fieldName string, fieldValue any, args ...any) (E, error)

Jump to

Keyboard shortcuts

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