/
session.pb.go
236 lines (201 loc) · 8.89 KB
/
session.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: server/session/session.proto
/*
Package session is a generated protocol buffer package.
Session Service
Session Service API performs CRUD actions against session resources
It is generated from these files:
server/session/session.proto
It has these top-level messages:
SessionCreateRequest
SessionDeleteRequest
SessionResponse
*/
package session
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import _ "k8s.io/api/core/v1"
import _ "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// SessionCreateRequest is for logging in.
type SessionCreateRequest struct {
Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
}
func (m *SessionCreateRequest) Reset() { *m = SessionCreateRequest{} }
func (m *SessionCreateRequest) String() string { return proto.CompactTextString(m) }
func (*SessionCreateRequest) ProtoMessage() {}
func (*SessionCreateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *SessionCreateRequest) GetUsername() string {
if m != nil {
return m.Username
}
return ""
}
func (m *SessionCreateRequest) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
// SessionDeleteRequest is for logging out.
type SessionDeleteRequest struct {
}
func (m *SessionDeleteRequest) Reset() { *m = SessionDeleteRequest{} }
func (m *SessionDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*SessionDeleteRequest) ProtoMessage() {}
func (*SessionDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
// SessionResponse wraps the created token or returns an empty string if deleted.
type SessionResponse struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}
func (m *SessionResponse) Reset() { *m = SessionResponse{} }
func (m *SessionResponse) String() string { return proto.CompactTextString(m) }
func (*SessionResponse) ProtoMessage() {}
func (*SessionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *SessionResponse) GetToken() string {
if m != nil {
return m.Token
}
return ""
}
func init() {
proto.RegisterType((*SessionCreateRequest)(nil), "session.SessionCreateRequest")
proto.RegisterType((*SessionDeleteRequest)(nil), "session.SessionDeleteRequest")
proto.RegisterType((*SessionResponse)(nil), "session.SessionResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for SessionService service
type SessionServiceClient interface {
// Create a new JWT for authentication.
Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error)
// Create a new JWT for authentication.
Delete(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error)
}
type sessionServiceClient struct {
cc *grpc.ClientConn
}
func NewSessionServiceClient(cc *grpc.ClientConn) SessionServiceClient {
return &sessionServiceClient{cc}
}
func (c *sessionServiceClient) Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error) {
out := new(SessionResponse)
err := grpc.Invoke(ctx, "/session.SessionService/Create", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionServiceClient) Delete(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error) {
out := new(SessionResponse)
err := grpc.Invoke(ctx, "/session.SessionService/Delete", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for SessionService service
type SessionServiceServer interface {
// Create a new JWT for authentication.
Create(context.Context, *SessionCreateRequest) (*SessionResponse, error)
// Create a new JWT for authentication.
Delete(context.Context, *SessionDeleteRequest) (*SessionResponse, error)
}
func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) {
s.RegisterService(&_SessionService_serviceDesc, srv)
}
func _SessionService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SessionCreateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/session.SessionService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).Create(ctx, req.(*SessionCreateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SessionDeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/session.SessionService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionServiceServer).Delete(ctx, req.(*SessionDeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SessionService_serviceDesc = grpc.ServiceDesc{
ServiceName: "session.SessionService",
HandlerType: (*SessionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _SessionService_Create_Handler,
},
{
MethodName: "Delete",
Handler: _SessionService_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "server/session/session.proto",
}
func init() { proto.RegisterFile("server/session/session.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 333 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbf, 0x4e, 0xc3, 0x30,
0x10, 0xc6, 0x95, 0x4a, 0x14, 0xf0, 0x40, 0x45, 0x14, 0x41, 0x15, 0x15, 0x09, 0x65, 0x01, 0x55,
0x10, 0xab, 0xb0, 0x20, 0x46, 0x60, 0x61, 0x61, 0x68, 0xb7, 0x4a, 0x0c, 0x6e, 0x7a, 0x72, 0x4d,
0x53, 0x9f, 0xf1, 0xb9, 0x61, 0xe7, 0x15, 0x78, 0x2c, 0x46, 0x5e, 0x81, 0x07, 0x41, 0x75, 0xfe,
0x48, 0x6d, 0x51, 0xa7, 0xf8, 0xf3, 0x77, 0xf9, 0xdd, 0x97, 0xbb, 0xb0, 0x1e, 0x81, 0x2d, 0xc0,
0x72, 0x02, 0x22, 0x85, 0xba, 0x7e, 0xa6, 0xc6, 0xa2, 0xc3, 0x70, 0xbf, 0x92, 0x71, 0x24, 0x51,
0xa2, 0xbf, 0xe3, 0xab, 0x53, 0x69, 0xc7, 0x3d, 0x89, 0x28, 0x73, 0xe0, 0xc2, 0x28, 0x2e, 0xb4,
0x46, 0x27, 0x9c, 0x42, 0x4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