11 |
{highlightElement("installation")}}>
12 | # Installation
13 |
14 |
15 |
16 | Install the terminal client directly from the source by running
17 |
18 |
19 | $ go install github.com/leonwind/cli2cloud/cli/cli2cloud@latest
20 |
21 |
22 |
23 |
24 |
{highlightElement("examples")}}>
25 | # Examples
26 |
27 |
28 |
{highlightElement("normal-usage")}}>
29 | ## Normal usage
30 |
31 |
32 |
33 | To just pipe your terminal output from any arbitrary command, run
34 |
35 |
36 | $ ping google.com | cli2cloud
37 | Your client ID: 4sYe3G
38 | Share and monitor it live from https://cli2cloud.com/4sYe3G
39 |
40 | PING google.com (172.217.22.142): 56 data bytes
41 | 64 bytes from 172.217.22.142: icmp_seq=0 ttl=112 time=12.306 ms
42 | 64 bytes from 172.217.22.142: icmp_seq=1 ttl=112 time=14.317 ms
43 | ...
44 |
45 |
46 |
47 | and open https://cli2cloud.com/{"{your ID}"} on any browser you have.
48 | It will pipe both your Stdout and your Stderr output to the web.
49 |
50 |
51 |
{highlightElement("e2ee")}}>
52 | ## End-to-End encryption
53 |
54 |
55 |
56 | Use the -encrypt {"{password}"} option
57 | to encrypt your data End-to-End using the AES CBC Mode { }
58 | and a 256 bit key generated based on your password using the PBKDF2 function.
59 |
60 |
61 |
62 | $ ping google.com | cli2cloud -encrypt 1234
63 | Your client ID: CGYWdD
64 | Share and monitor it live from https://cli2cloud.com/CGYWdD?key=1234
65 |
66 | PING google.com (172.217.22.142): 56 data bytes
67 | 64 bytes from 172.217.22.142: icmp_seq=0 ttl=112 time=14.154 ms
68 | 64 bytes from 172.217.22.142: icmp_seq=1 ttl=112 time=12.565 ms
69 | ...
70 |
71 |
72 |
73 |
74 | To decrypt the data on the web, you need to enter the same password again.
75 | The server does not store your password or the hash of it and thus can't validate if your password is either correct or incorrect.
76 | You will see complete garbage if you enter a wrong password :)
77 |
78 |
79 | Use the option -encrypt-random to generate a random secure password with 16 symbols.
80 |
81 |
82 | $ ping google.com | cli2cloud -encrypt-random
83 | Your password: mruI3ubFXTww1QYf
84 | Your client ID: 56xY35
85 | Share and monitor it live from https://cli2cloud.com/56xY35?key=mruI3ubFXTww1QYf
86 |
87 | PING google.com (142.250.201.174): 56 data bytes
88 | 64 bytes from 142.250.201.174: icmp_seq=0 ttl=116 time=3.322 ms
89 | 64 bytes from 142.250.201.174: icmp_seq=1 ttl=116 time=2.648 ms
90 | ...
91 |
92 |
93 |
94 |
95 |
{highlightElement("feedback")}}>
96 | # Feedback
97 |
98 |
99 | The code is open-source available on GitHub.
100 | Feel free to open a new Issue regarding any feedback, bugs or feature requests.
101 |
102 |
103 |
104 |
105 | )
106 | }
--------------------------------------------------------------------------------
/cli/cli2cloud/proto/cli_grpc.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2 | // versions:
3 | // - protoc-gen-go-grpc v1.2.0
4 | // - protoc v3.19.4
5 | // source: cli.proto
6 |
7 | package proto
8 |
9 | import (
10 | context "context"
11 | grpc "google.golang.org/grpc"
12 | codes "google.golang.org/grpc/codes"
13 | status "google.golang.org/grpc/status"
14 | )
15 |
16 | // This is a compile-time assertion to ensure that this generated file
17 | // is compatible with the grpc package it is being compiled against.
18 | // Requires gRPC-Go v1.32.0 or later.
19 | const _ = grpc.SupportPackageIsVersion7
20 |
21 | // Cli2CloudClient is the client API for Cli2Cloud service.
22 | //
23 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
24 | type Cli2CloudClient interface {
25 | RegisterClient(ctx context.Context, in *Client, opts ...grpc.CallOption) (*ClientId, error)
26 | Publish(ctx context.Context, opts ...grpc.CallOption) (Cli2Cloud_PublishClient, error)
27 | }
28 |
29 | type cli2CloudClient struct {
30 | cc grpc.ClientConnInterface
31 | }
32 |
33 | func NewCli2CloudClient(cc grpc.ClientConnInterface) Cli2CloudClient {
34 | return &cli2CloudClient{cc}
35 | }
36 |
37 | func (c *cli2CloudClient) RegisterClient(ctx context.Context, in *Client, opts ...grpc.CallOption) (*ClientId, error) {
38 | out := new(ClientId)
39 | err := c.cc.Invoke(ctx, "/proto.Cli2Cloud/RegisterClient", in, out, opts...)
40 | if err != nil {
41 | return nil, err
42 | }
43 | return out, nil
44 | }
45 |
46 | func (c *cli2CloudClient) Publish(ctx context.Context, opts ...grpc.CallOption) (Cli2Cloud_PublishClient, error) {
47 | stream, err := c.cc.NewStream(ctx, &Cli2Cloud_ServiceDesc.Streams[0], "/proto.Cli2Cloud/Publish", opts...)
48 | if err != nil {
49 | return nil, err
50 | }
51 | x := &cli2CloudPublishClient{stream}
52 | return x, nil
53 | }
54 |
55 | type Cli2Cloud_PublishClient interface {
56 | Send(*PublishRequest) error
57 | CloseAndRecv() (*Empty, error)
58 | grpc.ClientStream
59 | }
60 |
61 | type cli2CloudPublishClient struct {
62 | grpc.ClientStream
63 | }
64 |
65 | func (x *cli2CloudPublishClient) Send(m *PublishRequest) error {
66 | return x.ClientStream.SendMsg(m)
67 | }
68 |
69 | func (x *cli2CloudPublishClient) CloseAndRecv() (*Empty, error) {
70 | if err := x.ClientStream.CloseSend(); err != nil {
71 | return nil, err
72 | }
73 | m := new(Empty)
74 | if err := x.ClientStream.RecvMsg(m); err != nil {
75 | return nil, err
76 | }
77 | return m, nil
78 | }
79 |
80 | // Cli2CloudServer is the server API for Cli2Cloud service.
81 | // All implementations must embed UnimplementedCli2CloudServer
82 | // for forward compatibility
83 | type Cli2CloudServer interface {
84 | RegisterClient(context.Context, *Client) (*ClientId, error)
85 | Publish(Cli2Cloud_PublishServer) error
86 | mustEmbedUnimplementedCli2CloudServer()
87 | }
88 |
89 | // UnimplementedCli2CloudServer must be embedded to have forward compatible implementations.
90 | type UnimplementedCli2CloudServer struct {
91 | }
92 |
93 | func (UnimplementedCli2CloudServer) RegisterClient(context.Context, *Client) (*ClientId, error) {
94 | return nil, status.Errorf(codes.Unimplemented, "method RegisterClient not implemented")
95 | }
96 | func (UnimplementedCli2CloudServer) Publish(Cli2Cloud_PublishServer) error {
97 | return status.Errorf(codes.Unimplemented, "method Publish not implemented")
98 | }
99 | func (UnimplementedCli2CloudServer) mustEmbedUnimplementedCli2CloudServer() {}
100 |
101 | // UnsafeCli2CloudServer may be embedded to opt out of forward compatibility for this service.
102 | // Use of this interface is not recommended, as added methods to Cli2CloudServer will
103 | // result in compilation errors.
104 | type UnsafeCli2CloudServer interface {
105 | mustEmbedUnimplementedCli2CloudServer()
106 | }
107 |
108 | func RegisterCli2CloudServer(s grpc.ServiceRegistrar, srv Cli2CloudServer) {
109 | s.RegisterService(&Cli2Cloud_ServiceDesc, srv)
110 | }
111 |
112 | func _Cli2Cloud_RegisterClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
113 | in := new(Client)
114 | if err := dec(in); err != nil {
115 | return nil, err
116 | }
117 | if interceptor == nil {
118 | return srv.(Cli2CloudServer).RegisterClient(ctx, in)
119 | }
120 | info := &grpc.UnaryServerInfo{
121 | Server: srv,
122 | FullMethod: "/proto.Cli2Cloud/RegisterClient",
123 | }
124 | handler := func(ctx context.Context, req interface{}) (interface{}, error) {
125 | return srv.(Cli2CloudServer).RegisterClient(ctx, req.(*Client))
126 | }
127 | return interceptor(ctx, in, info, handler)
128 | }
129 |
130 | func _Cli2Cloud_Publish_Handler(srv interface{}, stream grpc.ServerStream) error {
131 | return srv.(Cli2CloudServer).Publish(&cli2CloudPublishServer{stream})
132 | }
133 |
134 | type Cli2Cloud_PublishServer interface {
135 | SendAndClose(*Empty) error
136 | Recv() (*PublishRequest, error)
137 | grpc.ServerStream
138 | }
139 |
140 | type cli2CloudPublishServer struct {
141 | grpc.ServerStream
142 | }
143 |
144 | func (x *cli2CloudPublishServer) SendAndClose(m *Empty) error {
145 | return x.ServerStream.SendMsg(m)
146 | }
147 |
148 | func (x *cli2CloudPublishServer) Recv() (*PublishRequest, error) {
149 | m := new(PublishRequest)
150 | if err := x.ServerStream.RecvMsg(m); err != nil {
151 | return nil, err
152 | }
153 | return m, nil
154 | }
155 |
156 | // Cli2Cloud_ServiceDesc is the grpc.ServiceDesc for Cli2Cloud service.
157 | // It's only intended for direct use with grpc.RegisterService,
158 | // and not to be introspected or modified (even as a copy)
159 | var Cli2Cloud_ServiceDesc = grpc.ServiceDesc{
160 | ServiceName: "proto.Cli2Cloud",
161 | HandlerType: (*Cli2CloudServer)(nil),
162 | Methods: []grpc.MethodDesc{
163 | {
164 | MethodName: "RegisterClient",
165 | Handler: _Cli2Cloud_RegisterClient_Handler,
166 | },
167 | },
168 | Streams: []grpc.StreamDesc{
169 | {
170 | StreamName: "Publish",
171 | Handler: _Cli2Cloud_Publish_Handler,
172 | ClientStreams: true,
173 | },
174 | },
175 | Metadata: "cli.proto",
176 | }
177 |
--------------------------------------------------------------------------------
/service/api/proto/service_grpc.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2 | // versions:
3 | // - protoc-gen-go-grpc v1.2.0
4 | // - protoc v3.19.4
5 | // source: service.proto
6 |
7 | package proto
8 |
9 | import (
10 | context "context"
11 | grpc "google.golang.org/grpc"
12 | codes "google.golang.org/grpc/codes"
13 | status "google.golang.org/grpc/status"
14 | )
15 |
16 | // This is a compile-time assertion to ensure that this generated file
17 | // is compatible with the grpc package it is being compiled against.
18 | // Requires gRPC-Go v1.32.0 or later.
19 | const _ = grpc.SupportPackageIsVersion7
20 |
21 | // Cli2CloudClient is the client API for Cli2Cloud service.
22 | //
23 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
24 | type Cli2CloudClient interface {
25 | RegisterClient(ctx context.Context, in *Client, opts ...grpc.CallOption) (*ClientId, error)
26 | GetClientById(ctx context.Context, in *ClientId, opts ...grpc.CallOption) (*Client, error)
27 | Publish(ctx context.Context, opts ...grpc.CallOption) (Cli2Cloud_PublishClient, error)
28 | Subscribe(ctx context.Context, in *ClientId, opts ...grpc.CallOption) (Cli2Cloud_SubscribeClient, error)
29 | }
30 |
31 | type cli2CloudClient struct {
32 | cc grpc.ClientConnInterface
33 | }
34 |
35 | func NewCli2CloudClient(cc grpc.ClientConnInterface) Cli2CloudClient {
36 | return &cli2CloudClient{cc}
37 | }
38 |
39 | func (c *cli2CloudClient) RegisterClient(ctx context.Context, in *Client, opts ...grpc.CallOption) (*ClientId, error) {
40 | out := new(ClientId)
41 | err := c.cc.Invoke(ctx, "/proto.Cli2Cloud/RegisterClient", in, out, opts...)
42 | if err != nil {
43 | return nil, err
44 | }
45 | return out, nil
46 | }
47 |
48 | func (c *cli2CloudClient) GetClientById(ctx context.Context, in *ClientId, opts ...grpc.CallOption) (*Client, error) {
49 | out := new(Client)
50 | err := c.cc.Invoke(ctx, "/proto.Cli2Cloud/GetClientById", in, out, opts...)
51 | if err != nil {
52 | return nil, err
53 | }
54 | return out, nil
55 | }
56 |
57 | func (c *cli2CloudClient) Publish(ctx context.Context, opts ...grpc.CallOption) (Cli2Cloud_PublishClient, error) {
58 | stream, err := c.cc.NewStream(ctx, &Cli2Cloud_ServiceDesc.Streams[0], "/proto.Cli2Cloud/Publish", opts...)
59 | if err != nil {
60 | return nil, err
61 | }
62 | x := &cli2CloudPublishClient{stream}
63 | return x, nil
64 | }
65 |
66 | type Cli2Cloud_PublishClient interface {
67 | Send(*PublishRequest) error
68 | CloseAndRecv() (*Empty, error)
69 | grpc.ClientStream
70 | }
71 |
72 | type cli2CloudPublishClient struct {
73 | grpc.ClientStream
74 | }
75 |
76 | func (x *cli2CloudPublishClient) Send(m *PublishRequest) error {
77 | return x.ClientStream.SendMsg(m)
78 | }
79 |
80 | func (x *cli2CloudPublishClient) CloseAndRecv() (*Empty, error) {
81 | if err := x.ClientStream.CloseSend(); err != nil {
82 | return nil, err
83 | }
84 | m := new(Empty)
85 | if err := x.ClientStream.RecvMsg(m); err != nil {
86 | return nil, err
87 | }
88 | return m, nil
89 | }
90 |
91 | func (c *cli2CloudClient) Subscribe(ctx context.Context, in *ClientId, opts ...grpc.CallOption) (Cli2Cloud_SubscribeClient, error) {
92 | stream, err := c.cc.NewStream(ctx, &Cli2Cloud_ServiceDesc.Streams[1], "/proto.Cli2Cloud/Subscribe", opts...)
93 | if err != nil {
94 | return nil, err
95 | }
96 | x := &cli2CloudSubscribeClient{stream}
97 | if err := x.ClientStream.SendMsg(in); err != nil {
98 | return nil, err
99 | }
100 | if err := x.ClientStream.CloseSend(); err != nil {
101 | return nil, err
102 | }
103 | return x, nil
104 | }
105 |
106 | type Cli2Cloud_SubscribeClient interface {
107 | Recv() (*Payload, error)
108 | grpc.ClientStream
109 | }
110 |
111 | type cli2CloudSubscribeClient struct {
112 | grpc.ClientStream
113 | }
114 |
115 | func (x *cli2CloudSubscribeClient) Recv() (*Payload, error) {
116 | m := new(Payload)
117 | if err := x.ClientStream.RecvMsg(m); err != nil {
118 | return nil, err
119 | }
120 | return m, nil
121 | }
122 |
123 | // Cli2CloudServer is the server API for Cli2Cloud service.
124 | // All implementations must embed UnimplementedCli2CloudServer
125 | // for forward compatibility
126 | type Cli2CloudServer interface {
127 | RegisterClient(context.Context, *Client) (*ClientId, error)
128 | GetClientById(context.Context, *ClientId) (*Client, error)
129 | Publish(Cli2Cloud_PublishServer) error
130 | Subscribe(*ClientId, Cli2Cloud_SubscribeServer) error
131 | mustEmbedUnimplementedCli2CloudServer()
132 | }
133 |
134 | // UnimplementedCli2CloudServer must be embedded to have forward compatible implementations.
135 | type UnimplementedCli2CloudServer struct {
136 | }
137 |
138 | func (UnimplementedCli2CloudServer) RegisterClient(context.Context, *Client) (*ClientId, error) {
139 | return nil, status.Errorf(codes.Unimplemented, "method RegisterClient not implemented")
140 | }
141 | func (UnimplementedCli2CloudServer) GetClientById(context.Context, *ClientId) (*Client, error) {
142 | return nil, status.Errorf(codes.Unimplemented, "method GetClientById not implemented")
143 | }
144 | func (UnimplementedCli2CloudServer) Publish(Cli2Cloud_PublishServer) error {
145 | return status.Errorf(codes.Unimplemented, "method Publish not implemented")
146 | }
147 | func (UnimplementedCli2CloudServer) Subscribe(*ClientId, Cli2Cloud_SubscribeServer) error {
148 | return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
149 | }
150 | func (UnimplementedCli2CloudServer) mustEmbedUnimplementedCli2CloudServer() {}
151 |
152 | // UnsafeCli2CloudServer may be embedded to opt out of forward compatibility for this service.
153 | // Use of this interface is not recommended, as added methods to Cli2CloudServer will
154 | // result in compilation errors.
155 | type UnsafeCli2CloudServer interface {
156 | mustEmbedUnimplementedCli2CloudServer()
157 | }
158 |
159 | func RegisterCli2CloudServer(s grpc.ServiceRegistrar, srv Cli2CloudServer) {
160 | s.RegisterService(&Cli2Cloud_ServiceDesc, srv)
161 | }
162 |
163 | func _Cli2Cloud_RegisterClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
164 | in := new(Client)
165 | if err := dec(in); err != nil {
166 | return nil, err
167 | }
168 | if interceptor == nil {
169 | return srv.(Cli2CloudServer).RegisterClient(ctx, in)
170 | }
171 | info := &grpc.UnaryServerInfo{
172 | Server: srv,
173 | FullMethod: "/proto.Cli2Cloud/RegisterClient",
174 | }
175 | handler := func(ctx context.Context, req interface{}) (interface{}, error) {
176 | return srv.(Cli2CloudServer).RegisterClient(ctx, req.(*Client))
177 | }
178 | return interceptor(ctx, in, info, handler)
179 | }
180 |
181 | func _Cli2Cloud_GetClientById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
182 | in := new(ClientId)
183 | if err := dec(in); err != nil {
184 | return nil, err
185 | }
186 | if interceptor == nil {
187 | return srv.(Cli2CloudServer).GetClientById(ctx, in)
188 | }
189 | info := &grpc.UnaryServerInfo{
190 | Server: srv,
191 | FullMethod: "/proto.Cli2Cloud/GetClientById",
192 | }
193 | handler := func(ctx context.Context, req interface{}) (interface{}, error) {
194 | return srv.(Cli2CloudServer).GetClientById(ctx, req.(*ClientId))
195 | }
196 | return interceptor(ctx, in, info, handler)
197 | }
198 |
199 | func _Cli2Cloud_Publish_Handler(srv interface{}, stream grpc.ServerStream) error {
200 | return srv.(Cli2CloudServer).Publish(&cli2CloudPublishServer{stream})
201 | }
202 |
203 | type Cli2Cloud_PublishServer interface {
204 | SendAndClose(*Empty) error
205 | Recv() (*PublishRequest, error)
206 | grpc.ServerStream
207 | }
208 |
209 | type cli2CloudPublishServer struct {
210 | grpc.ServerStream
211 | }
212 |
213 | func (x *cli2CloudPublishServer) SendAndClose(m *Empty) error {
214 | return x.ServerStream.SendMsg(m)
215 | }
216 |
217 | func (x *cli2CloudPublishServer) Recv() (*PublishRequest, error) {
218 | m := new(PublishRequest)
219 | if err := x.ServerStream.RecvMsg(m); err != nil {
220 | return nil, err
221 | }
222 | return m, nil
223 | }
224 |
225 | func _Cli2Cloud_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
226 | m := new(ClientId)
227 | if err := stream.RecvMsg(m); err != nil {
228 | return err
229 | }
230 | return srv.(Cli2CloudServer).Subscribe(m, &cli2CloudSubscribeServer{stream})
231 | }
232 |
233 | type Cli2Cloud_SubscribeServer interface {
234 | Send(*Payload) error
235 | grpc.ServerStream
236 | }
237 |
238 | type cli2CloudSubscribeServer struct {
239 | grpc.ServerStream
240 | }
241 |
242 | func (x *cli2CloudSubscribeServer) Send(m *Payload) error {
243 | return x.ServerStream.SendMsg(m)
244 | }
245 |
246 | // Cli2Cloud_ServiceDesc is the grpc.ServiceDesc for Cli2Cloud service.
247 | // It's only intended for direct use with grpc.RegisterService,
248 | // and not to be introspected or modified (even as a copy)
249 | var Cli2Cloud_ServiceDesc = grpc.ServiceDesc{
250 | ServiceName: "proto.Cli2Cloud",
251 | HandlerType: (*Cli2CloudServer)(nil),
252 | Methods: []grpc.MethodDesc{
253 | {
254 | MethodName: "RegisterClient",
255 | Handler: _Cli2Cloud_RegisterClient_Handler,
256 | },
257 | {
258 | MethodName: "GetClientById",
259 | Handler: _Cli2Cloud_GetClientById_Handler,
260 | },
261 | },
262 | Streams: []grpc.StreamDesc{
263 | {
264 | StreamName: "Publish",
265 | Handler: _Cli2Cloud_Publish_Handler,
266 | ClientStreams: true,
267 | },
268 | {
269 | StreamName: "Subscribe",
270 | Handler: _Cli2Cloud_Subscribe_Handler,
271 | ServerStreams: true,
272 | },
273 | },
274 | Metadata: "service.proto",
275 | }
276 |
--------------------------------------------------------------------------------
/webapp/src/pages/Monitor.tsx:
--------------------------------------------------------------------------------
1 | import {Component} from "react";
2 | import Ansi from "ansi-to-react";
3 | import hasAnsi from "has-ansi";
4 | import styles from "../styles/Monitor.module.css";
5 | import {Cli2CloudClient} from "../proto/ServiceServiceClientPb"
6 | import {Client, ClientId, Payload} from "../proto/service_pb"
7 | import {DecryptionService} from "../services/DecryptionService"
8 | import {NavBar} from "../components/NavBar"
9 | import { ChangeDecryptionPwd } from "../components/ChangeDecryptionPwd";
10 |
11 |
12 | interface Row {
13 | content: string,
14 | line: number,
15 | }
16 |
17 | interface State {
18 | encrypted: boolean,
19 | enterPwdFirstTime: boolean,
20 | password: string | null,
21 | decryptor: DecryptionService | null,
22 | rows: Row[],
23 | raw: boolean,
24 | highlightRow: string,
25 | }
26 |
27 | export class Monitor extends Component<{}, State> {
28 | private numLines: number;
29 | private cli2CloudService: Cli2CloudClient;
30 | private clientId: ClientId;
31 | private client: Promise
;
32 |
33 | constructor(props: any) {
34 | super(props);
35 |
36 | // Redirect due to backward compatibility with old client which set the
37 | // key as a query parameter(?key=) and not as a hash parameter (#key=)
38 | let params = new URLSearchParams(new URL(window.location.href).search);
39 | if (params.has("key")) {
40 | const password = params.get("key");
41 | if (password !== null) {
42 | this.addToHashParam("key", password);
43 | }
44 | params.delete("key");
45 | window.location.search = params.toString()
46 | }
47 |
48 | let password = this.extractFromHash(window.location.hash, "key");
49 | let highlightRowId = this.extractFromHash(window.location.hash, "row");
50 |
51 | this.state = {
52 | encrypted: false,
53 | enterPwdFirstTime: password === null,
54 | password: password,
55 | decryptor: null,
56 | rows: [],
57 | raw: params.has("raw"),
58 | highlightRow: highlightRowId === null ? "" : highlightRowId,
59 | };
60 |
61 | this.numLines = 1;
62 | this.cli2CloudService = new Cli2CloudClient("https://cli2cloud.com:1443", null, null); // production
63 | //this.cli2CloudService = new Cli2CloudClient("http://localhost:8000", null, null); // local dev
64 |
65 | this.clientId = new ClientId();
66 | const id = window.location.pathname.substring(1);
67 | this.clientId.setId(id);
68 |
69 | this.client = this.cli2CloudService.getClientById(this.clientId, {})
70 | }
71 |
72 | componentDidMount() {
73 | this.loadContent = this.loadContent.bind(this);
74 | this.highlightRow = this.highlightRow.bind(this);
75 | this.updatePassword = this.updatePassword.bind(this);
76 | this.afterFirstTimePassword = this.afterFirstTimePassword.bind(this);
77 | this.switchToRawData = this.switchToRawData.bind(this);
78 |
79 | this.client.then((client) => {this.setState({encrypted: client.getEncrypted()})});
80 |
81 | if (!this.state.enterPwdFirstTime) {
82 | this.createDecryptor(this.state.password);
83 | }
84 |
85 | this.loadContent();
86 | }
87 |
88 | private extractFromHash(hash: string, key: string): string | null {
89 | const params: string = hash.substring(1, hash.length);
90 | let value: string | null = null;
91 |
92 | params.split("&").forEach((parts, _) => {
93 | let kv = parts.split("=");
94 | if (kv !== [] && kv[0] === key) {
95 | value = kv[1];
96 | }
97 | });
98 | return value;
99 | }
100 |
101 | private addToHashParam(key: string, value: string, remove: boolean=false) {
102 | const newParamPair = key + "=" + value;
103 | const currHash = window.location.hash.substring(1, window.location.hash.length);
104 | let newHash = "";
105 | let exists: boolean = false;
106 |
107 | currHash.split("&").forEach((parts, _) => {
108 | let kv = parts.split("=");
109 | if (kv.length !== 0 && kv[0] !== '') {
110 | if (kv[0] === key) {
111 | exists = true;
112 | if (remove) {
113 | return;
114 | }
115 | newHash += newParamPair;
116 | } else {
117 | newHash += parts;
118 | }
119 | newHash += '&';
120 | }
121 | });
122 |
123 | if (!exists) {
124 | newHash += newParamPair;
125 | }
126 |
127 | window.location.hash = newHash;
128 | }
129 |
130 | private updatePassword(newPassword: string) {
131 | this.addToHashParam("key", newPassword);
132 | this.setState({password: newPassword});
133 | this.createDecryptor(newPassword);
134 | }
135 |
136 | private createDecryptor(password: string | null) {
137 | if (password === null) {
138 | console.log("Can't create decryptor");
139 | return;
140 | }
141 | this.client.then((client: Client) => {
142 | this.setState({decryptor: new DecryptionService(password!, client.getSalt(), client.getIv())});
143 | });
144 | }
145 |
146 | private loadContent() {
147 | const stream = this.cli2CloudService.subscribe(this.clientId, {});
148 |
149 | stream.on("data", (response: Payload) => {
150 | this.addNewContent(response.getBody())
151 | });
152 |
153 | stream.on("error", (error: Error): void => {
154 | console.error(error);
155 | });
156 |
157 |
158 | }
159 |
160 | private addNewContent(content: string) {
161 | let newRows: Row[] = this.state.rows;
162 | newRows.push({
163 | content: content,
164 | line: this.numLines,
165 | });
166 | this.numLines += 1
167 | this.setState({rows: newRows});
168 | }
169 |
170 | private highlightRow(line: number) {
171 | if (this.state.highlightRow === line.toString()) {
172 | this.setState({highlightRow: ""});
173 | // delete the hash parameter again if set
174 | this.addToHashParam("row", "", true);
175 | } else {
176 | this.addToHashParam("row", line.toString());
177 | this.setState({highlightRow: line.toString()});
178 | }
179 | }
180 |
181 | private decryptRowIfEncrypted(content: string): string {
182 | if (this.state.encrypted && this.state.decryptor !== null) {
183 | return this.state.decryptor.decrypt(content);
184 | }
185 | return content;
186 | }
187 |
188 | private createNewDecryptorIfEncrypted() {
189 | // Since we decrypt everything again from the beginning,
190 | // we need to init the decryptor from the beginning as well.
191 | if (this.state.decryptor !== null) {
192 | this.state.decryptor.createDecryptor();
193 | }
194 | }
195 |
196 | private createAnsiElementIfNeeded(line: string): JSX.Element | string {
197 | if (hasAnsi(line)) {
198 | return {line};
199 | } else {
200 | return line;
201 | }
202 | }
203 |
204 | private createDivsForAllRows(): JSX.Element[] | JSX.Element {
205 | if (this.state.rows.length === 0) {
206 | return [
207 | No output found for client "{this.clientId.getId()}".
208 |
];
209 | }
210 |
211 | this.createNewDecryptorIfEncrypted()
212 | return this.state.rows.map((row: Row) => {
213 | let rowStyle = row.line.toString() === this.state.highlightRow ? styles.selectedRow : styles.row;
214 |
215 | return
216 | this.highlightRow(row.line)}>
217 | {row.line}
218 |
219 |
220 | {this.createAnsiElementIfNeeded(this.decryptRowIfEncrypted(row.content))}
221 |
222 |
223 | });
224 | }
225 |
226 | private createDivsForRawOutput(): JSX.Element[] | JSX.Element {
227 | if (this.state.rows.length === 0) {
228 | return No output found for client "{this.clientId.getId()}."
229 | }
230 |
231 | this.createNewDecryptorIfEncrypted()
232 | return this.state.rows.map((row: Row) =>
233 | {this.decryptRowIfEncrypted(row.content)}
234 | );
235 | }
236 |
237 | private setURLParams(key: string, value: string) {
238 | let params = new URLSearchParams(new URL(window.location.href).search);
239 | params.set(key, value);
240 | window.location.search = params.toString()
241 | }
242 |
243 | private switchToRawData() {
244 | this.setURLParams("raw", "true");
245 | this.setState({raw: true});
246 | }
247 |
248 | private afterFirstTimePassword() {
249 | this.setState({enterPwdFirstTime: false});
250 | }
251 |
252 | render() {
253 | if (this.state.raw) {
254 | return this.createDivsForRawOutput()
255 | }
256 |
257 | return (
258 | <>
259 | {this.state.encrypted && this.state.decryptor === null &&
260 | }
261 |
262 |
263 |
264 |
265 | {this.createDivsForAllRows()}
266 |
267 |
268 | >
269 | );
270 | }
271 | }
--------------------------------------------------------------------------------
/cli/cli2cloud/go.sum:
--------------------------------------------------------------------------------
1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
3 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
4 | github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
5 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
6 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
7 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
8 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
9 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
10 | github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
11 | github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
12 | github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
13 | github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
14 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
15 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
16 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
17 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
18 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
19 | github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
20 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
21 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
22 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
23 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
24 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
25 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
26 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
27 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
28 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
29 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
30 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
31 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
32 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
33 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
34 | github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
35 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
36 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
37 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
38 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
39 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
40 | github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
41 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
42 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
43 | github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
44 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
45 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
46 | github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
47 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
48 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
49 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
50 | go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
51 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
52 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
53 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=
54 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
55 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
56 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
57 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
58 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
59 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
60 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
61 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
62 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
63 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
64 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
65 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
66 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
67 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
68 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
69 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
70 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
71 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
72 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
73 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
74 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
75 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
76 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
77 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
78 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
79 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
80 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
81 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
82 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
83 | golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
84 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
85 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
86 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
87 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
88 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
89 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
90 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
91 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
92 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
93 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
94 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
95 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
96 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
97 | google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
98 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
99 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
100 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
101 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
102 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
103 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
104 | google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
105 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
106 | google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg=
107 | google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
108 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
109 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
110 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
111 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
112 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
113 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
114 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
115 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
116 | google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
117 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
118 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
119 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
120 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
121 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
122 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
123 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
124 |
--------------------------------------------------------------------------------
/cli/cli2cloud/proto/cli.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go. DO NOT EDIT.
2 | // versions:
3 | // protoc-gen-go v1.27.1
4 | // protoc v3.19.4
5 | // source: cli.proto
6 |
7 | package proto
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 | reflect "reflect"
13 | sync "sync"
14 | )
15 |
16 | const (
17 | // Verify that this generated code is sufficiently up-to-date.
18 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
19 | // Verify that runtime/protoimpl is sufficiently up-to-date.
20 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
21 | )
22 |
23 | type Client struct {
24 | state protoimpl.MessageState
25 | sizeCache protoimpl.SizeCache
26 | unknownFields protoimpl.UnknownFields
27 |
28 | Encrypted bool `protobuf:"varint,1,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
29 | Salt *string `protobuf:"bytes,2,opt,name=salt,proto3,oneof" json:"salt,omitempty"`
30 | Iv *string `protobuf:"bytes,3,opt,name=iv,proto3,oneof" json:"iv,omitempty"`
31 | Timestamp *int64 `protobuf:"varint,4,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"`
32 | }
33 |
34 | func (x *Client) Reset() {
35 | *x = Client{}
36 | if protoimpl.UnsafeEnabled {
37 | mi := &file_cli_proto_msgTypes[0]
38 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
39 | ms.StoreMessageInfo(mi)
40 | }
41 | }
42 |
43 | func (x *Client) String() string {
44 | return protoimpl.X.MessageStringOf(x)
45 | }
46 |
47 | func (*Client) ProtoMessage() {}
48 |
49 | func (x *Client) ProtoReflect() protoreflect.Message {
50 | mi := &file_cli_proto_msgTypes[0]
51 | if protoimpl.UnsafeEnabled && x != nil {
52 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
53 | if ms.LoadMessageInfo() == nil {
54 | ms.StoreMessageInfo(mi)
55 | }
56 | return ms
57 | }
58 | return mi.MessageOf(x)
59 | }
60 |
61 | // Deprecated: Use Client.ProtoReflect.Descriptor instead.
62 | func (*Client) Descriptor() ([]byte, []int) {
63 | return file_cli_proto_rawDescGZIP(), []int{0}
64 | }
65 |
66 | func (x *Client) GetEncrypted() bool {
67 | if x != nil {
68 | return x.Encrypted
69 | }
70 | return false
71 | }
72 |
73 | func (x *Client) GetSalt() string {
74 | if x != nil && x.Salt != nil {
75 | return *x.Salt
76 | }
77 | return ""
78 | }
79 |
80 | func (x *Client) GetIv() string {
81 | if x != nil && x.Iv != nil {
82 | return *x.Iv
83 | }
84 | return ""
85 | }
86 |
87 | func (x *Client) GetTimestamp() int64 {
88 | if x != nil && x.Timestamp != nil {
89 | return *x.Timestamp
90 | }
91 | return 0
92 | }
93 |
94 | type ClientId struct {
95 | state protoimpl.MessageState
96 | sizeCache protoimpl.SizeCache
97 | unknownFields protoimpl.UnknownFields
98 |
99 | Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
100 | }
101 |
102 | func (x *ClientId) Reset() {
103 | *x = ClientId{}
104 | if protoimpl.UnsafeEnabled {
105 | mi := &file_cli_proto_msgTypes[1]
106 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
107 | ms.StoreMessageInfo(mi)
108 | }
109 | }
110 |
111 | func (x *ClientId) String() string {
112 | return protoimpl.X.MessageStringOf(x)
113 | }
114 |
115 | func (*ClientId) ProtoMessage() {}
116 |
117 | func (x *ClientId) ProtoReflect() protoreflect.Message {
118 | mi := &file_cli_proto_msgTypes[1]
119 | if protoimpl.UnsafeEnabled && x != nil {
120 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
121 | if ms.LoadMessageInfo() == nil {
122 | ms.StoreMessageInfo(mi)
123 | }
124 | return ms
125 | }
126 | return mi.MessageOf(x)
127 | }
128 |
129 | // Deprecated: Use ClientId.ProtoReflect.Descriptor instead.
130 | func (*ClientId) Descriptor() ([]byte, []int) {
131 | return file_cli_proto_rawDescGZIP(), []int{1}
132 | }
133 |
134 | func (x *ClientId) GetId() string {
135 | if x != nil {
136 | return x.Id
137 | }
138 | return ""
139 | }
140 |
141 | type PublishRequest struct {
142 | state protoimpl.MessageState
143 | sizeCache protoimpl.SizeCache
144 | unknownFields protoimpl.UnknownFields
145 |
146 | ClientId *ClientId `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
147 | Payload *Payload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
148 | }
149 |
150 | func (x *PublishRequest) Reset() {
151 | *x = PublishRequest{}
152 | if protoimpl.UnsafeEnabled {
153 | mi := &file_cli_proto_msgTypes[2]
154 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
155 | ms.StoreMessageInfo(mi)
156 | }
157 | }
158 |
159 | func (x *PublishRequest) String() string {
160 | return protoimpl.X.MessageStringOf(x)
161 | }
162 |
163 | func (*PublishRequest) ProtoMessage() {}
164 |
165 | func (x *PublishRequest) ProtoReflect() protoreflect.Message {
166 | mi := &file_cli_proto_msgTypes[2]
167 | if protoimpl.UnsafeEnabled && x != nil {
168 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
169 | if ms.LoadMessageInfo() == nil {
170 | ms.StoreMessageInfo(mi)
171 | }
172 | return ms
173 | }
174 | return mi.MessageOf(x)
175 | }
176 |
177 | // Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
178 | func (*PublishRequest) Descriptor() ([]byte, []int) {
179 | return file_cli_proto_rawDescGZIP(), []int{2}
180 | }
181 |
182 | func (x *PublishRequest) GetClientId() *ClientId {
183 | if x != nil {
184 | return x.ClientId
185 | }
186 | return nil
187 | }
188 |
189 | func (x *PublishRequest) GetPayload() *Payload {
190 | if x != nil {
191 | return x.Payload
192 | }
193 | return nil
194 | }
195 |
196 | type Payload struct {
197 | state protoimpl.MessageState
198 | sizeCache protoimpl.SizeCache
199 | unknownFields protoimpl.UnknownFields
200 |
201 | Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
202 | }
203 |
204 | func (x *Payload) Reset() {
205 | *x = Payload{}
206 | if protoimpl.UnsafeEnabled {
207 | mi := &file_cli_proto_msgTypes[3]
208 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
209 | ms.StoreMessageInfo(mi)
210 | }
211 | }
212 |
213 | func (x *Payload) String() string {
214 | return protoimpl.X.MessageStringOf(x)
215 | }
216 |
217 | func (*Payload) ProtoMessage() {}
218 |
219 | func (x *Payload) ProtoReflect() protoreflect.Message {
220 | mi := &file_cli_proto_msgTypes[3]
221 | if protoimpl.UnsafeEnabled && x != nil {
222 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
223 | if ms.LoadMessageInfo() == nil {
224 | ms.StoreMessageInfo(mi)
225 | }
226 | return ms
227 | }
228 | return mi.MessageOf(x)
229 | }
230 |
231 | // Deprecated: Use Payload.ProtoReflect.Descriptor instead.
232 | func (*Payload) Descriptor() ([]byte, []int) {
233 | return file_cli_proto_rawDescGZIP(), []int{3}
234 | }
235 |
236 | func (x *Payload) GetBody() string {
237 | if x != nil {
238 | return x.Body
239 | }
240 | return ""
241 | }
242 |
243 | type Empty struct {
244 | state protoimpl.MessageState
245 | sizeCache protoimpl.SizeCache
246 | unknownFields protoimpl.UnknownFields
247 | }
248 |
249 | func (x *Empty) Reset() {
250 | *x = Empty{}
251 | if protoimpl.UnsafeEnabled {
252 | mi := &file_cli_proto_msgTypes[4]
253 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
254 | ms.StoreMessageInfo(mi)
255 | }
256 | }
257 |
258 | func (x *Empty) String() string {
259 | return protoimpl.X.MessageStringOf(x)
260 | }
261 |
262 | func (*Empty) ProtoMessage() {}
263 |
264 | func (x *Empty) ProtoReflect() protoreflect.Message {
265 | mi := &file_cli_proto_msgTypes[4]
266 | if protoimpl.UnsafeEnabled && x != nil {
267 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
268 | if ms.LoadMessageInfo() == nil {
269 | ms.StoreMessageInfo(mi)
270 | }
271 | return ms
272 | }
273 | return mi.MessageOf(x)
274 | }
275 |
276 | // Deprecated: Use Empty.ProtoReflect.Descriptor instead.
277 | func (*Empty) Descriptor() ([]byte, []int) {
278 | return file_cli_proto_rawDescGZIP(), []int{4}
279 | }
280 |
281 | var File_cli_proto protoreflect.FileDescriptor
282 |
283 | var file_cli_proto_rawDesc = []byte{
284 | 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f,
285 | 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x06, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a,
286 | 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
287 | 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x73,
288 | 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x73, 0x61, 0x6c,
289 | 0x74, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
290 | 0x48, 0x01, 0x52, 0x02, 0x69, 0x76, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x74, 0x69, 0x6d,
291 | 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x09,
292 | 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05,
293 | 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x76, 0x42, 0x0c, 0x0a, 0x0a,
294 | 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1a, 0x0a, 0x08, 0x43, 0x6c,
295 | 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
296 | 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73,
297 | 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65,
298 | 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f,
299 | 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x52, 0x08, 0x63, 0x6c, 0x69,
300 | 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
301 | 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50,
302 | 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22,
303 | 0x1d, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f,
304 | 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x07,
305 | 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x6f, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x32, 0x43,
306 | 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x30, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
307 | 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43,
308 | 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c,
309 | 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73,
310 | 0x68, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73,
311 | 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
312 | 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x01, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68,
313 | 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x65, 0x6f, 0x6e, 0x77, 0x69, 0x6e, 0x64, 0x2f,
314 | 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74,
315 | 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
316 | }
317 |
318 | var (
319 | file_cli_proto_rawDescOnce sync.Once
320 | file_cli_proto_rawDescData = file_cli_proto_rawDesc
321 | )
322 |
323 | func file_cli_proto_rawDescGZIP() []byte {
324 | file_cli_proto_rawDescOnce.Do(func() {
325 | file_cli_proto_rawDescData = protoimpl.X.CompressGZIP(file_cli_proto_rawDescData)
326 | })
327 | return file_cli_proto_rawDescData
328 | }
329 |
330 | var file_cli_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
331 | var file_cli_proto_goTypes = []interface{}{
332 | (*Client)(nil), // 0: proto.Client
333 | (*ClientId)(nil), // 1: proto.ClientId
334 | (*PublishRequest)(nil), // 2: proto.PublishRequest
335 | (*Payload)(nil), // 3: proto.Payload
336 | (*Empty)(nil), // 4: proto.Empty
337 | }
338 | var file_cli_proto_depIdxs = []int32{
339 | 1, // 0: proto.PublishRequest.clientId:type_name -> proto.ClientId
340 | 3, // 1: proto.PublishRequest.payload:type_name -> proto.Payload
341 | 0, // 2: proto.Cli2Cloud.RegisterClient:input_type -> proto.Client
342 | 2, // 3: proto.Cli2Cloud.Publish:input_type -> proto.PublishRequest
343 | 1, // 4: proto.Cli2Cloud.RegisterClient:output_type -> proto.ClientId
344 | 4, // 5: proto.Cli2Cloud.Publish:output_type -> proto.Empty
345 | 4, // [4:6] is the sub-list for method output_type
346 | 2, // [2:4] is the sub-list for method input_type
347 | 2, // [2:2] is the sub-list for extension type_name
348 | 2, // [2:2] is the sub-list for extension extendee
349 | 0, // [0:2] is the sub-list for field type_name
350 | }
351 |
352 | func init() { file_cli_proto_init() }
353 | func file_cli_proto_init() {
354 | if File_cli_proto != nil {
355 | return
356 | }
357 | if !protoimpl.UnsafeEnabled {
358 | file_cli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
359 | switch v := v.(*Client); i {
360 | case 0:
361 | return &v.state
362 | case 1:
363 | return &v.sizeCache
364 | case 2:
365 | return &v.unknownFields
366 | default:
367 | return nil
368 | }
369 | }
370 | file_cli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
371 | switch v := v.(*ClientId); i {
372 | case 0:
373 | return &v.state
374 | case 1:
375 | return &v.sizeCache
376 | case 2:
377 | return &v.unknownFields
378 | default:
379 | return nil
380 | }
381 | }
382 | file_cli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
383 | switch v := v.(*PublishRequest); i {
384 | case 0:
385 | return &v.state
386 | case 1:
387 | return &v.sizeCache
388 | case 2:
389 | return &v.unknownFields
390 | default:
391 | return nil
392 | }
393 | }
394 | file_cli_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
395 | switch v := v.(*Payload); i {
396 | case 0:
397 | return &v.state
398 | case 1:
399 | return &v.sizeCache
400 | case 2:
401 | return &v.unknownFields
402 | default:
403 | return nil
404 | }
405 | }
406 | file_cli_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
407 | switch v := v.(*Empty); i {
408 | case 0:
409 | return &v.state
410 | case 1:
411 | return &v.sizeCache
412 | case 2:
413 | return &v.unknownFields
414 | default:
415 | return nil
416 | }
417 | }
418 | }
419 | file_cli_proto_msgTypes[0].OneofWrappers = []interface{}{}
420 | type x struct{}
421 | out := protoimpl.TypeBuilder{
422 | File: protoimpl.DescBuilder{
423 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
424 | RawDescriptor: file_cli_proto_rawDesc,
425 | NumEnums: 0,
426 | NumMessages: 5,
427 | NumExtensions: 0,
428 | NumServices: 1,
429 | },
430 | GoTypes: file_cli_proto_goTypes,
431 | DependencyIndexes: file_cli_proto_depIdxs,
432 | MessageInfos: file_cli_proto_msgTypes,
433 | }.Build()
434 | File_cli_proto = out.File
435 | file_cli_proto_rawDesc = nil
436 | file_cli_proto_goTypes = nil
437 | file_cli_proto_depIdxs = nil
438 | }
439 |
--------------------------------------------------------------------------------
/service/api/proto/service.pb.go:
--------------------------------------------------------------------------------
1 | // Code generated by protoc-gen-go. DO NOT EDIT.
2 | // versions:
3 | // protoc-gen-go v1.27.1
4 | // protoc v3.19.4
5 | // source: service.proto
6 |
7 | package proto
8 |
9 | import (
10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 | reflect "reflect"
13 | sync "sync"
14 | )
15 |
16 | const (
17 | // Verify that this generated code is sufficiently up-to-date.
18 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
19 | // Verify that runtime/protoimpl is sufficiently up-to-date.
20 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
21 | )
22 |
23 | type Client struct {
24 | state protoimpl.MessageState
25 | sizeCache protoimpl.SizeCache
26 | unknownFields protoimpl.UnknownFields
27 |
28 | Encrypted bool `protobuf:"varint,1,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
29 | Salt *string `protobuf:"bytes,2,opt,name=salt,proto3,oneof" json:"salt,omitempty"`
30 | Iv *string `protobuf:"bytes,3,opt,name=iv,proto3,oneof" json:"iv,omitempty"`
31 | Timestamp *int64 `protobuf:"varint,4,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"`
32 | }
33 |
34 | func (x *Client) Reset() {
35 | *x = Client{}
36 | if protoimpl.UnsafeEnabled {
37 | mi := &file_service_proto_msgTypes[0]
38 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
39 | ms.StoreMessageInfo(mi)
40 | }
41 | }
42 |
43 | func (x *Client) String() string {
44 | return protoimpl.X.MessageStringOf(x)
45 | }
46 |
47 | func (*Client) ProtoMessage() {}
48 |
49 | func (x *Client) ProtoReflect() protoreflect.Message {
50 | mi := &file_service_proto_msgTypes[0]
51 | if protoimpl.UnsafeEnabled && x != nil {
52 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
53 | if ms.LoadMessageInfo() == nil {
54 | ms.StoreMessageInfo(mi)
55 | }
56 | return ms
57 | }
58 | return mi.MessageOf(x)
59 | }
60 |
61 | // Deprecated: Use Client.ProtoReflect.Descriptor instead.
62 | func (*Client) Descriptor() ([]byte, []int) {
63 | return file_service_proto_rawDescGZIP(), []int{0}
64 | }
65 |
66 | func (x *Client) GetEncrypted() bool {
67 | if x != nil {
68 | return x.Encrypted
69 | }
70 | return false
71 | }
72 |
73 | func (x *Client) GetSalt() string {
74 | if x != nil && x.Salt != nil {
75 | return *x.Salt
76 | }
77 | return ""
78 | }
79 |
80 | func (x *Client) GetIv() string {
81 | if x != nil && x.Iv != nil {
82 | return *x.Iv
83 | }
84 | return ""
85 | }
86 |
87 | func (x *Client) GetTimestamp() int64 {
88 | if x != nil && x.Timestamp != nil {
89 | return *x.Timestamp
90 | }
91 | return 0
92 | }
93 |
94 | type ClientId struct {
95 | state protoimpl.MessageState
96 | sizeCache protoimpl.SizeCache
97 | unknownFields protoimpl.UnknownFields
98 |
99 | Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
100 | }
101 |
102 | func (x *ClientId) Reset() {
103 | *x = ClientId{}
104 | if protoimpl.UnsafeEnabled {
105 | mi := &file_service_proto_msgTypes[1]
106 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
107 | ms.StoreMessageInfo(mi)
108 | }
109 | }
110 |
111 | func (x *ClientId) String() string {
112 | return protoimpl.X.MessageStringOf(x)
113 | }
114 |
115 | func (*ClientId) ProtoMessage() {}
116 |
117 | func (x *ClientId) ProtoReflect() protoreflect.Message {
118 | mi := &file_service_proto_msgTypes[1]
119 | if protoimpl.UnsafeEnabled && x != nil {
120 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
121 | if ms.LoadMessageInfo() == nil {
122 | ms.StoreMessageInfo(mi)
123 | }
124 | return ms
125 | }
126 | return mi.MessageOf(x)
127 | }
128 |
129 | // Deprecated: Use ClientId.ProtoReflect.Descriptor instead.
130 | func (*ClientId) Descriptor() ([]byte, []int) {
131 | return file_service_proto_rawDescGZIP(), []int{1}
132 | }
133 |
134 | func (x *ClientId) GetId() string {
135 | if x != nil {
136 | return x.Id
137 | }
138 | return ""
139 | }
140 |
141 | type PublishRequest struct {
142 | state protoimpl.MessageState
143 | sizeCache protoimpl.SizeCache
144 | unknownFields protoimpl.UnknownFields
145 |
146 | ClientId *ClientId `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
147 | Payload *Payload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
148 | }
149 |
150 | func (x *PublishRequest) Reset() {
151 | *x = PublishRequest{}
152 | if protoimpl.UnsafeEnabled {
153 | mi := &file_service_proto_msgTypes[2]
154 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
155 | ms.StoreMessageInfo(mi)
156 | }
157 | }
158 |
159 | func (x *PublishRequest) String() string {
160 | return protoimpl.X.MessageStringOf(x)
161 | }
162 |
163 | func (*PublishRequest) ProtoMessage() {}
164 |
165 | func (x *PublishRequest) ProtoReflect() protoreflect.Message {
166 | mi := &file_service_proto_msgTypes[2]
167 | if protoimpl.UnsafeEnabled && x != nil {
168 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
169 | if ms.LoadMessageInfo() == nil {
170 | ms.StoreMessageInfo(mi)
171 | }
172 | return ms
173 | }
174 | return mi.MessageOf(x)
175 | }
176 |
177 | // Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
178 | func (*PublishRequest) Descriptor() ([]byte, []int) {
179 | return file_service_proto_rawDescGZIP(), []int{2}
180 | }
181 |
182 | func (x *PublishRequest) GetClientId() *ClientId {
183 | if x != nil {
184 | return x.ClientId
185 | }
186 | return nil
187 | }
188 |
189 | func (x *PublishRequest) GetPayload() *Payload {
190 | if x != nil {
191 | return x.Payload
192 | }
193 | return nil
194 | }
195 |
196 | type Payload struct {
197 | state protoimpl.MessageState
198 | sizeCache protoimpl.SizeCache
199 | unknownFields protoimpl.UnknownFields
200 |
201 | Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
202 | }
203 |
204 | func (x *Payload) Reset() {
205 | *x = Payload{}
206 | if protoimpl.UnsafeEnabled {
207 | mi := &file_service_proto_msgTypes[3]
208 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
209 | ms.StoreMessageInfo(mi)
210 | }
211 | }
212 |
213 | func (x *Payload) String() string {
214 | return protoimpl.X.MessageStringOf(x)
215 | }
216 |
217 | func (*Payload) ProtoMessage() {}
218 |
219 | func (x *Payload) ProtoReflect() protoreflect.Message {
220 | mi := &file_service_proto_msgTypes[3]
221 | if protoimpl.UnsafeEnabled && x != nil {
222 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
223 | if ms.LoadMessageInfo() == nil {
224 | ms.StoreMessageInfo(mi)
225 | }
226 | return ms
227 | }
228 | return mi.MessageOf(x)
229 | }
230 |
231 | // Deprecated: Use Payload.ProtoReflect.Descriptor instead.
232 | func (*Payload) Descriptor() ([]byte, []int) {
233 | return file_service_proto_rawDescGZIP(), []int{3}
234 | }
235 |
236 | func (x *Payload) GetBody() string {
237 | if x != nil {
238 | return x.Body
239 | }
240 | return ""
241 | }
242 |
243 | type Empty struct {
244 | state protoimpl.MessageState
245 | sizeCache protoimpl.SizeCache
246 | unknownFields protoimpl.UnknownFields
247 | }
248 |
249 | func (x *Empty) Reset() {
250 | *x = Empty{}
251 | if protoimpl.UnsafeEnabled {
252 | mi := &file_service_proto_msgTypes[4]
253 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
254 | ms.StoreMessageInfo(mi)
255 | }
256 | }
257 |
258 | func (x *Empty) String() string {
259 | return protoimpl.X.MessageStringOf(x)
260 | }
261 |
262 | func (*Empty) ProtoMessage() {}
263 |
264 | func (x *Empty) ProtoReflect() protoreflect.Message {
265 | mi := &file_service_proto_msgTypes[4]
266 | if protoimpl.UnsafeEnabled && x != nil {
267 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
268 | if ms.LoadMessageInfo() == nil {
269 | ms.StoreMessageInfo(mi)
270 | }
271 | return ms
272 | }
273 | return mi.MessageOf(x)
274 | }
275 |
276 | // Deprecated: Use Empty.ProtoReflect.Descriptor instead.
277 | func (*Empty) Descriptor() ([]byte, []int) {
278 | return file_service_proto_rawDescGZIP(), []int{4}
279 | }
280 |
281 | var File_service_proto protoreflect.FileDescriptor
282 |
283 | var file_service_proto_rawDesc = []byte{
284 | 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
285 | 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x06, 0x43, 0x6c, 0x69, 0x65, 0x6e,
286 | 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x01,
287 | 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x12,
288 | 0x17, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
289 | 0x04, 0x73, 0x61, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x76, 0x18, 0x03,
290 | 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x02, 0x69, 0x76, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a,
291 | 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
292 | 0x48, 0x02, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01,
293 | 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x76,
294 | 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1a,
295 | 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
296 | 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x0e, 0x50, 0x75,
297 | 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x08,
298 | 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
299 | 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x52,
300 | 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x61, 0x79,
301 | 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f,
302 | 0x74, 0x6f, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c,
303 | 0x6f, 0x61, 0x64, 0x22, 0x1d, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12,
304 | 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f,
305 | 0x64, 0x79, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0xd0, 0x01, 0x0a, 0x09,
306 | 0x43, 0x6c, 0x69, 0x32, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x30, 0x0a, 0x0e, 0x52, 0x65, 0x67,
307 | 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0d, 0x2e, 0x70, 0x72,
308 | 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x0f, 0x2e, 0x70, 0x72, 0x6f,
309 | 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d, 0x47,
310 | 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x0f, 0x2e, 0x70,
311 | 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x1a, 0x0d, 0x2e,
312 | 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x07,
313 | 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
314 | 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c,
315 | 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x01, 0x12, 0x2e,
316 | 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0f, 0x2e, 0x70, 0x72,
317 | 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x1a, 0x0e, 0x2e, 0x70,
318 | 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x30, 0x01, 0x42, 0x27,
319 | 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x65, 0x6f,
320 | 0x6e, 0x77, 0x69, 0x6e, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70,
321 | 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
322 | }
323 |
324 | var (
325 | file_service_proto_rawDescOnce sync.Once
326 | file_service_proto_rawDescData = file_service_proto_rawDesc
327 | )
328 |
329 | func file_service_proto_rawDescGZIP() []byte {
330 | file_service_proto_rawDescOnce.Do(func() {
331 | file_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_proto_rawDescData)
332 | })
333 | return file_service_proto_rawDescData
334 | }
335 |
336 | var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
337 | var file_service_proto_goTypes = []interface{}{
338 | (*Client)(nil), // 0: proto.Client
339 | (*ClientId)(nil), // 1: proto.ClientId
340 | (*PublishRequest)(nil), // 2: proto.PublishRequest
341 | (*Payload)(nil), // 3: proto.Payload
342 | (*Empty)(nil), // 4: proto.Empty
343 | }
344 | var file_service_proto_depIdxs = []int32{
345 | 1, // 0: proto.PublishRequest.clientId:type_name -> proto.ClientId
346 | 3, // 1: proto.PublishRequest.payload:type_name -> proto.Payload
347 | 0, // 2: proto.Cli2Cloud.RegisterClient:input_type -> proto.Client
348 | 1, // 3: proto.Cli2Cloud.GetClientById:input_type -> proto.ClientId
349 | 2, // 4: proto.Cli2Cloud.Publish:input_type -> proto.PublishRequest
350 | 1, // 5: proto.Cli2Cloud.Subscribe:input_type -> proto.ClientId
351 | 1, // 6: proto.Cli2Cloud.RegisterClient:output_type -> proto.ClientId
352 | 0, // 7: proto.Cli2Cloud.GetClientById:output_type -> proto.Client
353 | 4, // 8: proto.Cli2Cloud.Publish:output_type -> proto.Empty
354 | 3, // 9: proto.Cli2Cloud.Subscribe:output_type -> proto.Payload
355 | 6, // [6:10] is the sub-list for method output_type
356 | 2, // [2:6] is the sub-list for method input_type
357 | 2, // [2:2] is the sub-list for extension type_name
358 | 2, // [2:2] is the sub-list for extension extendee
359 | 0, // [0:2] is the sub-list for field type_name
360 | }
361 |
362 | func init() { file_service_proto_init() }
363 | func file_service_proto_init() {
364 | if File_service_proto != nil {
365 | return
366 | }
367 | if !protoimpl.UnsafeEnabled {
368 | file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
369 | switch v := v.(*Client); i {
370 | case 0:
371 | return &v.state
372 | case 1:
373 | return &v.sizeCache
374 | case 2:
375 | return &v.unknownFields
376 | default:
377 | return nil
378 | }
379 | }
380 | file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
381 | switch v := v.(*ClientId); i {
382 | case 0:
383 | return &v.state
384 | case 1:
385 | return &v.sizeCache
386 | case 2:
387 | return &v.unknownFields
388 | default:
389 | return nil
390 | }
391 | }
392 | file_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
393 | switch v := v.(*PublishRequest); i {
394 | case 0:
395 | return &v.state
396 | case 1:
397 | return &v.sizeCache
398 | case 2:
399 | return &v.unknownFields
400 | default:
401 | return nil
402 | }
403 | }
404 | file_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
405 | switch v := v.(*Payload); i {
406 | case 0:
407 | return &v.state
408 | case 1:
409 | return &v.sizeCache
410 | case 2:
411 | return &v.unknownFields
412 | default:
413 | return nil
414 | }
415 | }
416 | file_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
417 | switch v := v.(*Empty); i {
418 | case 0:
419 | return &v.state
420 | case 1:
421 | return &v.sizeCache
422 | case 2:
423 | return &v.unknownFields
424 | default:
425 | return nil
426 | }
427 | }
428 | }
429 | file_service_proto_msgTypes[0].OneofWrappers = []interface{}{}
430 | type x struct{}
431 | out := protoimpl.TypeBuilder{
432 | File: protoimpl.DescBuilder{
433 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
434 | RawDescriptor: file_service_proto_rawDesc,
435 | NumEnums: 0,
436 | NumMessages: 5,
437 | NumExtensions: 0,
438 | NumServices: 1,
439 | },
440 | GoTypes: file_service_proto_goTypes,
441 | DependencyIndexes: file_service_proto_depIdxs,
442 | MessageInfos: file_service_proto_msgTypes,
443 | }.Build()
444 | File_service_proto = out.File
445 | file_service_proto_rawDesc = nil
446 | file_service_proto_goTypes = nil
447 | file_service_proto_depIdxs = nil
448 | }
449 |
--------------------------------------------------------------------------------
/service/go.sum:
--------------------------------------------------------------------------------
1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
3 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
4 | github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
5 | github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
6 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
7 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
8 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
9 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
10 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
11 | github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
12 | github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
13 | github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
14 | github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
15 | github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
16 | github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
17 | github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
18 | github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
19 | github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
20 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
21 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
22 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
23 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
24 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
25 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
26 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
27 | github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
28 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
29 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
30 | github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
31 | github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
32 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
33 | github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
34 | github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
35 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
36 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
37 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
38 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
39 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
40 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
41 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
42 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
43 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
44 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
45 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
46 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
47 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
48 | github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
49 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
50 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
51 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
52 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
53 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
54 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
55 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
56 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
57 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
58 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
59 | github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
60 | github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
61 | github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
62 | github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
63 | github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
64 | github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
65 | github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=
66 | github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
67 | github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
68 | github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
69 | github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
70 | github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
71 | github.com/jackc/pgconn v1.11.0 h1:HiHArx4yFbwl91X3qqIHtUFoiIfLNJXCQRsnzkiwwaQ=
72 | github.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
73 | github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
74 | github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
75 | github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
76 | github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=
77 | github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=
78 | github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
79 | github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
80 | github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
81 | github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=
82 | github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
83 | github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
84 | github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
85 | github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
86 | github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
87 | github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
88 | github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
89 | github.com/jackc/pgproto3/v2 v2.2.0 h1:r7JypeP2D3onoQTCxWdTpCtJ4D+qpKr0TxvoyMhZ5ns=
90 | github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
91 | github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
92 | github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
93 | github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
94 | github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
95 | github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
96 | github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
97 | github.com/jackc/pgtype v1.10.0 h1:ILnBWrRMSXGczYvmkYD6PsYyVFUNLTnIUJHHDLmqk38=
98 | github.com/jackc/pgtype v1.10.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
99 | github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
100 | github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
101 | github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
102 | github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
103 | github.com/jackc/pgx/v4 v4.15.0 h1:B7dTkXsdILD3MF987WGGCcg+tvLW6bZJdEcqVFeU//w=
104 | github.com/jackc/pgx/v4 v4.15.0/go.mod h1:D/zyOyXiaM1TmVWnOM18p0xdDtdakRBa0RsVGI3U3bw=
105 | github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
106 | github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
107 | github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
108 | github.com/jackc/puddle v1.2.1 h1:gI8os0wpRXFd4FiAY2dWiqRK037tjj3t7rKFeO4X5iw=
109 | github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
110 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
111 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
112 | github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
113 | github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
114 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
115 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
116 | github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
117 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
118 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
119 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
120 | github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
121 | github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
122 | github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
123 | github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
124 | github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
125 | github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
126 | github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
127 | github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
128 | github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
129 | github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
130 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
131 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
132 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
133 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
134 | github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
135 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
136 | github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
137 | github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
138 | github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
139 | github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
140 | github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
141 | github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
142 | github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
143 | github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
144 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
145 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
146 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
147 | github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
148 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
149 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
150 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
151 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
152 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
153 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
154 | github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
155 | go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
156 | go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
157 | go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
158 | go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
159 | go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
160 | go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
161 | go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
162 | go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
163 | go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
164 | go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
165 | go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
166 | go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
167 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
168 | golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
169 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
170 | golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
171 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
172 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
173 | golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
174 | golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
175 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=
176 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
177 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
178 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
179 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
180 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
181 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
182 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
183 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
184 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
185 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
186 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
187 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
188 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
189 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
190 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
191 | golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
192 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
193 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
194 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
195 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
196 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
197 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
198 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
199 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
200 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
201 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
202 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
203 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
204 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
205 | golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
206 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
207 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
208 | golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
209 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
210 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
211 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
212 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
213 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
214 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
215 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
216 | golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
217 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
218 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
219 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
220 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
221 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
222 | golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
223 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
224 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
225 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
226 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
227 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
228 | golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
229 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
230 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
231 | golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
232 | golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
233 | golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
234 | golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
235 | golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
236 | golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
237 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
238 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
239 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
240 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
241 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
242 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
243 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
244 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
245 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
246 | google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
247 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
248 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
249 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
250 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
251 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
252 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
253 | google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
254 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
255 | google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg=
256 | google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
257 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
258 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
259 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
260 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
261 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
262 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
263 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
264 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
265 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
266 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
267 | google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
268 | google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
269 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
270 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
271 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
272 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
273 | gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
274 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
275 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
276 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
277 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
278 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
279 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
280 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
281 |
--------------------------------------------------------------------------------
/webapp/src/proto/service_pb.js:
--------------------------------------------------------------------------------
1 | // source: service.proto
2 | /**
3 | * @fileoverview
4 | * @enhanceable
5 | * @suppress {missingRequire} reports error on implicit type usages.
6 | * @suppress {messageConventions} JS Compiler reports an error if a variable or
7 | * field starts with 'MSG_' and isn't a translatable message.
8 | * @public
9 | */
10 | // GENERATED CODE -- DO NOT EDIT!
11 | /* eslint-disable */
12 | // @ts-nocheck
13 |
14 | var jspb = require('google-protobuf');
15 | var goog = jspb;
16 | var global = (function() {
17 | if (this) { return this; }
18 | if (typeof window !== 'undefined') { return window; }
19 | if (typeof global !== 'undefined') { return global; }
20 | if (typeof self !== 'undefined') { return self; }
21 | return Function('return this')();
22 | }.call(null));
23 |
24 | goog.exportSymbol('proto.proto.Client', null, global);
25 | goog.exportSymbol('proto.proto.ClientId', null, global);
26 | goog.exportSymbol('proto.proto.Empty', null, global);
27 | goog.exportSymbol('proto.proto.Payload', null, global);
28 | goog.exportSymbol('proto.proto.PublishRequest', null, global);
29 | /**
30 | * Generated by JsPbCodeGenerator.
31 | * @param {Array=} opt_data Optional initial data array, typically from a
32 | * server response, or constructed directly in Javascript. The array is used
33 | * in place and becomes part of the constructed object. It is not cloned.
34 | * If no data is provided, the constructed object will be empty, but still
35 | * valid.
36 | * @extends {jspb.Message}
37 | * @constructor
38 | */
39 | proto.proto.Client = function(opt_data) {
40 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
41 | };
42 | goog.inherits(proto.proto.Client, jspb.Message);
43 | if (goog.DEBUG && !COMPILED) {
44 | /**
45 | * @public
46 | * @override
47 | */
48 | proto.proto.Client.displayName = 'proto.proto.Client';
49 | }
50 | /**
51 | * Generated by JsPbCodeGenerator.
52 | * @param {Array=} opt_data Optional initial data array, typically from a
53 | * server response, or constructed directly in Javascript. The array is used
54 | * in place and becomes part of the constructed object. It is not cloned.
55 | * If no data is provided, the constructed object will be empty, but still
56 | * valid.
57 | * @extends {jspb.Message}
58 | * @constructor
59 | */
60 | proto.proto.ClientId = function(opt_data) {
61 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
62 | };
63 | goog.inherits(proto.proto.ClientId, jspb.Message);
64 | if (goog.DEBUG && !COMPILED) {
65 | /**
66 | * @public
67 | * @override
68 | */
69 | proto.proto.ClientId.displayName = 'proto.proto.ClientId';
70 | }
71 | /**
72 | * Generated by JsPbCodeGenerator.
73 | * @param {Array=} opt_data Optional initial data array, typically from a
74 | * server response, or constructed directly in Javascript. The array is used
75 | * in place and becomes part of the constructed object. It is not cloned.
76 | * If no data is provided, the constructed object will be empty, but still
77 | * valid.
78 | * @extends {jspb.Message}
79 | * @constructor
80 | */
81 | proto.proto.PublishRequest = function(opt_data) {
82 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
83 | };
84 | goog.inherits(proto.proto.PublishRequest, jspb.Message);
85 | if (goog.DEBUG && !COMPILED) {
86 | /**
87 | * @public
88 | * @override
89 | */
90 | proto.proto.PublishRequest.displayName = 'proto.proto.PublishRequest';
91 | }
92 | /**
93 | * Generated by JsPbCodeGenerator.
94 | * @param {Array=} opt_data Optional initial data array, typically from a
95 | * server response, or constructed directly in Javascript. The array is used
96 | * in place and becomes part of the constructed object. It is not cloned.
97 | * If no data is provided, the constructed object will be empty, but still
98 | * valid.
99 | * @extends {jspb.Message}
100 | * @constructor
101 | */
102 | proto.proto.Payload = function(opt_data) {
103 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
104 | };
105 | goog.inherits(proto.proto.Payload, jspb.Message);
106 | if (goog.DEBUG && !COMPILED) {
107 | /**
108 | * @public
109 | * @override
110 | */
111 | proto.proto.Payload.displayName = 'proto.proto.Payload';
112 | }
113 | /**
114 | * Generated by JsPbCodeGenerator.
115 | * @param {Array=} opt_data Optional initial data array, typically from a
116 | * server response, or constructed directly in Javascript. The array is used
117 | * in place and becomes part of the constructed object. It is not cloned.
118 | * If no data is provided, the constructed object will be empty, but still
119 | * valid.
120 | * @extends {jspb.Message}
121 | * @constructor
122 | */
123 | proto.proto.Empty = function(opt_data) {
124 | jspb.Message.initialize(this, opt_data, 0, -1, null, null);
125 | };
126 | goog.inherits(proto.proto.Empty, jspb.Message);
127 | if (goog.DEBUG && !COMPILED) {
128 | /**
129 | * @public
130 | * @override
131 | */
132 | proto.proto.Empty.displayName = 'proto.proto.Empty';
133 | }
134 |
135 |
136 |
137 | if (jspb.Message.GENERATE_TO_OBJECT) {
138 | /**
139 | * Creates an object representation of this proto.
140 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
141 | * Optional fields that are not set will be set to undefined.
142 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
143 | * For the list of reserved names please see:
144 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
145 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
146 | * JSPB instance for transitional soy proto support:
147 | * http://goto/soy-param-migration
148 | * @return {!Object}
149 | */
150 | proto.proto.Client.prototype.toObject = function(opt_includeInstance) {
151 | return proto.proto.Client.toObject(opt_includeInstance, this);
152 | };
153 |
154 |
155 | /**
156 | * Static version of the {@see toObject} method.
157 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
158 | * the JSPB instance for transitional soy proto support:
159 | * http://goto/soy-param-migration
160 | * @param {!proto.proto.Client} msg The msg instance to transform.
161 | * @return {!Object}
162 | * @suppress {unusedLocalVariables} f is only used for nested messages
163 | */
164 | proto.proto.Client.toObject = function(includeInstance, msg) {
165 | var f, obj = {
166 | encrypted: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
167 | salt: jspb.Message.getFieldWithDefault(msg, 2, ""),
168 | iv: jspb.Message.getFieldWithDefault(msg, 3, ""),
169 | timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0)
170 | };
171 |
172 | if (includeInstance) {
173 | obj.$jspbMessageInstance = msg;
174 | }
175 | return obj;
176 | };
177 | }
178 |
179 |
180 | /**
181 | * Deserializes binary data (in protobuf wire format).
182 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
183 | * @return {!proto.proto.Client}
184 | */
185 | proto.proto.Client.deserializeBinary = function(bytes) {
186 | var reader = new jspb.BinaryReader(bytes);
187 | var msg = new proto.proto.Client;
188 | return proto.proto.Client.deserializeBinaryFromReader(msg, reader);
189 | };
190 |
191 |
192 | /**
193 | * Deserializes binary data (in protobuf wire format) from the
194 | * given reader into the given message object.
195 | * @param {!proto.proto.Client} msg The message object to deserialize into.
196 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
197 | * @return {!proto.proto.Client}
198 | */
199 | proto.proto.Client.deserializeBinaryFromReader = function(msg, reader) {
200 | while (reader.nextField()) {
201 | if (reader.isEndGroup()) {
202 | break;
203 | }
204 | var field = reader.getFieldNumber();
205 | switch (field) {
206 | case 1:
207 | var value = /** @type {boolean} */ (reader.readBool());
208 | msg.setEncrypted(value);
209 | break;
210 | case 2:
211 | var value = /** @type {string} */ (reader.readString());
212 | msg.setSalt(value);
213 | break;
214 | case 3:
215 | var value = /** @type {string} */ (reader.readString());
216 | msg.setIv(value);
217 | break;
218 | case 4:
219 | var value = /** @type {number} */ (reader.readInt64());
220 | msg.setTimestamp(value);
221 | break;
222 | default:
223 | reader.skipField();
224 | break;
225 | }
226 | }
227 | return msg;
228 | };
229 |
230 |
231 | /**
232 | * Serializes the message to binary data (in protobuf wire format).
233 | * @return {!Uint8Array}
234 | */
235 | proto.proto.Client.prototype.serializeBinary = function() {
236 | var writer = new jspb.BinaryWriter();
237 | proto.proto.Client.serializeBinaryToWriter(this, writer);
238 | return writer.getResultBuffer();
239 | };
240 |
241 |
242 | /**
243 | * Serializes the given message to binary data (in protobuf wire
244 | * format), writing to the given BinaryWriter.
245 | * @param {!proto.proto.Client} message
246 | * @param {!jspb.BinaryWriter} writer
247 | * @suppress {unusedLocalVariables} f is only used for nested messages
248 | */
249 | proto.proto.Client.serializeBinaryToWriter = function(message, writer) {
250 | var f = undefined;
251 | f = message.getEncrypted();
252 | if (f) {
253 | writer.writeBool(
254 | 1,
255 | f
256 | );
257 | }
258 | f = /** @type {string} */ (jspb.Message.getField(message, 2));
259 | if (f != null) {
260 | writer.writeString(
261 | 2,
262 | f
263 | );
264 | }
265 | f = /** @type {string} */ (jspb.Message.getField(message, 3));
266 | if (f != null) {
267 | writer.writeString(
268 | 3,
269 | f
270 | );
271 | }
272 | f = /** @type {number} */ (jspb.Message.getField(message, 4));
273 | if (f != null) {
274 | writer.writeInt64(
275 | 4,
276 | f
277 | );
278 | }
279 | };
280 |
281 |
282 | /**
283 | * optional bool encrypted = 1;
284 | * @return {boolean}
285 | */
286 | proto.proto.Client.prototype.getEncrypted = function() {
287 | return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
288 | };
289 |
290 |
291 | /**
292 | * @param {boolean} value
293 | * @return {!proto.proto.Client} returns this
294 | */
295 | proto.proto.Client.prototype.setEncrypted = function(value) {
296 | return jspb.Message.setProto3BooleanField(this, 1, value);
297 | };
298 |
299 |
300 | /**
301 | * optional string salt = 2;
302 | * @return {string}
303 | */
304 | proto.proto.Client.prototype.getSalt = function() {
305 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
306 | };
307 |
308 |
309 | /**
310 | * @param {string} value
311 | * @return {!proto.proto.Client} returns this
312 | */
313 | proto.proto.Client.prototype.setSalt = function(value) {
314 | return jspb.Message.setField(this, 2, value);
315 | };
316 |
317 |
318 | /**
319 | * Clears the field making it undefined.
320 | * @return {!proto.proto.Client} returns this
321 | */
322 | proto.proto.Client.prototype.clearSalt = function() {
323 | return jspb.Message.setField(this, 2, undefined);
324 | };
325 |
326 |
327 | /**
328 | * Returns whether this field is set.
329 | * @return {boolean}
330 | */
331 | proto.proto.Client.prototype.hasSalt = function() {
332 | return jspb.Message.getField(this, 2) != null;
333 | };
334 |
335 |
336 | /**
337 | * optional string iv = 3;
338 | * @return {string}
339 | */
340 | proto.proto.Client.prototype.getIv = function() {
341 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
342 | };
343 |
344 |
345 | /**
346 | * @param {string} value
347 | * @return {!proto.proto.Client} returns this
348 | */
349 | proto.proto.Client.prototype.setIv = function(value) {
350 | return jspb.Message.setField(this, 3, value);
351 | };
352 |
353 |
354 | /**
355 | * Clears the field making it undefined.
356 | * @return {!proto.proto.Client} returns this
357 | */
358 | proto.proto.Client.prototype.clearIv = function() {
359 | return jspb.Message.setField(this, 3, undefined);
360 | };
361 |
362 |
363 | /**
364 | * Returns whether this field is set.
365 | * @return {boolean}
366 | */
367 | proto.proto.Client.prototype.hasIv = function() {
368 | return jspb.Message.getField(this, 3) != null;
369 | };
370 |
371 |
372 | /**
373 | * optional int64 timestamp = 4;
374 | * @return {number}
375 | */
376 | proto.proto.Client.prototype.getTimestamp = function() {
377 | return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
378 | };
379 |
380 |
381 | /**
382 | * @param {number} value
383 | * @return {!proto.proto.Client} returns this
384 | */
385 | proto.proto.Client.prototype.setTimestamp = function(value) {
386 | return jspb.Message.setField(this, 4, value);
387 | };
388 |
389 |
390 | /**
391 | * Clears the field making it undefined.
392 | * @return {!proto.proto.Client} returns this
393 | */
394 | proto.proto.Client.prototype.clearTimestamp = function() {
395 | return jspb.Message.setField(this, 4, undefined);
396 | };
397 |
398 |
399 | /**
400 | * Returns whether this field is set.
401 | * @return {boolean}
402 | */
403 | proto.proto.Client.prototype.hasTimestamp = function() {
404 | return jspb.Message.getField(this, 4) != null;
405 | };
406 |
407 |
408 |
409 |
410 |
411 | if (jspb.Message.GENERATE_TO_OBJECT) {
412 | /**
413 | * Creates an object representation of this proto.
414 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
415 | * Optional fields that are not set will be set to undefined.
416 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
417 | * For the list of reserved names please see:
418 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
419 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
420 | * JSPB instance for transitional soy proto support:
421 | * http://goto/soy-param-migration
422 | * @return {!Object}
423 | */
424 | proto.proto.ClientId.prototype.toObject = function(opt_includeInstance) {
425 | return proto.proto.ClientId.toObject(opt_includeInstance, this);
426 | };
427 |
428 |
429 | /**
430 | * Static version of the {@see toObject} method.
431 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
432 | * the JSPB instance for transitional soy proto support:
433 | * http://goto/soy-param-migration
434 | * @param {!proto.proto.ClientId} msg The msg instance to transform.
435 | * @return {!Object}
436 | * @suppress {unusedLocalVariables} f is only used for nested messages
437 | */
438 | proto.proto.ClientId.toObject = function(includeInstance, msg) {
439 | var f, obj = {
440 | id: jspb.Message.getFieldWithDefault(msg, 1, "")
441 | };
442 |
443 | if (includeInstance) {
444 | obj.$jspbMessageInstance = msg;
445 | }
446 | return obj;
447 | };
448 | }
449 |
450 |
451 | /**
452 | * Deserializes binary data (in protobuf wire format).
453 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
454 | * @return {!proto.proto.ClientId}
455 | */
456 | proto.proto.ClientId.deserializeBinary = function(bytes) {
457 | var reader = new jspb.BinaryReader(bytes);
458 | var msg = new proto.proto.ClientId;
459 | return proto.proto.ClientId.deserializeBinaryFromReader(msg, reader);
460 | };
461 |
462 |
463 | /**
464 | * Deserializes binary data (in protobuf wire format) from the
465 | * given reader into the given message object.
466 | * @param {!proto.proto.ClientId} msg The message object to deserialize into.
467 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
468 | * @return {!proto.proto.ClientId}
469 | */
470 | proto.proto.ClientId.deserializeBinaryFromReader = function(msg, reader) {
471 | while (reader.nextField()) {
472 | if (reader.isEndGroup()) {
473 | break;
474 | }
475 | var field = reader.getFieldNumber();
476 | switch (field) {
477 | case 1:
478 | var value = /** @type {string} */ (reader.readString());
479 | msg.setId(value);
480 | break;
481 | default:
482 | reader.skipField();
483 | break;
484 | }
485 | }
486 | return msg;
487 | };
488 |
489 |
490 | /**
491 | * Serializes the message to binary data (in protobuf wire format).
492 | * @return {!Uint8Array}
493 | */
494 | proto.proto.ClientId.prototype.serializeBinary = function() {
495 | var writer = new jspb.BinaryWriter();
496 | proto.proto.ClientId.serializeBinaryToWriter(this, writer);
497 | return writer.getResultBuffer();
498 | };
499 |
500 |
501 | /**
502 | * Serializes the given message to binary data (in protobuf wire
503 | * format), writing to the given BinaryWriter.
504 | * @param {!proto.proto.ClientId} message
505 | * @param {!jspb.BinaryWriter} writer
506 | * @suppress {unusedLocalVariables} f is only used for nested messages
507 | */
508 | proto.proto.ClientId.serializeBinaryToWriter = function(message, writer) {
509 | var f = undefined;
510 | f = message.getId();
511 | if (f.length > 0) {
512 | writer.writeString(
513 | 1,
514 | f
515 | );
516 | }
517 | };
518 |
519 |
520 | /**
521 | * optional string Id = 1;
522 | * @return {string}
523 | */
524 | proto.proto.ClientId.prototype.getId = function() {
525 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
526 | };
527 |
528 |
529 | /**
530 | * @param {string} value
531 | * @return {!proto.proto.ClientId} returns this
532 | */
533 | proto.proto.ClientId.prototype.setId = function(value) {
534 | return jspb.Message.setProto3StringField(this, 1, value);
535 | };
536 |
537 |
538 |
539 |
540 |
541 | if (jspb.Message.GENERATE_TO_OBJECT) {
542 | /**
543 | * Creates an object representation of this proto.
544 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
545 | * Optional fields that are not set will be set to undefined.
546 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
547 | * For the list of reserved names please see:
548 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
549 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
550 | * JSPB instance for transitional soy proto support:
551 | * http://goto/soy-param-migration
552 | * @return {!Object}
553 | */
554 | proto.proto.PublishRequest.prototype.toObject = function(opt_includeInstance) {
555 | return proto.proto.PublishRequest.toObject(opt_includeInstance, this);
556 | };
557 |
558 |
559 | /**
560 | * Static version of the {@see toObject} method.
561 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
562 | * the JSPB instance for transitional soy proto support:
563 | * http://goto/soy-param-migration
564 | * @param {!proto.proto.PublishRequest} msg The msg instance to transform.
565 | * @return {!Object}
566 | * @suppress {unusedLocalVariables} f is only used for nested messages
567 | */
568 | proto.proto.PublishRequest.toObject = function(includeInstance, msg) {
569 | var f, obj = {
570 | clientid: (f = msg.getClientid()) && proto.proto.ClientId.toObject(includeInstance, f),
571 | payload: (f = msg.getPayload()) && proto.proto.Payload.toObject(includeInstance, f)
572 | };
573 |
574 | if (includeInstance) {
575 | obj.$jspbMessageInstance = msg;
576 | }
577 | return obj;
578 | };
579 | }
580 |
581 |
582 | /**
583 | * Deserializes binary data (in protobuf wire format).
584 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
585 | * @return {!proto.proto.PublishRequest}
586 | */
587 | proto.proto.PublishRequest.deserializeBinary = function(bytes) {
588 | var reader = new jspb.BinaryReader(bytes);
589 | var msg = new proto.proto.PublishRequest;
590 | return proto.proto.PublishRequest.deserializeBinaryFromReader(msg, reader);
591 | };
592 |
593 |
594 | /**
595 | * Deserializes binary data (in protobuf wire format) from the
596 | * given reader into the given message object.
597 | * @param {!proto.proto.PublishRequest} msg The message object to deserialize into.
598 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
599 | * @return {!proto.proto.PublishRequest}
600 | */
601 | proto.proto.PublishRequest.deserializeBinaryFromReader = function(msg, reader) {
602 | while (reader.nextField()) {
603 | if (reader.isEndGroup()) {
604 | break;
605 | }
606 | var field = reader.getFieldNumber();
607 | switch (field) {
608 | case 1:
609 | var value = new proto.proto.ClientId;
610 | reader.readMessage(value,proto.proto.ClientId.deserializeBinaryFromReader);
611 | msg.setClientid(value);
612 | break;
613 | case 2:
614 | var value = new proto.proto.Payload;
615 | reader.readMessage(value,proto.proto.Payload.deserializeBinaryFromReader);
616 | msg.setPayload(value);
617 | break;
618 | default:
619 | reader.skipField();
620 | break;
621 | }
622 | }
623 | return msg;
624 | };
625 |
626 |
627 | /**
628 | * Serializes the message to binary data (in protobuf wire format).
629 | * @return {!Uint8Array}
630 | */
631 | proto.proto.PublishRequest.prototype.serializeBinary = function() {
632 | var writer = new jspb.BinaryWriter();
633 | proto.proto.PublishRequest.serializeBinaryToWriter(this, writer);
634 | return writer.getResultBuffer();
635 | };
636 |
637 |
638 | /**
639 | * Serializes the given message to binary data (in protobuf wire
640 | * format), writing to the given BinaryWriter.
641 | * @param {!proto.proto.PublishRequest} message
642 | * @param {!jspb.BinaryWriter} writer
643 | * @suppress {unusedLocalVariables} f is only used for nested messages
644 | */
645 | proto.proto.PublishRequest.serializeBinaryToWriter = function(message, writer) {
646 | var f = undefined;
647 | f = message.getClientid();
648 | if (f != null) {
649 | writer.writeMessage(
650 | 1,
651 | f,
652 | proto.proto.ClientId.serializeBinaryToWriter
653 | );
654 | }
655 | f = message.getPayload();
656 | if (f != null) {
657 | writer.writeMessage(
658 | 2,
659 | f,
660 | proto.proto.Payload.serializeBinaryToWriter
661 | );
662 | }
663 | };
664 |
665 |
666 | /**
667 | * optional ClientId clientId = 1;
668 | * @return {?proto.proto.ClientId}
669 | */
670 | proto.proto.PublishRequest.prototype.getClientid = function() {
671 | return /** @type{?proto.proto.ClientId} */ (
672 | jspb.Message.getWrapperField(this, proto.proto.ClientId, 1));
673 | };
674 |
675 |
676 | /**
677 | * @param {?proto.proto.ClientId|undefined} value
678 | * @return {!proto.proto.PublishRequest} returns this
679 | */
680 | proto.proto.PublishRequest.prototype.setClientid = function(value) {
681 | return jspb.Message.setWrapperField(this, 1, value);
682 | };
683 |
684 |
685 | /**
686 | * Clears the message field making it undefined.
687 | * @return {!proto.proto.PublishRequest} returns this
688 | */
689 | proto.proto.PublishRequest.prototype.clearClientid = function() {
690 | return this.setClientid(undefined);
691 | };
692 |
693 |
694 | /**
695 | * Returns whether this field is set.
696 | * @return {boolean}
697 | */
698 | proto.proto.PublishRequest.prototype.hasClientid = function() {
699 | return jspb.Message.getField(this, 1) != null;
700 | };
701 |
702 |
703 | /**
704 | * optional Payload payload = 2;
705 | * @return {?proto.proto.Payload}
706 | */
707 | proto.proto.PublishRequest.prototype.getPayload = function() {
708 | return /** @type{?proto.proto.Payload} */ (
709 | jspb.Message.getWrapperField(this, proto.proto.Payload, 2));
710 | };
711 |
712 |
713 | /**
714 | * @param {?proto.proto.Payload|undefined} value
715 | * @return {!proto.proto.PublishRequest} returns this
716 | */
717 | proto.proto.PublishRequest.prototype.setPayload = function(value) {
718 | return jspb.Message.setWrapperField(this, 2, value);
719 | };
720 |
721 |
722 | /**
723 | * Clears the message field making it undefined.
724 | * @return {!proto.proto.PublishRequest} returns this
725 | */
726 | proto.proto.PublishRequest.prototype.clearPayload = function() {
727 | return this.setPayload(undefined);
728 | };
729 |
730 |
731 | /**
732 | * Returns whether this field is set.
733 | * @return {boolean}
734 | */
735 | proto.proto.PublishRequest.prototype.hasPayload = function() {
736 | return jspb.Message.getField(this, 2) != null;
737 | };
738 |
739 |
740 |
741 |
742 |
743 | if (jspb.Message.GENERATE_TO_OBJECT) {
744 | /**
745 | * Creates an object representation of this proto.
746 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
747 | * Optional fields that are not set will be set to undefined.
748 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
749 | * For the list of reserved names please see:
750 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
751 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
752 | * JSPB instance for transitional soy proto support:
753 | * http://goto/soy-param-migration
754 | * @return {!Object}
755 | */
756 | proto.proto.Payload.prototype.toObject = function(opt_includeInstance) {
757 | return proto.proto.Payload.toObject(opt_includeInstance, this);
758 | };
759 |
760 |
761 | /**
762 | * Static version of the {@see toObject} method.
763 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
764 | * the JSPB instance for transitional soy proto support:
765 | * http://goto/soy-param-migration
766 | * @param {!proto.proto.Payload} msg The msg instance to transform.
767 | * @return {!Object}
768 | * @suppress {unusedLocalVariables} f is only used for nested messages
769 | */
770 | proto.proto.Payload.toObject = function(includeInstance, msg) {
771 | var f, obj = {
772 | body: jspb.Message.getFieldWithDefault(msg, 1, "")
773 | };
774 |
775 | if (includeInstance) {
776 | obj.$jspbMessageInstance = msg;
777 | }
778 | return obj;
779 | };
780 | }
781 |
782 |
783 | /**
784 | * Deserializes binary data (in protobuf wire format).
785 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
786 | * @return {!proto.proto.Payload}
787 | */
788 | proto.proto.Payload.deserializeBinary = function(bytes) {
789 | var reader = new jspb.BinaryReader(bytes);
790 | var msg = new proto.proto.Payload;
791 | return proto.proto.Payload.deserializeBinaryFromReader(msg, reader);
792 | };
793 |
794 |
795 | /**
796 | * Deserializes binary data (in protobuf wire format) from the
797 | * given reader into the given message object.
798 | * @param {!proto.proto.Payload} msg The message object to deserialize into.
799 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
800 | * @return {!proto.proto.Payload}
801 | */
802 | proto.proto.Payload.deserializeBinaryFromReader = function(msg, reader) {
803 | while (reader.nextField()) {
804 | if (reader.isEndGroup()) {
805 | break;
806 | }
807 | var field = reader.getFieldNumber();
808 | switch (field) {
809 | case 1:
810 | var value = /** @type {string} */ (reader.readString());
811 | msg.setBody(value);
812 | break;
813 | default:
814 | reader.skipField();
815 | break;
816 | }
817 | }
818 | return msg;
819 | };
820 |
821 |
822 | /**
823 | * Serializes the message to binary data (in protobuf wire format).
824 | * @return {!Uint8Array}
825 | */
826 | proto.proto.Payload.prototype.serializeBinary = function() {
827 | var writer = new jspb.BinaryWriter();
828 | proto.proto.Payload.serializeBinaryToWriter(this, writer);
829 | return writer.getResultBuffer();
830 | };
831 |
832 |
833 | /**
834 | * Serializes the given message to binary data (in protobuf wire
835 | * format), writing to the given BinaryWriter.
836 | * @param {!proto.proto.Payload} message
837 | * @param {!jspb.BinaryWriter} writer
838 | * @suppress {unusedLocalVariables} f is only used for nested messages
839 | */
840 | proto.proto.Payload.serializeBinaryToWriter = function(message, writer) {
841 | var f = undefined;
842 | f = message.getBody();
843 | if (f.length > 0) {
844 | writer.writeString(
845 | 1,
846 | f
847 | );
848 | }
849 | };
850 |
851 |
852 | /**
853 | * optional string body = 1;
854 | * @return {string}
855 | */
856 | proto.proto.Payload.prototype.getBody = function() {
857 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
858 | };
859 |
860 |
861 | /**
862 | * @param {string} value
863 | * @return {!proto.proto.Payload} returns this
864 | */
865 | proto.proto.Payload.prototype.setBody = function(value) {
866 | return jspb.Message.setProto3StringField(this, 1, value);
867 | };
868 |
869 |
870 |
871 |
872 |
873 | if (jspb.Message.GENERATE_TO_OBJECT) {
874 | /**
875 | * Creates an object representation of this proto.
876 | * Field names that are reserved in JavaScript and will be renamed to pb_name.
877 | * Optional fields that are not set will be set to undefined.
878 | * To access a reserved field use, foo.pb_, eg, foo.pb_default.
879 | * For the list of reserved names please see:
880 | * net/proto2/compiler/js/internal/generator.cc#kKeyword.
881 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the
882 | * JSPB instance for transitional soy proto support:
883 | * http://goto/soy-param-migration
884 | * @return {!Object}
885 | */
886 | proto.proto.Empty.prototype.toObject = function(opt_includeInstance) {
887 | return proto.proto.Empty.toObject(opt_includeInstance, this);
888 | };
889 |
890 |
891 | /**
892 | * Static version of the {@see toObject} method.
893 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include
894 | * the JSPB instance for transitional soy proto support:
895 | * http://goto/soy-param-migration
896 | * @param {!proto.proto.Empty} msg The msg instance to transform.
897 | * @return {!Object}
898 | * @suppress {unusedLocalVariables} f is only used for nested messages
899 | */
900 | proto.proto.Empty.toObject = function(includeInstance, msg) {
901 | var f, obj = {
902 |
903 | };
904 |
905 | if (includeInstance) {
906 | obj.$jspbMessageInstance = msg;
907 | }
908 | return obj;
909 | };
910 | }
911 |
912 |
913 | /**
914 | * Deserializes binary data (in protobuf wire format).
915 | * @param {jspb.ByteSource} bytes The bytes to deserialize.
916 | * @return {!proto.proto.Empty}
917 | */
918 | proto.proto.Empty.deserializeBinary = function(bytes) {
919 | var reader = new jspb.BinaryReader(bytes);
920 | var msg = new proto.proto.Empty;
921 | return proto.proto.Empty.deserializeBinaryFromReader(msg, reader);
922 | };
923 |
924 |
925 | /**
926 | * Deserializes binary data (in protobuf wire format) from the
927 | * given reader into the given message object.
928 | * @param {!proto.proto.Empty} msg The message object to deserialize into.
929 | * @param {!jspb.BinaryReader} reader The BinaryReader to use.
930 | * @return {!proto.proto.Empty}
931 | */
932 | proto.proto.Empty.deserializeBinaryFromReader = function(msg, reader) {
933 | while (reader.nextField()) {
934 | if (reader.isEndGroup()) {
935 | break;
936 | }
937 | var field = reader.getFieldNumber();
938 | switch (field) {
939 | default:
940 | reader.skipField();
941 | break;
942 | }
943 | }
944 | return msg;
945 | };
946 |
947 |
948 | /**
949 | * Serializes the message to binary data (in protobuf wire format).
950 | * @return {!Uint8Array}
951 | */
952 | proto.proto.Empty.prototype.serializeBinary = function() {
953 | var writer = new jspb.BinaryWriter();
954 | proto.proto.Empty.serializeBinaryToWriter(this, writer);
955 | return writer.getResultBuffer();
956 | };
957 |
958 |
959 | /**
960 | * Serializes the given message to binary data (in protobuf wire
961 | * format), writing to the given BinaryWriter.
962 | * @param {!proto.proto.Empty} message
963 | * @param {!jspb.BinaryWriter} writer
964 | * @suppress {unusedLocalVariables} f is only used for nested messages
965 | */
966 | proto.proto.Empty.serializeBinaryToWriter = function(message, writer) {
967 | var f = undefined;
968 | };
969 |
970 |
971 | goog.object.extend(exports, proto.proto);
972 |
--------------------------------------------------------------------------------