/
dataflow.micro.go
334 lines (292 loc) · 11.9 KB
/
dataflow.micro.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: dataflow.proto
/*
Package dataflow is a generated protocol buffer package.
It is generated from these files:
dataflow.proto
It has these top-level messages:
Schedule
Policy
GetPolicyRequest
GetPolicyResponse
ListPolicyRequest
ListPolicyResponse
CreatePolicyRequest
CreatePolicyResponse
UpdatePolicyRequest
UpdatePolicyResponse
DeletePolicyRequest
DeletePolicyResponse
KV
Filter
Connector
Plan
CreatePlanRequest
CreatePlanResponse
GetPlanRequest
GetPlanResponse
ListPlanRequest
ListPlanResponse
UpdatePlanRequest
UpdatePlanResponse
DeletePlanRequest
DeletePlanResponse
RunPlanRequest
RunPlanResponse
Job
GetJobRequest
GetJobResponse
ListJobRequest
ListJobResponse
*/
package dataflow
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
client "github.com/micro/go-micro/client"
server "github.com/micro/go-micro/server"
context "context"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// 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 _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ client.Option
var _ server.Option
// Client API for DataFlow service
type DataFlowService interface {
GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...client.CallOption) (*GetPolicyResponse, error)
ListPolicy(ctx context.Context, in *ListPolicyRequest, opts ...client.CallOption) (*ListPolicyResponse, error)
CreatePolicy(ctx context.Context, in *CreatePolicyRequest, opts ...client.CallOption) (*CreatePolicyResponse, error)
UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest, opts ...client.CallOption) (*UpdatePolicyResponse, error)
DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...client.CallOption) (*DeletePolicyResponse, error)
GetPlan(ctx context.Context, in *GetPlanRequest, opts ...client.CallOption) (*GetPlanResponse, error)
ListPlan(ctx context.Context, in *ListPlanRequest, opts ...client.CallOption) (*ListPlanResponse, error)
CreatePlan(ctx context.Context, in *CreatePlanRequest, opts ...client.CallOption) (*CreatePlanResponse, error)
UpdatePlan(ctx context.Context, in *UpdatePlanRequest, opts ...client.CallOption) (*UpdatePlanResponse, error)
DeletePlan(ctx context.Context, in *DeletePlanRequest, opts ...client.CallOption) (*DeletePlanResponse, error)
GetJob(ctx context.Context, in *GetJobRequest, opts ...client.CallOption) (*GetJobResponse, error)
ListJob(ctx context.Context, in *ListJobRequest, opts ...client.CallOption) (*ListJobResponse, error)
RunPlan(ctx context.Context, in *RunPlanRequest, opts ...client.CallOption) (*RunPlanResponse, error)
}
type dataFlowService struct {
c client.Client
name string
}
func NewDataFlowService(name string, c client.Client) DataFlowService {
if c == nil {
c = client.NewClient()
}
if len(name) == 0 {
name = "dataflow"
}
return &dataFlowService{
c: c,
name: name,
}
}
func (c *dataFlowService) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...client.CallOption) (*GetPolicyResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.GetPolicy", in)
out := new(GetPolicyResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) ListPolicy(ctx context.Context, in *ListPolicyRequest, opts ...client.CallOption) (*ListPolicyResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.ListPolicy", in)
out := new(ListPolicyResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) CreatePolicy(ctx context.Context, in *CreatePolicyRequest, opts ...client.CallOption) (*CreatePolicyResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.CreatePolicy", in)
out := new(CreatePolicyResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest, opts ...client.CallOption) (*UpdatePolicyResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.UpdatePolicy", in)
out := new(UpdatePolicyResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...client.CallOption) (*DeletePolicyResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.DeletePolicy", in)
out := new(DeletePolicyResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) GetPlan(ctx context.Context, in *GetPlanRequest, opts ...client.CallOption) (*GetPlanResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.GetPlan", in)
out := new(GetPlanResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) ListPlan(ctx context.Context, in *ListPlanRequest, opts ...client.CallOption) (*ListPlanResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.ListPlan", in)
out := new(ListPlanResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) CreatePlan(ctx context.Context, in *CreatePlanRequest, opts ...client.CallOption) (*CreatePlanResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.CreatePlan", in)
out := new(CreatePlanResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) UpdatePlan(ctx context.Context, in *UpdatePlanRequest, opts ...client.CallOption) (*UpdatePlanResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.UpdatePlan", in)
out := new(UpdatePlanResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) DeletePlan(ctx context.Context, in *DeletePlanRequest, opts ...client.CallOption) (*DeletePlanResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.DeletePlan", in)
out := new(DeletePlanResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) GetJob(ctx context.Context, in *GetJobRequest, opts ...client.CallOption) (*GetJobResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.GetJob", in)
out := new(GetJobResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) ListJob(ctx context.Context, in *ListJobRequest, opts ...client.CallOption) (*ListJobResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.ListJob", in)
out := new(ListJobResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dataFlowService) RunPlan(ctx context.Context, in *RunPlanRequest, opts ...client.CallOption) (*RunPlanResponse, error) {
req := c.c.NewRequest(c.name, "DataFlow.RunPlan", in)
out := new(RunPlanResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for DataFlow service
type DataFlowHandler interface {
GetPolicy(context.Context, *GetPolicyRequest, *GetPolicyResponse) error
ListPolicy(context.Context, *ListPolicyRequest, *ListPolicyResponse) error
CreatePolicy(context.Context, *CreatePolicyRequest, *CreatePolicyResponse) error
UpdatePolicy(context.Context, *UpdatePolicyRequest, *UpdatePolicyResponse) error
DeletePolicy(context.Context, *DeletePolicyRequest, *DeletePolicyResponse) error
GetPlan(context.Context, *GetPlanRequest, *GetPlanResponse) error
ListPlan(context.Context, *ListPlanRequest, *ListPlanResponse) error
CreatePlan(context.Context, *CreatePlanRequest, *CreatePlanResponse) error
UpdatePlan(context.Context, *UpdatePlanRequest, *UpdatePlanResponse) error
DeletePlan(context.Context, *DeletePlanRequest, *DeletePlanResponse) error
GetJob(context.Context, *GetJobRequest, *GetJobResponse) error
ListJob(context.Context, *ListJobRequest, *ListJobResponse) error
RunPlan(context.Context, *RunPlanRequest, *RunPlanResponse) error
}
func RegisterDataFlowHandler(s server.Server, hdlr DataFlowHandler, opts ...server.HandlerOption) error {
type dataFlow interface {
GetPolicy(ctx context.Context, in *GetPolicyRequest, out *GetPolicyResponse) error
ListPolicy(ctx context.Context, in *ListPolicyRequest, out *ListPolicyResponse) error
CreatePolicy(ctx context.Context, in *CreatePolicyRequest, out *CreatePolicyResponse) error
UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest, out *UpdatePolicyResponse) error
DeletePolicy(ctx context.Context, in *DeletePolicyRequest, out *DeletePolicyResponse) error
GetPlan(ctx context.Context, in *GetPlanRequest, out *GetPlanResponse) error
ListPlan(ctx context.Context, in *ListPlanRequest, out *ListPlanResponse) error
CreatePlan(ctx context.Context, in *CreatePlanRequest, out *CreatePlanResponse) error
UpdatePlan(ctx context.Context, in *UpdatePlanRequest, out *UpdatePlanResponse) error
DeletePlan(ctx context.Context, in *DeletePlanRequest, out *DeletePlanResponse) error
GetJob(ctx context.Context, in *GetJobRequest, out *GetJobResponse) error
ListJob(ctx context.Context, in *ListJobRequest, out *ListJobResponse) error
RunPlan(ctx context.Context, in *RunPlanRequest, out *RunPlanResponse) error
}
type DataFlow struct {
dataFlow
}
h := &dataFlowHandler{hdlr}
return s.Handle(s.NewHandler(&DataFlow{h}, opts...))
}
type dataFlowHandler struct {
DataFlowHandler
}
func (h *dataFlowHandler) GetPolicy(ctx context.Context, in *GetPolicyRequest, out *GetPolicyResponse) error {
return h.DataFlowHandler.GetPolicy(ctx, in, out)
}
func (h *dataFlowHandler) ListPolicy(ctx context.Context, in *ListPolicyRequest, out *ListPolicyResponse) error {
return h.DataFlowHandler.ListPolicy(ctx, in, out)
}
func (h *dataFlowHandler) CreatePolicy(ctx context.Context, in *CreatePolicyRequest, out *CreatePolicyResponse) error {
return h.DataFlowHandler.CreatePolicy(ctx, in, out)
}
func (h *dataFlowHandler) UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest, out *UpdatePolicyResponse) error {
return h.DataFlowHandler.UpdatePolicy(ctx, in, out)
}
func (h *dataFlowHandler) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, out *DeletePolicyResponse) error {
return h.DataFlowHandler.DeletePolicy(ctx, in, out)
}
func (h *dataFlowHandler) GetPlan(ctx context.Context, in *GetPlanRequest, out *GetPlanResponse) error {
return h.DataFlowHandler.GetPlan(ctx, in, out)
}
func (h *dataFlowHandler) ListPlan(ctx context.Context, in *ListPlanRequest, out *ListPlanResponse) error {
return h.DataFlowHandler.ListPlan(ctx, in, out)
}
func (h *dataFlowHandler) CreatePlan(ctx context.Context, in *CreatePlanRequest, out *CreatePlanResponse) error {
return h.DataFlowHandler.CreatePlan(ctx, in, out)
}
func (h *dataFlowHandler) UpdatePlan(ctx context.Context, in *UpdatePlanRequest, out *UpdatePlanResponse) error {
return h.DataFlowHandler.UpdatePlan(ctx, in, out)
}
func (h *dataFlowHandler) DeletePlan(ctx context.Context, in *DeletePlanRequest, out *DeletePlanResponse) error {
return h.DataFlowHandler.DeletePlan(ctx, in, out)
}
func (h *dataFlowHandler) GetJob(ctx context.Context, in *GetJobRequest, out *GetJobResponse) error {
return h.DataFlowHandler.GetJob(ctx, in, out)
}
func (h *dataFlowHandler) ListJob(ctx context.Context, in *ListJobRequest, out *ListJobResponse) error {
return h.DataFlowHandler.ListJob(ctx, in, out)
}
func (h *dataFlowHandler) RunPlan(ctx context.Context, in *RunPlanRequest, out *RunPlanResponse) error {
return h.DataFlowHandler.RunPlan(ctx, in, out)
}