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 63
/
resource.go
53 lines (45 loc) · 2.11 KB
/
resource.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
47
48
49
50
51
52
53
package interfaces
import (
"context"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
)
// ResourceInterface manages project, domain and workflow -specific attributes.
type ResourceInterface interface {
ListAll(ctx context.Context, request admin.ListMatchableAttributesRequest) (
*admin.ListMatchableAttributesResponse, error)
GetResource(ctx context.Context, request ResourceRequest) (*ResourceResponse, error)
UpdateProjectAttributes(ctx context.Context, request admin.ProjectAttributesUpdateRequest) (
*admin.ProjectAttributesUpdateResponse, error)
GetProjectAttributes(ctx context.Context, request admin.ProjectAttributesGetRequest) (
*admin.ProjectAttributesGetResponse, error)
DeleteProjectAttributes(ctx context.Context, request admin.ProjectAttributesDeleteRequest) (
*admin.ProjectAttributesDeleteResponse, error)
UpdateProjectDomainAttributes(ctx context.Context, request admin.ProjectDomainAttributesUpdateRequest) (
*admin.ProjectDomainAttributesUpdateResponse, error)
GetProjectDomainAttributes(ctx context.Context, request admin.ProjectDomainAttributesGetRequest) (
*admin.ProjectDomainAttributesGetResponse, error)
DeleteProjectDomainAttributes(ctx context.Context, request admin.ProjectDomainAttributesDeleteRequest) (
*admin.ProjectDomainAttributesDeleteResponse, error)
UpdateWorkflowAttributes(ctx context.Context, request admin.WorkflowAttributesUpdateRequest) (
*admin.WorkflowAttributesUpdateResponse, error)
GetWorkflowAttributes(ctx context.Context, request admin.WorkflowAttributesGetRequest) (
*admin.WorkflowAttributesGetResponse, error)
DeleteWorkflowAttributes(ctx context.Context, request admin.WorkflowAttributesDeleteRequest) (
*admin.WorkflowAttributesDeleteResponse, error)
}
// TODO we can move this to flyteidl, once we are exposing an endpoint
type ResourceRequest struct {
Project string
Domain string
Workflow string
LaunchPlan string
ResourceType admin.MatchableResource
}
type ResourceResponse struct {
Project string
Domain string
Workflow string
LaunchPlan string
ResourceType string
Attributes *admin.MatchingAttributes
}