-
Notifications
You must be signed in to change notification settings - Fork 167
/
proto.micro.go
188 lines (156 loc) · 5.75 KB
/
proto.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
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: proto.proto
/*
Package cert is a generated protocol buffer package.
It is generated from these files:
proto.proto
It has these top-level messages:
GetCertificateRequest
GetCertificateResponse
Authentication
ShareSecretAuthentication
LicenseInfo
StoredLicense
AccountLicenses
PutLicenseInfoRequest
PutLicenseInfoResponse
LicenseStatsRequest
LicenseStatsResponse
MaintainStatsRequest
MaintainStatsResponse
*/
package cert
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/golang/protobuf/ptypes/any"
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 CertCAService service
type CertCAServiceClient interface {
GetCertificate(ctx context.Context, in *GetCertificateRequest, opts ...client.CallOption) (*GetCertificateResponse, error)
}
type certCAServiceClient struct {
c client.Client
serviceName string
}
func NewCertCAServiceClient(serviceName string, c client.Client) CertCAServiceClient {
if c == nil {
c = client.NewClient()
}
if len(serviceName) == 0 {
serviceName = "cert"
}
return &certCAServiceClient{
c: c,
serviceName: serviceName,
}
}
func (c *certCAServiceClient) GetCertificate(ctx context.Context, in *GetCertificateRequest, opts ...client.CallOption) (*GetCertificateResponse, error) {
req := c.c.NewRequest(c.serviceName, "CertCAService.GetCertificate", in)
out := new(GetCertificateResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for CertCAService service
type CertCAServiceHandler interface {
GetCertificate(context.Context, *GetCertificateRequest, *GetCertificateResponse) error
}
func RegisterCertCAServiceHandler(s server.Server, hdlr CertCAServiceHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&CertCAService{hdlr}, opts...))
}
type CertCAService struct {
CertCAServiceHandler
}
func (h *CertCAService) GetCertificate(ctx context.Context, in *GetCertificateRequest, out *GetCertificateResponse) error {
return h.CertCAServiceHandler.GetCertificate(ctx, in, out)
}
// Client API for LicensingService service
type LicensingServiceClient interface {
PutLicenseInfo(ctx context.Context, in *PutLicenseInfoRequest, opts ...client.CallOption) (*PutLicenseInfoResponse, error)
LicenseStats(ctx context.Context, in *LicenseStatsRequest, opts ...client.CallOption) (*LicenseStatsResponse, error)
MaintainStats(ctx context.Context, in *MaintainStatsRequest, opts ...client.CallOption) (*MaintainStatsResponse, error)
}
type licensingServiceClient struct {
c client.Client
serviceName string
}
func NewLicensingServiceClient(serviceName string, c client.Client) LicensingServiceClient {
if c == nil {
c = client.NewClient()
}
if len(serviceName) == 0 {
serviceName = "cert"
}
return &licensingServiceClient{
c: c,
serviceName: serviceName,
}
}
func (c *licensingServiceClient) PutLicenseInfo(ctx context.Context, in *PutLicenseInfoRequest, opts ...client.CallOption) (*PutLicenseInfoResponse, error) {
req := c.c.NewRequest(c.serviceName, "LicensingService.PutLicenseInfo", in)
out := new(PutLicenseInfoResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *licensingServiceClient) LicenseStats(ctx context.Context, in *LicenseStatsRequest, opts ...client.CallOption) (*LicenseStatsResponse, error) {
req := c.c.NewRequest(c.serviceName, "LicensingService.LicenseStats", in)
out := new(LicenseStatsResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *licensingServiceClient) MaintainStats(ctx context.Context, in *MaintainStatsRequest, opts ...client.CallOption) (*MaintainStatsResponse, error) {
req := c.c.NewRequest(c.serviceName, "LicensingService.MaintainStats", in)
out := new(MaintainStatsResponse)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for LicensingService service
type LicensingServiceHandler interface {
PutLicenseInfo(context.Context, *PutLicenseInfoRequest, *PutLicenseInfoResponse) error
LicenseStats(context.Context, *LicenseStatsRequest, *LicenseStatsResponse) error
MaintainStats(context.Context, *MaintainStatsRequest, *MaintainStatsResponse) error
}
func RegisterLicensingServiceHandler(s server.Server, hdlr LicensingServiceHandler, opts ...server.HandlerOption) {
s.Handle(s.NewHandler(&LicensingService{hdlr}, opts...))
}
type LicensingService struct {
LicensingServiceHandler
}
func (h *LicensingService) PutLicenseInfo(ctx context.Context, in *PutLicenseInfoRequest, out *PutLicenseInfoResponse) error {
return h.LicensingServiceHandler.PutLicenseInfo(ctx, in, out)
}
func (h *LicensingService) LicenseStats(ctx context.Context, in *LicenseStatsRequest, out *LicenseStatsResponse) error {
return h.LicensingServiceHandler.LicenseStats(ctx, in, out)
}
func (h *LicensingService) MaintainStats(ctx context.Context, in *MaintainStatsRequest, out *MaintainStatsResponse) error {
return h.LicensingServiceHandler.MaintainStats(ctx, in, out)
}