label

package
v0.0.0-...-4c964c4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WireSet = wire.NewSet(
	ProvideLabel,
)

Functions

This section is empty.

Types

type AssignToPullReqOut

type AssignToPullReqOut struct {
	Label         *types.Label
	PullReqLabel  *types.PullReqLabel
	OldLabelValue *types.LabelValue
	NewLabelValue *types.LabelValue
	ActivityType  enum.PullReqLabelActivityType
}

type Service

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

func New

func New(
	tx dbtx.Transactor,
	spaceStore store.SpaceStore,
	labelStore store.LabelStore,
	labelValueStore store.LabelValueStore,
	pullReqLabelAssignmentStore store.PullReqLabelAssignmentStore,
) *Service

func ProvideLabel

func ProvideLabel(
	tx dbtx.Transactor,
	spaceStore store.SpaceStore,
	labelStore store.LabelStore,
	labelValueStore store.LabelValueStore,
	pullReqLabelStore store.PullReqLabelAssignmentStore,
) *Service

func (*Service) AssignToPullReq

func (s *Service) AssignToPullReq(
	ctx context.Context,
	principalID int64,
	pullreqID int64,
	repoID int64,
	repoParentID int64,
	in *types.PullReqCreateInput,
) (*AssignToPullReqOut,
	error,
)

func (*Service) Backfill

func (s *Service) Backfill(
	ctx context.Context,
	pullreq *types.PullReq,
) error

func (*Service) BackfillMany

func (s *Service) BackfillMany(
	ctx context.Context,
	pullreqs []*types.PullReq,
) error

func (*Service) Define

func (s *Service) Define(
	ctx context.Context,
	principalID int64,
	spaceID, repoID *int64,
	in *types.DefineLabelInput,
) (*types.Label, error)

func (*Service) DefineValue

func (s *Service) DefineValue(
	ctx context.Context,
	principalID int64,
	labelID int64,
	in *types.DefineValueInput,
) (*types.LabelValue, error)

func (*Service) Delete

func (s *Service) Delete(
	ctx context.Context,
	spaceID, repoID *int64,
	key string,
) error

func (*Service) DeleteValue

func (s *Service) DeleteValue(
	ctx context.Context,
	spaceID, repoID *int64,
	labelKey string,
	value string,
) error

func (*Service) Find

func (s *Service) Find(
	ctx context.Context,
	spaceID, repoID *int64,
	key string,
) (*types.Label, error)

func (*Service) FindByID

func (s *Service) FindByID(ctx context.Context, labelID int64) (*types.Label, error)

func (*Service) List

func (s *Service) List(
	ctx context.Context,
	spaceID, repoID *int64,
	filter *types.LabelFilter,
) ([]*types.Label, int64, error)

func (*Service) ListPullReqLabels

func (s *Service) ListPullReqLabels(
	ctx context.Context,
	repo *types.Repository,
	spaceID int64,
	pullreqID int64,
	filter *types.AssignableLabelFilter,
) (*types.ScopesLabels, int64, error)

func (*Service) ListValues

func (s *Service) ListValues(
	ctx context.Context,
	spaceID, repoID *int64,
	labelKey string,
	filter *types.ListQueryFilter,
) ([]*types.LabelValue, error)

func (*Service) Save

func (s *Service) Save(
	ctx context.Context,
	principalID int64,
	spaceID, repoID *int64,
	in *types.SaveInput,
) (*types.LabelWithValues, error)

func (*Service) UnassignFromPullReq

func (s *Service) UnassignFromPullReq(
	ctx context.Context, repoID, repoParentID, pullreqID, labelID int64,
) (*types.Label, *types.LabelValue, error)

func (*Service) Update

func (s *Service) Update(
	ctx context.Context,
	principalID int64,
	spaceID, repoID *int64,
	key string,
	in *types.UpdateLabelInput,
) (*types.Label, error)

func (*Service) UpdateValue

func (s *Service) UpdateValue(
	ctx context.Context,
	principalID int64,
	labelID int64,
	value string,
	in *types.UpdateValueInput,
) (*types.LabelValue, error)

Jump to

Keyboard shortcuts

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