job

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	types.BaseModel
	Keyword     string  `json:"keyword"`
	Name        string  `json:"name"`
	Weight      *uint32 `json:"weight"`
	Description string  `json:"description"`
}

type PageJobRequest

type PageJobRequest struct {
	Page     uint32  `json:"page"`
	PageSize uint32  `json:"page_size"`
	Keyword  *string `json:"keyword"`
	Name     *string `json:"name"`
}

type Repo

type Repo interface {
	GetJobById(ctx kratosx.Context, id uint32) (*Job, error)
	GetJobByKeyword(ctx kratosx.Context, keyword string) (*Job, error)
	PageJob(ctx kratosx.Context, in *PageJobRequest) ([]*Job, uint32, error)
	AddJob(ctx kratosx.Context, in *Job) (uint32, error)
	UpdateJob(ctx kratosx.Context, in *Job) error
	DeleteJob(ctx kratosx.Context, id uint32) error
}

type UseCase

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

func NewUseCase

func NewUseCase(conf *config.Config, repo Repo) *UseCase

func (*UseCase) AddJob

func (u *UseCase) AddJob(ctx kratosx.Context, object *Job) (uint32, error)

AddJob 添加登录资源对象信息

func (*UseCase) DeleteJob

func (u *UseCase) DeleteJob(ctx kratosx.Context, id uint32) error

DeleteJob 删除登录资源对象信息

func (*UseCase) GetJobById

func (u *UseCase) GetJobById(ctx kratosx.Context, id uint32) (*Job, error)

GetJobById 获取指定资源对象

func (*UseCase) GetJobByKeyword

func (u *UseCase) GetJobByKeyword(ctx kratosx.Context, keyword string) (*Job, error)

GetJobByKeyword 获取指定资源对象

func (*UseCase) PageJob

func (u *UseCase) PageJob(ctx kratosx.Context, req *PageJobRequest) ([]*Job, uint32, error)

PageJob 获取全部登录资源对象

func (*UseCase) UpdateJob

func (u *UseCase) UpdateJob(ctx kratosx.Context, object *Job) error

UpdateJob 更新登录资源对象信息

Jump to

Keyboard shortcuts

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