This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
/
common.go
46 lines (41 loc) · 1.67 KB
/
common.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package interfaces
import (
"github.com/flyteorg/flyteadmin/pkg/common"
)
// Parameters for getting an individual resource.
type Identifier struct {
Project string
Domain string
Name string
Version string
}
// Parameters for querying multiple resources.
type ListResourceInput struct {
Limit int
Offset int
InlineFilters []common.InlineFilter
// MapFilters refers to primary entity filters defined as map values rather than inline sql queries.
// These exist to permit filtering on "IS NULL" which isn't permitted with inline filter queries and
// pq driver value substitution.
MapFilters []common.MapFilter
SortParameter common.SortParameter
// A set of the entities (besides the primary table being queried) that should be joined with when performing
// the list query. This enables filtering on non-primary entity attributes.
JoinTableEntities map[common.Entity]bool
}
// Describes a set of resources for which to apply attribute updates.
type UpdateResourceInput struct {
Filters []common.InlineFilter
Attributes map[string]interface{}
}
// Parameters for counting multiple resources.
type CountResourceInput struct {
InlineFilters []common.InlineFilter
// MapFilters refers to primary entity filters defined as map values rather than inline sql queries.
// These exist to permit filtering on "IS NULL" which isn't permitted with inline filter queries and
// pq driver value substitution.
MapFilters []common.MapFilter
// A set of the entities (besides the primary table being queried) that should be joined with when performing
// the count query. This enables filtering on non-primary entity attributes.
JoinTableEntities map[common.Entity]bool
}