filters

package
v0.8.21 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Equals            string = "="
	In                string = "in"
	Contains          string = "contains"
	NotEquals         string = "!="
	GreaterThan       string = ">"
	GreaterThanEquals string = ">="
	LessThan          string = "<"
	LessThanEquals    string = "<="
)

Variables

View Source
var (
	InReg       = regexp.MustCompile(` in `)
	ContainsReg = regexp.MustCompile(` contains `)
	InRegValue  = regexp.MustCompile(`(?s)\((.*)\)`)
)
View Source
var (
	DefaultLimit  int32 = 100
	DefaultFilter       = Filters{
		Limit:  DefaultLimit,
		Page:   1,
		SortBy: "created_at",
		Asc:    false,
	}
)

Functions

func BuildNamedEntityListRequest

func BuildNamedEntityListRequest(c Filters, project, domain string, resourceType core.ResourceType) (*admin.NamedEntityListRequest, error)

func BuildProjectListRequest

func BuildProjectListRequest(c Filters) (*admin.ProjectListRequest, error)

func BuildResourceListRequestWithName

func BuildResourceListRequestWithName(c Filters, project, domain, name string) (*admin.ResourceListRequest, error)

func EscapeValue

func EscapeValue(s string) string

EscapeValue escapes strings to be used as values in filter queries.

func SplitTerms

func SplitTerms(filter string) []string

SplitTerms split the filter string and returns the map of strings

func Transform

func Transform(filters []string) (string, error)

Transform transform the field selector term from string to flyteadmin field selector syntax

func UnescapeValue

func UnescapeValue(s string) (string, error)

UnescapeValue unescapes a fieldSelector value and returns the original literal value. May return the original string if it contains no escaped or special characters.

Types

type Filters

type Filters struct {
	FieldSelector string `json:"fieldSelector" pflag:",Specifies the Field selector"`
	SortBy        string `json:"sortBy" pflag:",Specifies which field to sort results "`
	Limit         int32  `json:"limit" pflag:",Specifies the limit"`
	Asc           bool   `json:"asc"  pflag:",Specifies the sorting order. By default flytectl sort result in descending order"`
	Page          int32  `json:"page" pflag:",Specifies the page number, in case there are multiple pages of results"`
}

type InvalidEscapeSequence

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

InvalidEscapeSequence indicates an error occurred unescaping a field selector

func (InvalidEscapeSequence) Error

func (i InvalidEscapeSequence) Error() string

type UnescapedRune

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

UnescapedRune indicates an error occurred unescaping a field selector

func (UnescapedRune) Error

func (i UnescapedRune) Error() string

Jump to

Keyboard shortcuts

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