label

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Label

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

Label 标签封装

func New

func New(options ...Option) *Label

New 新建 Label 实例

func (*Label) Create

Create 创建标签

func (*Label) CreateRelation

func (l *Label) CreateRelation(lr *dao.LabelRelation) error

CreateRelation 创建标签关联关系

func (*Label) Delete

func (l *Label) Delete(labelID int64) error

Delete 删除工单

func (*Label) DeleteRelations

func (l *Label) DeleteRelations(refType apistructs.ProjectLabelType, refID uint64) error

func (*Label) GetByID

func (l *Label) GetByID(id int64) (apistructs.ProjectLabel, error)

GetByID 标签ByID

func (*Label) List

List 标签列表

func (*Label) ListByNamesAndProjectID

func (l *Label) ListByNamesAndProjectID(req apistructs.ListByNamesAndProjectIDRequest) ([]apistructs.ProjectLabel, error)

ListByNamesAndProjectID list label by names and projectID

func (*Label) ListLabelByIDs

func (l *Label) ListLabelByIDs(ids []uint64) ([]apistructs.ProjectLabel, error)

ListLabelByIDs list label by ids

func (*Label) Update

Update 更新标签

type Option

type Option func(*Label)

Option 定义 Label 对象的配置选项

func WithDBClient

func WithDBClient(db *dao.DBClient) Option

WithDBClient 配置 db client

Jump to

Keyboard shortcuts

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