forked from pydio/cells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
object.micro.go
222 lines (182 loc) · 6.82 KB
/
object.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
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: object.proto
/*
Package object is a generated protocol buffer package.
It is generated from these files:
object.proto
It has these top-level messages:
CleanResourcesRequest
CleanResourcesResponse
DataSource
MinioConfig
DataSourceEvent
GetMinioConfigRequest
GetMinioConfigResponse
StorageStatsRequest
StorageStatsResponse
GetDataSourceConfigRequest
GetDataSourceConfigResponse
*/
package object
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/mwitkow/go-proto-validators"
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 ObjectsEndpoint service
type ObjectsEndpointClient interface {
GetMinioConfig(ctx context.Context, in *GetMinioConfigRequest, opts ...client.CallOption) (*GetMinioConfigResponse, error)
StorageStats(ctx context.Context, in *StorageStatsRequest, opts ...client.CallOption) (*StorageStatsResponse, error)
}
type objectsEndpointClient struct {
c client.Client
serviceName string
}
func NewObjectsEndpointClient(serviceName string, c client.Client) ObjectsEndpointClient {
if c == nil {
c = client.NewClient()
}
if len(serviceName) == 0 {
serviceName = "object"
}
return &objectsEndpointClient{
c: c,
serviceName: serviceName,
}
}
func (c *objectsEndpointClient) GetMinioConfig(ctx context.Context, in *GetMinioConfigRequest, opts ...client.CallOption) (*GetMinioConfigResponse, error) {
req := c.c.NewRequest(c.serviceName, "ObjectsEndpoint.GetMinioConfig", in)
out := new(GetMinioConfigResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *objectsEndpointClient) StorageStats(ctx context.Context, in *StorageStatsRequest, opts ...client.CallOption) (*StorageStatsResponse, error) {
req := c.c.NewRequest(c.serviceName, "ObjectsEndpoint.StorageStats", in)
out := new(StorageStatsResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ObjectsEndpoint service
type ObjectsEndpointHandler interface {
GetMinioConfig(context.Context, *GetMinioConfigRequest, *GetMinioConfigResponse) error
StorageStats(context.Context, *StorageStatsRequest, *StorageStatsResponse) error
}
func RegisterObjectsEndpointHandler(s server.Server, hdlr ObjectsEndpointHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&ObjectsEndpoint{hdlr}, opts...))
}
type ObjectsEndpoint struct {
ObjectsEndpointHandler
}
func (h *ObjectsEndpoint) GetMinioConfig(ctx context.Context, in *GetMinioConfigRequest, out *GetMinioConfigResponse) error {
return h.ObjectsEndpointHandler.GetMinioConfig(ctx, in, out)
}
func (h *ObjectsEndpoint) StorageStats(ctx context.Context, in *StorageStatsRequest, out *StorageStatsResponse) error {
return h.ObjectsEndpointHandler.StorageStats(ctx, in, out)
}
// Client API for DataSourceEndpoint service
type DataSourceEndpointClient interface {
GetDataSourceConfig(ctx context.Context, in *GetDataSourceConfigRequest, opts ...client.CallOption) (*GetDataSourceConfigResponse, error)
}
type dataSourceEndpointClient struct {
c client.Client
serviceName string
}
func NewDataSourceEndpointClient(serviceName string, c client.Client) DataSourceEndpointClient {
if c == nil {
c = client.NewClient()
}
if len(serviceName) == 0 {
serviceName = "object"
}
return &dataSourceEndpointClient{
c: c,
serviceName: serviceName,
}
}
func (c *dataSourceEndpointClient) GetDataSourceConfig(ctx context.Context, in *GetDataSourceConfigRequest, opts ...client.CallOption) (*GetDataSourceConfigResponse, error) {
req := c.c.NewRequest(c.serviceName, "DataSourceEndpoint.GetDataSourceConfig", in)
out := new(GetDataSourceConfigResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for DataSourceEndpoint service
type DataSourceEndpointHandler interface {
GetDataSourceConfig(context.Context, *GetDataSourceConfigRequest, *GetDataSourceConfigResponse) error
}
func RegisterDataSourceEndpointHandler(s server.Server, hdlr DataSourceEndpointHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&DataSourceEndpoint{hdlr}, opts...))
}
type DataSourceEndpoint struct {
DataSourceEndpointHandler
}
func (h *DataSourceEndpoint) GetDataSourceConfig(ctx context.Context, in *GetDataSourceConfigRequest, out *GetDataSourceConfigResponse) error {
return h.DataSourceEndpointHandler.GetDataSourceConfig(ctx, in, out)
}
// Client API for ResourceCleanerEndpoint service
type ResourceCleanerEndpointClient interface {
CleanResourcesBeforeDelete(ctx context.Context, in *CleanResourcesRequest, opts ...client.CallOption) (*CleanResourcesResponse, error)
}
type resourceCleanerEndpointClient struct {
c client.Client
serviceName string
}
func NewResourceCleanerEndpointClient(serviceName string, c client.Client) ResourceCleanerEndpointClient {
if c == nil {
c = client.NewClient()
}
if len(serviceName) == 0 {
serviceName = "object"
}
return &resourceCleanerEndpointClient{
c: c,
serviceName: serviceName,
}
}
func (c *resourceCleanerEndpointClient) CleanResourcesBeforeDelete(ctx context.Context, in *CleanResourcesRequest, opts ...client.CallOption) (*CleanResourcesResponse, error) {
req := c.c.NewRequest(c.serviceName, "ResourceCleanerEndpoint.CleanResourcesBeforeDelete", in)
out := new(CleanResourcesResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ResourceCleanerEndpoint service
type ResourceCleanerEndpointHandler interface {
CleanResourcesBeforeDelete(context.Context, *CleanResourcesRequest, *CleanResourcesResponse) error
}
func RegisterResourceCleanerEndpointHandler(s server.Server, hdlr ResourceCleanerEndpointHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&ResourceCleanerEndpoint{hdlr}, opts...))
}
type ResourceCleanerEndpoint struct {
ResourceCleanerEndpointHandler
}
func (h *ResourceCleanerEndpoint) CleanResourcesBeforeDelete(ctx context.Context, in *CleanResourcesRequest, out *CleanResourcesResponse) error {
return h.ResourceCleanerEndpointHandler.CleanResourcesBeforeDelete(ctx, in, out)
}