biz

package
v0.0.0-...-a2c21a8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewFileUsecase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type File

type File struct {
	ID         int64     `json:"id,omitempty"`
	CreateTime time.Time `json:"create_time,omitempty"`
	UpdateTime time.Time `json:"update_time,omitempty"`
}

type FileRepo

type FileRepo interface {
	ListFile(ctx context.Context) ([]*File, error)
	GetFile(ctx context.Context, id int64) (*File, error)
	CreateFile(ctx context.Context, article *File) error
	UpdateFile(ctx context.Context, id int64, article *File) error
	DeleteFile(ctx context.Context, id int64) error
}

type FileUsecase

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

func NewFileUsecase

func NewFileUsecase(repo FileRepo, logger log.Logger) *FileUsecase

func (*FileUsecase) Create

func (uc *FileUsecase) Create(ctx context.Context, article *File) error

func (*FileUsecase) Delete

func (uc *FileUsecase) Delete(ctx context.Context, id int64) error

func (*FileUsecase) Get

func (uc *FileUsecase) Get(ctx context.Context, id int64) (p *File, err error)

func (*FileUsecase) List

func (uc *FileUsecase) List(ctx context.Context) (ps []*File, err error)

func (*FileUsecase) Update

func (uc *FileUsecase) Update(ctx context.Context, id int64, article *File) error

Jump to

Keyboard shortcuts

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