forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error-translating-cluster-workflow-template-service-client.go
65 lines (54 loc) · 2.91 KB
/
error-translating-cluster-workflow-template-service-client.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
54
55
56
57
58
59
60
61
62
63
64
65
package apiclient
import (
"context"
"google.golang.org/grpc"
clusterworkflowtmplpkg "github.com/argoproj/argo/pkg/apiclient/clusterworkflowtemplate"
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
grpcutil "github.com/argoproj/argo/util/grpc"
)
type errorTranslatingWorkflowClusterTemplateServiceClient struct {
delegate clusterworkflowtmplpkg.ClusterWorkflowTemplateServiceClient
}
var _ clusterworkflowtmplpkg.ClusterWorkflowTemplateServiceClient = &errorTranslatingWorkflowClusterTemplateServiceClient{}
func (a errorTranslatingWorkflowClusterTemplateServiceClient) CreateClusterWorkflowTemplate(ctx context.Context, req *clusterworkflowtmplpkg.ClusterWorkflowTemplateCreateRequest, opts ...grpc.CallOption) (*v1alpha1.ClusterWorkflowTemplate, error) {
template, err := a.delegate.CreateClusterWorkflowTemplate(ctx, req)
if err != nil {
return nil, grpcutil.TranslateError(err)
}
return template, nil
}
func (a errorTranslatingWorkflowClusterTemplateServiceClient) GetClusterWorkflowTemplate(ctx context.Context, req *clusterworkflowtmplpkg.ClusterWorkflowTemplateGetRequest, opts ...grpc.CallOption) (*v1alpha1.ClusterWorkflowTemplate, error) {
template, err := a.delegate.GetClusterWorkflowTemplate(ctx, req)
if err != nil {
return nil, grpcutil.TranslateError(err)
}
return template, nil
}
func (a errorTranslatingWorkflowClusterTemplateServiceClient) ListClusterWorkflowTemplates(ctx context.Context, req *clusterworkflowtmplpkg.ClusterWorkflowTemplateListRequest, opts ...grpc.CallOption) (*v1alpha1.ClusterWorkflowTemplateList, error) {
templates, err := a.delegate.ListClusterWorkflowTemplates(ctx, req)
if err != nil {
return nil, grpcutil.TranslateError(err)
}
return templates, err
}
func (a errorTranslatingWorkflowClusterTemplateServiceClient) UpdateClusterWorkflowTemplate(ctx context.Context, req *clusterworkflowtmplpkg.ClusterWorkflowTemplateUpdateRequest, opts ...grpc.CallOption) (*v1alpha1.ClusterWorkflowTemplate, error) {
template, err := a.delegate.UpdateClusterWorkflowTemplate(ctx, req)
if err != nil {
return nil, grpcutil.TranslateError(err)
}
return template, nil
}
func (a errorTranslatingWorkflowClusterTemplateServiceClient) DeleteClusterWorkflowTemplate(ctx context.Context, req *clusterworkflowtmplpkg.ClusterWorkflowTemplateDeleteRequest, opts ...grpc.CallOption) (*clusterworkflowtmplpkg.ClusterWorkflowTemplateDeleteResponse, error) {
template, err := a.delegate.DeleteClusterWorkflowTemplate(ctx, req)
if err != nil {
return nil, grpcutil.TranslateError(err)
}
return template, nil
}
func (a errorTranslatingWorkflowClusterTemplateServiceClient) LintClusterWorkflowTemplate(ctx context.Context, req *clusterworkflowtmplpkg.ClusterWorkflowTemplateLintRequest, opts ...grpc.CallOption) (*v1alpha1.ClusterWorkflowTemplate, error) {
template, err := a.delegate.LintClusterWorkflowTemplate(ctx, req)
if err != nil {
return nil, grpcutil.TranslateError(err)
}
return template, nil
}