service

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	CategoryModel *model.Category
}

Category 分类服务

func NewCategory

func NewCategory() *Category

NewCategory Category实例

func (*Category) BatchDelete

func (s *Category) BatchDelete(ctx context.Context, code string) error

BatchDelete 批量删除

func (*Category) Create

func (s *Category) Create(ctx context.Context, item model.Category) error

Create 创建数据

func (*Category) Delete

func (s *Category) Delete(ctx context.Context, id int) error

Delete 删除数据

func (*Category) Get

func (s *Category) Get(ctx context.Context, id int) (*model.Category, error)

Get 查询指定数据

func (*Category) Query

func (s *Category) Query(ctx context.Context, params param.CategoryParam) (*pagination.Result, error)

Query 查询数据

func (*Category) Update

func (s *Category) Update(ctx context.Context, item model.Category) error

Update 更新数据

type Content

type Content struct {
	ContentModel *model.Content
}

Content 内容服务

func NewContent

func NewContent() *Content

NewContent Content实例

func (*Content) BatchDelete

func (s *Content) BatchDelete(ctx context.Context, id string) error

BatchDelete 批量删除

func (*Content) Create

func (s *Content) Create(ctx context.Context, item model.Content) error

Create 创建数据

func (*Content) Delete

func (s *Content) Delete(ctx context.Context, id int) error

Delete 删除数据

func (*Content) Get

func (s *Content) Get(ctx context.Context, id int) (*model.Content, error)

Get 查询指定数据

func (*Content) Query

func (s *Content) Query(ctx context.Context, dataScope string, params param.ContentParam) (*pagination.Result, error)

Query 查询数据

func (*Content) Update

func (s *Content) Update(ctx context.Context, item model.Content) error

Update 更新数据

Jump to

Keyboard shortcuts

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