-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
error-translating-workflow-template-service-client.go
47 lines (36 loc) · 2.44 KB
/
error-translating-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
package apiclient
import (
"context"
"google.golang.org/grpc"
workflowtemplatepkg "github.com/argoproj/argo-workflows/v3/pkg/apiclient/workflowtemplate"
"github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
grpcutil "github.com/argoproj/argo-workflows/v3/util/grpc"
)
type errorTranslatingWorkflowTemplateServiceClient struct {
delegate workflowtemplatepkg.WorkflowTemplateServiceClient
}
var _ workflowtemplatepkg.WorkflowTemplateServiceClient = &errorTranslatingWorkflowTemplateServiceClient{}
func (a *errorTranslatingWorkflowTemplateServiceClient) CreateWorkflowTemplate(ctx context.Context, req *workflowtemplatepkg.WorkflowTemplateCreateRequest, _ ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error) {
template, err := a.delegate.CreateWorkflowTemplate(ctx, req)
return template, grpcutil.TranslateError(err)
}
func (a *errorTranslatingWorkflowTemplateServiceClient) GetWorkflowTemplate(ctx context.Context, req *workflowtemplatepkg.WorkflowTemplateGetRequest, _ ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error) {
template, err := a.delegate.GetWorkflowTemplate(ctx, req)
return template, grpcutil.TranslateError(err)
}
func (a *errorTranslatingWorkflowTemplateServiceClient) ListWorkflowTemplates(ctx context.Context, req *workflowtemplatepkg.WorkflowTemplateListRequest, _ ...grpc.CallOption) (*v1alpha1.WorkflowTemplateList, error) {
templates, err := a.delegate.ListWorkflowTemplates(ctx, req)
return templates, grpcutil.TranslateError(err)
}
func (a *errorTranslatingWorkflowTemplateServiceClient) UpdateWorkflowTemplate(ctx context.Context, req *workflowtemplatepkg.WorkflowTemplateUpdateRequest, _ ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error) {
template, err := a.delegate.UpdateWorkflowTemplate(ctx, req)
return template, grpcutil.TranslateError(err)
}
func (a *errorTranslatingWorkflowTemplateServiceClient) DeleteWorkflowTemplate(ctx context.Context, req *workflowtemplatepkg.WorkflowTemplateDeleteRequest, _ ...grpc.CallOption) (*workflowtemplatepkg.WorkflowTemplateDeleteResponse, error) {
template, err := a.delegate.DeleteWorkflowTemplate(ctx, req)
return template, grpcutil.TranslateError(err)
}
func (a *errorTranslatingWorkflowTemplateServiceClient) LintWorkflowTemplate(ctx context.Context, req *workflowtemplatepkg.WorkflowTemplateLintRequest, _ ...grpc.CallOption) (*v1alpha1.WorkflowTemplate, error) {
template, err := a.delegate.LintWorkflowTemplate(ctx, req)
return template, grpcutil.TranslateError(err)
}