Documentation ¶
Index ¶
- Constants
- Variables
- func BuildNamedEntityListRequest(c Filters, project, domain string, resourceType core.ResourceType) (*admin.NamedEntityListRequest, error)
- func BuildProjectListRequest(c Filters) (*admin.ProjectListRequest, error)
- func BuildResourceListRequestWithName(c Filters, project, domain, name string) (*admin.ResourceListRequest, error)
- func EscapeValue(s string) string
- func SplitTerms(filter string) []string
- func Transform(filters []string) (string, error)
- func UnescapeValue(s string) (string, error)
- type Filters
- type InvalidEscapeSequence
- type UnescapedRune
Constants ¶
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 ¶ added in v0.5.12
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 ¶ added in v0.7.0
EscapeValue escapes strings to be used as values in filter queries.
func SplitTerms ¶
SplitTerms split the filter string and returns the map of strings
func Transform ¶
Transform transform the field selector term from string to flyteadmin field selector syntax
func UnescapeValue ¶
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
Click to show internal directories.
Click to hide internal directories.