-
Notifications
You must be signed in to change notification settings - Fork 0
/
activation_service.pb.client.go
118 lines (100 loc) · 3.53 KB
/
activation_service.pb.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// Code generated by protoc-gen-goten-client
// API: ActivationService
// DO NOT EDIT!!!
package activation_client
import (
"context"
"google.golang.org/grpc"
"google.golang.org/protobuf/runtime/protoimpl"
)
// proto imports
import (
probe "github.com/cloudwan/watchdog-sdk/resources/v1alpha2/probe"
empty "github.com/golang/protobuf/ptypes/empty"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = protoimpl.DescBuilder{}
_ = new(context.Context)
_ = grpc.ClientConn{}
)
// make sure we're using proto imports
var (
_ = &empty.Empty{}
_ = &probe.Probe{}
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// ActivationServiceClient is the client API for ActivationService.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ActivationServiceClient interface {
Activation(ctx context.Context, opts ...grpc.CallOption) (ActivationClientStream, error)
SendActivationInvitation(ctx context.Context, in *SendActivationInvitationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
ResetActivation(ctx context.Context, in *ResetActivationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type client struct {
cc grpc.ClientConnInterface
}
func NewActivationServiceClient(cc grpc.ClientConnInterface) ActivationServiceClient {
return &client{cc}
}
func (c *client) Activation(ctx context.Context, opts ...grpc.CallOption) (ActivationClientStream, error) {
stream, err := c.cc.NewStream(ctx,
&grpc.StreamDesc{
StreamName: "Activation",
ServerStreams: true,
ClientStreams: true,
},
"/ntt.watchdog.v1alpha2.ActivationService/Activation", opts...)
if err != nil {
return nil, err
}
x := &activationActivationClient{stream}
return x, nil
}
type ActivationClientStream interface {
Send(*ActivationRequest) error
Recv() (*ActivationResponse, error)
grpc.ClientStream
}
type activationActivationClient struct {
grpc.ClientStream
}
func (x *activationActivationClient) Send(m *ActivationRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *activationActivationClient) Recv() (*ActivationResponse, error) {
m := new(ActivationResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *client) SendActivationInvitation(ctx context.Context, in *SendActivationInvitationRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/ntt.watchdog.v1alpha2.ActivationService/SendActivationInvitation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *client) ResetActivation(ctx context.Context, in *ResetActivationRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/ntt.watchdog.v1alpha2.ActivationService/ResetActivation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}