selector

package
v1.12.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

The selector package exports functions useful for manipulating and generating spire selectors

Index

Constants

View Source
const Delimiter = ":"

Type and Value are delimited by a colon (:) e.g. "unix:uid:1000"

Variables

This section is empty.

Functions

func Dedupe added in v1.4.0

func Dedupe(selectorSets ...[]*common.Selector) []*common.Selector

func EqualSet

func EqualSet(a, b *set) bool

EqualSet determines whether two sets of selectors are equal or not

func Includes

func Includes(set *set, item *Selector) bool

Includes determines whether a given selector is present in a set

func IncludesSet

func IncludesSet(s1, s2 *set) bool

IncludesSet returns true if s2 is included in s1. This is, all the s2 selectors are also present in s1.

func Validate added in v0.12.0

func Validate(s *common.Selector) error

Types

type Selector

type Selector struct {
	Type  string
	Value string
}

func New

func New(c *common.Selector) *Selector

func (*Selector) Raw

func (s *Selector) Raw() *common.Selector

type Set

type Set interface {
	Raw() []*common.Selector
	Array() []*Selector
	Equal(otherSet Set) bool
	Includes(selector *Selector) bool
	IncludesSet(s2 Set) bool
	Add(selector *Selector)
	Remove(selector *Selector) *Selector
	String() string
	Size() int
}

func NewSet

func NewSet(selectors ...*Selector) Set

func NewSetFromRaw

func NewSetFromRaw(c []*common.Selector) Set

Jump to

Keyboard shortcuts

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