forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
info-service-client.go
27 lines (20 loc) · 906 Bytes
/
info-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
package http1
import (
"context"
"google.golang.org/grpc"
infopkg "github.com/argoproj/argo-workflows/v3/pkg/apiclient/info"
wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
)
type InfoServiceClient = Facade
func (h InfoServiceClient) GetInfo(_ context.Context, in *infopkg.GetInfoRequest, _ ...grpc.CallOption) (*infopkg.InfoResponse, error) {
out := &infopkg.InfoResponse{}
return out, h.Get(in, out, "/api/v1/info")
}
func (h InfoServiceClient) GetVersion(_ context.Context, in *infopkg.GetVersionRequest, _ ...grpc.CallOption) (*wfv1.Version, error) {
out := &wfv1.Version{}
return out, h.Get(in, out, "/api/v1/version")
}
func (h InfoServiceClient) GetUserInfo(_ context.Context, in *infopkg.GetUserInfoRequest, _ ...grpc.CallOption) (*infopkg.GetUserInfoResponse, error) {
out := &infopkg.GetUserInfoResponse{}
return out, h.Get(in, out, "/api/v1/userinfo")
}