tags

package
v3.8.31 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-2-Clause, BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTags           = errors.New("No tags specified")
	ErrEmptyTag         = errors.New("Empty tag")
	ErrMaxTagsAllocated = errors.New("Maximum number of tags allocated")
	ErrDisallowedTag    = errors.New("Tag not allowed")
	ErrUnknownTag       = errors.New("Unknown tag")
)

Functions

This section is empty.

Types

type TagMask

type TagMask [1024]uint64

func (*TagMask) Clear

func (tm *TagMask) Clear(tg entry.EntryTag)

func (*TagMask) IsSet

func (tm *TagMask) IsSet(tg entry.EntryTag) bool

func (*TagMask) Set

func (tm *TagMask) Set(tg entry.EntryTag)

type TagResolver

type TagResolver interface {
	NegotiateTag(string) (entry.EntryTag, error)
}

type Tagger

type Tagger struct {
	TaggerConfig
	// contains filtered or unexported fields
}

func NewTagger

func NewTagger(tc TaggerConfig, tr TagResolver) (*Tagger, error)

func (*Tagger) Allowed

func (t *Tagger) Allowed(tg entry.EntryTag) bool

func (*Tagger) AllowedName

func (t *Tagger) AllowedName(tn string) bool

func (*Tagger) Negotiate

func (t *Tagger) Negotiate(tn string) (tg entry.EntryTag, err error)

type TaggerConfig

type TaggerConfig struct {
	Tags []string
}

func (TaggerConfig) TagSet

func (tc TaggerConfig) TagSet() (tags []string, globs []glob.Glob, err error)

func (TaggerConfig) Validate

func (tc TaggerConfig) Validate() (err error)

Jump to

Keyboard shortcuts

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