label

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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