tag

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service provides tag management functionality

func New

func New(repo interfaces.Repository) *Service

New creates a new tag service

func (*Service) ConvertNamesToTags

func (s *Service) ConvertNamesToTags(ctx context.Context, tagNames []string) ([]string, error)

ConvertNamesToTags converts tag names to tag IDs, creating tags if they don't exist

func (*Service) CreateTag

func (s *Service) CreateTag(ctx context.Context, name string) error

CreateTag creates a new tag (deprecated - use CreateTagWithCustomColor)

func (*Service) CreateTagWithCustomColor

func (s *Service) CreateTagWithCustomColor(ctx context.Context, name, description, color string, createdBy string) (*tag.Tag, error)

func (*Service) DeleteTag

func (s *Service) DeleteTag(ctx context.Context, name string) error

DeleteTag deletes a tag and removes it from all alerts and tickets (deprecated - use DeleteTagByName)

func (*Service) DeleteTagByID

func (s *Service) DeleteTagByID(ctx context.Context, tagID string) error

func (*Service) EnsureTagsExist

func (s *Service) EnsureTagsExist(ctx context.Context, tags []string) error

EnsureTagsExist checks if tags exist and creates them if they don't (deprecated - use ConvertNamesToIDs)

func (*Service) GetAvailableColorNames

func (s *Service) GetAvailableColorNames() []string

GetAvailableColorNames returns user-friendly color names

func (*Service) GetAvailableColors

func (s *Service) GetAvailableColors() []string

GetAvailableColors returns the list of available tag colors (Tailwind classes)

func (*Service) GetTagByID

func (s *Service) GetTagByID(ctx context.Context, tagID string) (*tag.Tag, error)

func (*Service) GetTagsByIDs

func (s *Service) GetTagsByIDs(ctx context.Context, tagIDs []string) ([]*tag.Tag, error)

func (*Service) ListAllTags

func (s *Service) ListAllTags(ctx context.Context) ([]*tag.Tag, error)

ListAllTags returns all tags using the new ID-based system

func (*Service) UpdateAlertTagsByID

func (s *Service) UpdateAlertTagsByID(ctx context.Context, alertID types.AlertID, tagIDs []string) (*alert.Alert, error)

func (*Service) UpdateAlertTagsByName

func (s *Service) UpdateAlertTagsByName(ctx context.Context, alertID types.AlertID, tagNames []string) (*alert.Alert, error)

UpdateAlertTagsByName provides compatibility for name-based tag updates

func (*Service) UpdateTagMetadata

func (s *Service) UpdateTagMetadata(ctx context.Context, tagID string, name, description, color string) (*tag.Tag, error)

func (*Service) UpdateTicketTagsByID

func (s *Service) UpdateTicketTagsByID(ctx context.Context, ticketID types.TicketID, tagIDs []string) (*ticket.Ticket, error)

func (*Service) UpdateTicketTagsByName

func (s *Service) UpdateTicketTagsByName(ctx context.Context, ticketID types.TicketID, tagNames []string) (*ticket.Ticket, error)

UpdateTicketTagsByName provides compatibility for name-based tag updates

Jump to

Keyboard shortcuts

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