qualifier

package
v0.0.0-...-d3fcdae Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QualifiersToCommand

func QualifiersToCommand(qArr []*remoteasset.Qualifier) (func(string) *remoteexecution.Command, error)

QualifiersToCommand takes a slice of remote asset API qualifiers and returns a function which takes a URI and returns a REv2 Command to fetch the given URI

Types

type Set

type Set map[string]struct{}

Set implements a HashSet of qualifier names

func Difference

func Difference(a, b Set) Set

Difference calculates the Set difference a \ b.

func NewSet

func NewSet(names []string) Set

NewSet creates a new Set from a list of qualifier names

func QualifiersToSet

func QualifiersToSet(qualifiers []*remoteasset.Qualifier) Set

QualifiersToSet converts an array of qualifiers into a Set of names

func (Set) Add

func (s Set) Add(q string)

Add adds a qualifier name to the set

func (Set) Contains

func (s Set) Contains(q string) bool

Contains checks if the set contains a given Qualifier Name

func (Set) IsEmpty

func (s Set) IsEmpty() bool

IsEmpty checks if the Set is empty

type Sorter

type Sorter []*remoteasset.Qualifier

Sorter implements Sort for an array of Qualifiers to get a consistent hash

func (Sorter) Len

func (q Sorter) Len() int

func (Sorter) Less

func (q Sorter) Less(i, j int) bool

func (Sorter) Swap

func (q Sorter) Swap(i, j int)

func (Sorter) ToArray

func (q Sorter) ToArray() []*remoteasset.Qualifier

ToArray converts a Sorter back to its underlying array of qualifiers

Jump to

Keyboard shortcuts

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