github.com/argoproj/argo-cd/v2@v2.10.9/pkg/apiclient/session/session.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: server/session/session.proto
     3  
     4  // Session Service
     5  //
     6  // Session Service API performs CRUD actions against session resources
     7  
     8  package session
     9  
    10  import (
    11  	context "context"
    12  	fmt "fmt"
    13  	proto "github.com/gogo/protobuf/proto"
    14  	_ "google.golang.org/genproto/googleapis/api/annotations"
    15  	grpc "google.golang.org/grpc"
    16  	codes "google.golang.org/grpc/codes"
    17  	status "google.golang.org/grpc/status"
    18  	io "io"
    19  	math "math"
    20  	math_bits "math/bits"
    21  )
    22  
    23  // Reference imports to suppress errors if they are not otherwise used.
    24  var _ = proto.Marshal
    25  var _ = fmt.Errorf
    26  var _ = math.Inf
    27  
    28  // This is a compile-time assertion to ensure that this generated file
    29  // is compatible with the proto package it is being compiled against.
    30  // A compilation error at this line likely means your copy of the
    31  // proto package needs to be updated.
    32  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    33  
    34  // SessionCreateRequest is for logging in.
    35  type SessionCreateRequest struct {
    36  	Username             string   `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
    37  	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
    38  	Token                string   `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
    39  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    40  	XXX_unrecognized     []byte   `json:"-"`
    41  	XXX_sizecache        int32    `json:"-"`
    42  }
    43  
    44  func (m *SessionCreateRequest) Reset()         { *m = SessionCreateRequest{} }
    45  func (m *SessionCreateRequest) String() string { return proto.CompactTextString(m) }
    46  func (*SessionCreateRequest) ProtoMessage()    {}
    47  func (*SessionCreateRequest) Descriptor() ([]byte, []int) {
    48  	return fileDescriptor_87870a51a62685ed, []int{0}
    49  }
    50  func (m *SessionCreateRequest) XXX_Unmarshal(b []byte) error {
    51  	return m.Unmarshal(b)
    52  }
    53  func (m *SessionCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    54  	if deterministic {
    55  		return xxx_messageInfo_SessionCreateRequest.Marshal(b, m, deterministic)
    56  	} else {
    57  		b = b[:cap(b)]
    58  		n, err := m.MarshalToSizedBuffer(b)
    59  		if err != nil {
    60  			return nil, err
    61  		}
    62  		return b[:n], nil
    63  	}
    64  }
    65  func (m *SessionCreateRequest) XXX_Merge(src proto.Message) {
    66  	xxx_messageInfo_SessionCreateRequest.Merge(m, src)
    67  }
    68  func (m *SessionCreateRequest) XXX_Size() int {
    69  	return m.Size()
    70  }
    71  func (m *SessionCreateRequest) XXX_DiscardUnknown() {
    72  	xxx_messageInfo_SessionCreateRequest.DiscardUnknown(m)
    73  }
    74  
    75  var xxx_messageInfo_SessionCreateRequest proto.InternalMessageInfo
    76  
    77  func (m *SessionCreateRequest) GetUsername() string {
    78  	if m != nil {
    79  		return m.Username
    80  	}
    81  	return ""
    82  }
    83  
    84  func (m *SessionCreateRequest) GetPassword() string {
    85  	if m != nil {
    86  		return m.Password
    87  	}
    88  	return ""
    89  }
    90  
    91  func (m *SessionCreateRequest) GetToken() string {
    92  	if m != nil {
    93  		return m.Token
    94  	}
    95  	return ""
    96  }
    97  
    98  // SessionDeleteRequest is for logging out.
    99  type SessionDeleteRequest struct {
   100  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   101  	XXX_unrecognized     []byte   `json:"-"`
   102  	XXX_sizecache        int32    `json:"-"`
   103  }
   104  
   105  func (m *SessionDeleteRequest) Reset()         { *m = SessionDeleteRequest{} }
   106  func (m *SessionDeleteRequest) String() string { return proto.CompactTextString(m) }
   107  func (*SessionDeleteRequest) ProtoMessage()    {}
   108  func (*SessionDeleteRequest) Descriptor() ([]byte, []int) {
   109  	return fileDescriptor_87870a51a62685ed, []int{1}
   110  }
   111  func (m *SessionDeleteRequest) XXX_Unmarshal(b []byte) error {
   112  	return m.Unmarshal(b)
   113  }
   114  func (m *SessionDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   115  	if deterministic {
   116  		return xxx_messageInfo_SessionDeleteRequest.Marshal(b, m, deterministic)
   117  	} else {
   118  		b = b[:cap(b)]
   119  		n, err := m.MarshalToSizedBuffer(b)
   120  		if err != nil {
   121  			return nil, err
   122  		}
   123  		return b[:n], nil
   124  	}
   125  }
   126  func (m *SessionDeleteRequest) XXX_Merge(src proto.Message) {
   127  	xxx_messageInfo_SessionDeleteRequest.Merge(m, src)
   128  }
   129  func (m *SessionDeleteRequest) XXX_Size() int {
   130  	return m.Size()
   131  }
   132  func (m *SessionDeleteRequest) XXX_DiscardUnknown() {
   133  	xxx_messageInfo_SessionDeleteRequest.DiscardUnknown(m)
   134  }
   135  
   136  var xxx_messageInfo_SessionDeleteRequest proto.InternalMessageInfo
   137  
   138  // SessionResponse wraps the created token or returns an empty string if deleted.
   139  type SessionResponse struct {
   140  	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
   141  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   142  	XXX_unrecognized     []byte   `json:"-"`
   143  	XXX_sizecache        int32    `json:"-"`
   144  }
   145  
   146  func (m *SessionResponse) Reset()         { *m = SessionResponse{} }
   147  func (m *SessionResponse) String() string { return proto.CompactTextString(m) }
   148  func (*SessionResponse) ProtoMessage()    {}
   149  func (*SessionResponse) Descriptor() ([]byte, []int) {
   150  	return fileDescriptor_87870a51a62685ed, []int{2}
   151  }
   152  func (m *SessionResponse) XXX_Unmarshal(b []byte) error {
   153  	return m.Unmarshal(b)
   154  }
   155  func (m *SessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   156  	if deterministic {
   157  		return xxx_messageInfo_SessionResponse.Marshal(b, m, deterministic)
   158  	} else {
   159  		b = b[:cap(b)]
   160  		n, err := m.MarshalToSizedBuffer(b)
   161  		if err != nil {
   162  			return nil, err
   163  		}
   164  		return b[:n], nil
   165  	}
   166  }
   167  func (m *SessionResponse) XXX_Merge(src proto.Message) {
   168  	xxx_messageInfo_SessionResponse.Merge(m, src)
   169  }
   170  func (m *SessionResponse) XXX_Size() int {
   171  	return m.Size()
   172  }
   173  func (m *SessionResponse) XXX_DiscardUnknown() {
   174  	xxx_messageInfo_SessionResponse.DiscardUnknown(m)
   175  }
   176  
   177  var xxx_messageInfo_SessionResponse proto.InternalMessageInfo
   178  
   179  func (m *SessionResponse) GetToken() string {
   180  	if m != nil {
   181  		return m.Token
   182  	}
   183  	return ""
   184  }
   185  
   186  // Get the current user's userInfo info
   187  type GetUserInfoRequest struct {
   188  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   189  	XXX_unrecognized     []byte   `json:"-"`
   190  	XXX_sizecache        int32    `json:"-"`
   191  }
   192  
   193  func (m *GetUserInfoRequest) Reset()         { *m = GetUserInfoRequest{} }
   194  func (m *GetUserInfoRequest) String() string { return proto.CompactTextString(m) }
   195  func (*GetUserInfoRequest) ProtoMessage()    {}
   196  func (*GetUserInfoRequest) Descriptor() ([]byte, []int) {
   197  	return fileDescriptor_87870a51a62685ed, []int{3}
   198  }
   199  func (m *GetUserInfoRequest) XXX_Unmarshal(b []byte) error {
   200  	return m.Unmarshal(b)
   201  }
   202  func (m *GetUserInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   203  	if deterministic {
   204  		return xxx_messageInfo_GetUserInfoRequest.Marshal(b, m, deterministic)
   205  	} else {
   206  		b = b[:cap(b)]
   207  		n, err := m.MarshalToSizedBuffer(b)
   208  		if err != nil {
   209  			return nil, err
   210  		}
   211  		return b[:n], nil
   212  	}
   213  }
   214  func (m *GetUserInfoRequest) XXX_Merge(src proto.Message) {
   215  	xxx_messageInfo_GetUserInfoRequest.Merge(m, src)
   216  }
   217  func (m *GetUserInfoRequest) XXX_Size() int {
   218  	return m.Size()
   219  }
   220  func (m *GetUserInfoRequest) XXX_DiscardUnknown() {
   221  	xxx_messageInfo_GetUserInfoRequest.DiscardUnknown(m)
   222  }
   223  
   224  var xxx_messageInfo_GetUserInfoRequest proto.InternalMessageInfo
   225  
   226  // The current user's userInfo info
   227  type GetUserInfoResponse struct {
   228  	LoggedIn             bool     `protobuf:"varint,1,opt,name=loggedIn,proto3" json:"loggedIn,omitempty"`
   229  	Username             string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
   230  	Iss                  string   `protobuf:"bytes,3,opt,name=iss,proto3" json:"iss,omitempty"`
   231  	Groups               []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
   232  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   233  	XXX_unrecognized     []byte   `json:"-"`
   234  	XXX_sizecache        int32    `json:"-"`
   235  }
   236  
   237  func (m *GetUserInfoResponse) Reset()         { *m = GetUserInfoResponse{} }
   238  func (m *GetUserInfoResponse) String() string { return proto.CompactTextString(m) }
   239  func (*GetUserInfoResponse) ProtoMessage()    {}
   240  func (*GetUserInfoResponse) Descriptor() ([]byte, []int) {
   241  	return fileDescriptor_87870a51a62685ed, []int{4}
   242  }
   243  func (m *GetUserInfoResponse) XXX_Unmarshal(b []byte) error {
   244  	return m.Unmarshal(b)
   245  }
   246  func (m *GetUserInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   247  	if deterministic {
   248  		return xxx_messageInfo_GetUserInfoResponse.Marshal(b, m, deterministic)
   249  	} else {
   250  		b = b[:cap(b)]
   251  		n, err := m.MarshalToSizedBuffer(b)
   252  		if err != nil {
   253  			return nil, err
   254  		}
   255  		return b[:n], nil
   256  	}
   257  }
   258  func (m *GetUserInfoResponse) XXX_Merge(src proto.Message) {
   259  	xxx_messageInfo_GetUserInfoResponse.Merge(m, src)
   260  }
   261  func (m *GetUserInfoResponse) XXX_Size() int {
   262  	return m.Size()
   263  }
   264  func (m *GetUserInfoResponse) XXX_DiscardUnknown() {
   265  	xxx_messageInfo_GetUserInfoResponse.DiscardUnknown(m)
   266  }
   267  
   268  var xxx_messageInfo_GetUserInfoResponse proto.InternalMessageInfo
   269  
   270  func (m *GetUserInfoResponse) GetLoggedIn() bool {
   271  	if m != nil {
   272  		return m.LoggedIn
   273  	}
   274  	return false
   275  }
   276  
   277  func (m *GetUserInfoResponse) GetUsername() string {
   278  	if m != nil {
   279  		return m.Username
   280  	}
   281  	return ""
   282  }
   283  
   284  func (m *GetUserInfoResponse) GetIss() string {
   285  	if m != nil {
   286  		return m.Iss
   287  	}
   288  	return ""
   289  }
   290  
   291  func (m *GetUserInfoResponse) GetGroups() []string {
   292  	if m != nil {
   293  		return m.Groups
   294  	}
   295  	return nil
   296  }
   297  
   298  func init() {
   299  	proto.RegisterType((*SessionCreateRequest)(nil), "session.SessionCreateRequest")
   300  	proto.RegisterType((*SessionDeleteRequest)(nil), "session.SessionDeleteRequest")
   301  	proto.RegisterType((*SessionResponse)(nil), "session.SessionResponse")
   302  	proto.RegisterType((*GetUserInfoRequest)(nil), "session.GetUserInfoRequest")
   303  	proto.RegisterType((*GetUserInfoResponse)(nil), "session.GetUserInfoResponse")
   304  }
   305  
   306  func init() { proto.RegisterFile("server/session/session.proto", fileDescriptor_87870a51a62685ed) }
   307  
   308  var fileDescriptor_87870a51a62685ed = []byte{
   309  	// 404 bytes of a gzipped FileDescriptorProto
   310  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x41, 0x8e, 0xd3, 0x30,
   311  	0x18, 0x85, 0x95, 0x14, 0x42, 0xc7, 0x48, 0x0c, 0x98, 0x68, 0x88, 0x42, 0xa9, 0xaa, 0x6c, 0x18,
   312  	0x8d, 0x44, 0x23, 0x06, 0x56, 0x2c, 0x0b, 0x12, 0xea, 0x36, 0x15, 0x9b, 0x4a, 0x2c, 0xd2, 0xe4,
   313  	0xc7, 0xb8, 0x4d, 0xfd, 0x07, 0xdb, 0x49, 0xf7, 0x5c, 0x81, 0xc3, 0x70, 0x05, 0x96, 0x48, 0x5c,
   314  	0x00, 0x55, 0x1c, 0x04, 0x25, 0x4e, 0x42, 0x9b, 0x56, 0xac, 0xe2, 0xe7, 0xdf, 0xf9, 0xde, 0xb3,
   315  	0x9e, 0xc9, 0x48, 0x81, 0x2c, 0x41, 0x86, 0x0a, 0x94, 0xe2, 0x28, 0xda, 0xef, 0x34, 0x97, 0xa8,
   316  	0x91, 0xde, 0x6b, 0xa4, 0x3f, 0x62, 0x88, 0x2c, 0x83, 0x30, 0xce, 0x79, 0x18, 0x0b, 0x81, 0x3a,
   317  	0xd6, 0x1c, 0x85, 0x32, 0xc7, 0x82, 0x94, 0xb8, 0x0b, 0x73, 0xf0, 0xad, 0x84, 0x58, 0x43, 0x04,
   318  	0x5f, 0x0a, 0x50, 0x9a, 0xfa, 0x64, 0x58, 0x28, 0x90, 0x22, 0xde, 0x82, 0x67, 0x4d, 0xac, 0xeb,
   319  	0x8b, 0xa8, 0xd3, 0xd5, 0x2c, 0x8f, 0x95, 0xda, 0xa1, 0x4c, 0x3d, 0xdb, 0xcc, 0x5a, 0x4d, 0x5d,
   320  	0x72, 0x57, 0xe3, 0x06, 0x84, 0x37, 0xa8, 0x07, 0x46, 0x04, 0x57, 0x9d, 0xcb, 0x3b, 0xc8, 0xa0,
   321  	0x73, 0x09, 0x9e, 0x93, 0xcb, 0x66, 0x3f, 0x02, 0x95, 0xa3, 0x50, 0xf0, 0x0f, 0x60, 0x1d, 0x02,
   322  	0x5c, 0x42, 0xdf, 0x83, 0xfe, 0xa0, 0x40, 0xce, 0xc5, 0x27, 0x6c, 0x7f, 0xdf, 0x91, 0xc7, 0x47,
   323  	0xbb, 0x0d, 0xc2, 0x27, 0xc3, 0x0c, 0x19, 0x83, 0x74, 0x6e, 0x28, 0xc3, 0xa8, 0xd3, 0x47, 0xf7,
   324  	0xb2, 0x7b, 0xf7, 0x7a, 0x48, 0x06, 0x5c, 0xa9, 0x26, 0x79, 0xb5, 0xa4, 0x57, 0xc4, 0x61, 0x12,
   325  	0x8b, 0x5c, 0x79, 0x77, 0x26, 0x83, 0xeb, 0x8b, 0xa8, 0x51, 0xb7, 0xdf, 0x6d, 0xf2, 0xa0, 0x09,
   326  	0xbe, 0x00, 0x59, 0xf2, 0x04, 0xe8, 0x9a, 0xdc, 0x3f, 0xc8, 0x42, 0x9f, 0x4e, 0xdb, 0x3a, 0x4e,
   327  	0x73, 0xfb, 0xa3, 0xf3, 0x43, 0x13, 0x3f, 0x98, 0x7c, 0xfd, 0xf5, 0xe7, 0x9b, 0xed, 0x53, 0xaf,
   328  	0xae, 0xac, 0x7c, 0xd9, 0x15, 0x5c, 0x05, 0xe5, 0x15, 0xfc, 0x23, 0x71, 0x4c, 0x5b, 0xf4, 0x59,
   329  	0x47, 0x3a, 0xd7, 0xa2, 0xef, 0xf5, 0xc7, 0x9d, 0x89, 0x5f, 0x9b, 0xb8, 0xc1, 0x65, 0xcf, 0xe4,
   330  	0x8d, 0x75, 0x43, 0x97, 0xc4, 0x31, 0x35, 0x9d, 0xe2, 0x8f, 0xea, 0xfb, 0x0f, 0xfe, 0x49, 0x8d,
   331  	0x7f, 0x74, 0xd3, 0xc7, 0xcf, 0x66, 0x3f, 0xf6, 0x63, 0xeb, 0xe7, 0x7e, 0x6c, 0xfd, 0xde, 0x8f,
   332  	0xad, 0xe5, 0x6b, 0xc6, 0xf5, 0xe7, 0x62, 0x35, 0x4d, 0x70, 0x1b, 0xc6, 0x92, 0x61, 0x2e, 0x71,
   333  	0x5d, 0x2f, 0x5e, 0x24, 0x69, 0x58, 0xde, 0x86, 0xf9, 0x86, 0x55, 0x80, 0x24, 0xe3, 0x20, 0x74,
   334  	0xcb, 0x58, 0x39, 0xf5, 0xd3, 0x7d, 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0xda, 0x7e, 0xce, 0xb3,
   335  	0x01, 0x03, 0x00, 0x00,
   336  }
   337  
   338  // Reference imports to suppress errors if they are not otherwise used.
   339  var _ context.Context
   340  var _ grpc.ClientConn
   341  
   342  // This is a compile-time assertion to ensure that this generated file
   343  // is compatible with the grpc package it is being compiled against.
   344  const _ = grpc.SupportPackageIsVersion4
   345  
   346  // SessionServiceClient is the client API for SessionService service.
   347  //
   348  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   349  type SessionServiceClient interface {
   350  	// Get the current user's info
   351  	GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error)
   352  	// Create a new JWT for authentication and set a cookie if using HTTP
   353  	Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error)
   354  	// Delete an existing JWT cookie if using HTTP
   355  	Delete(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error)
   356  }
   357  
   358  type sessionServiceClient struct {
   359  	cc *grpc.ClientConn
   360  }
   361  
   362  func NewSessionServiceClient(cc *grpc.ClientConn) SessionServiceClient {
   363  	return &sessionServiceClient{cc}
   364  }
   365  
   366  func (c *sessionServiceClient) GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error) {
   367  	out := new(GetUserInfoResponse)
   368  	err := c.cc.Invoke(ctx, "/session.SessionService/GetUserInfo", in, out, opts...)
   369  	if err != nil {
   370  		return nil, err
   371  	}
   372  	return out, nil
   373  }
   374  
   375  func (c *sessionServiceClient) Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error) {
   376  	out := new(SessionResponse)
   377  	err := c.cc.Invoke(ctx, "/session.SessionService/Create", in, out, opts...)
   378  	if err != nil {
   379  		return nil, err
   380  	}
   381  	return out, nil
   382  }
   383  
   384  func (c *sessionServiceClient) Delete(ctx context.Context, in *SessionDeleteRequest, opts ...grpc.CallOption) (*SessionResponse, error) {
   385  	out := new(SessionResponse)
   386  	err := c.cc.Invoke(ctx, "/session.SessionService/Delete", in, out, opts...)
   387  	if err != nil {
   388  		return nil, err
   389  	}
   390  	return out, nil
   391  }
   392  
   393  // SessionServiceServer is the server API for SessionService service.
   394  type SessionServiceServer interface {
   395  	// Get the current user's info
   396  	GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error)
   397  	// Create a new JWT for authentication and set a cookie if using HTTP
   398  	Create(context.Context, *SessionCreateRequest) (*SessionResponse, error)
   399  	// Delete an existing JWT cookie if using HTTP
   400  	Delete(context.Context, *SessionDeleteRequest) (*SessionResponse, error)
   401  }
   402  
   403  // UnimplementedSessionServiceServer can be embedded to have forward compatible implementations.
   404  type UnimplementedSessionServiceServer struct {
   405  }
   406  
   407  func (*UnimplementedSessionServiceServer) GetUserInfo(ctx context.Context, req *GetUserInfoRequest) (*GetUserInfoResponse, error) {
   408  	return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
   409  }
   410  func (*UnimplementedSessionServiceServer) Create(ctx context.Context, req *SessionCreateRequest) (*SessionResponse, error) {
   411  	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
   412  }
   413  func (*UnimplementedSessionServiceServer) Delete(ctx context.Context, req *SessionDeleteRequest) (*SessionResponse, error) {
   414  	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
   415  }
   416  
   417  func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) {
   418  	s.RegisterService(&_SessionService_serviceDesc, srv)
   419  }
   420  
   421  func _SessionService_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   422  	in := new(GetUserInfoRequest)
   423  	if err := dec(in); err != nil {
   424  		return nil, err
   425  	}
   426  	if interceptor == nil {
   427  		return srv.(SessionServiceServer).GetUserInfo(ctx, in)
   428  	}
   429  	info := &grpc.UnaryServerInfo{
   430  		Server:     srv,
   431  		FullMethod: "/session.SessionService/GetUserInfo",
   432  	}
   433  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   434  		return srv.(SessionServiceServer).GetUserInfo(ctx, req.(*GetUserInfoRequest))
   435  	}
   436  	return interceptor(ctx, in, info, handler)
   437  }
   438  
   439  func _SessionService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   440  	in := new(SessionCreateRequest)
   441  	if err := dec(in); err != nil {
   442  		return nil, err
   443  	}
   444  	if interceptor == nil {
   445  		return srv.(SessionServiceServer).Create(ctx, in)
   446  	}
   447  	info := &grpc.UnaryServerInfo{
   448  		Server:     srv,
   449  		FullMethod: "/session.SessionService/Create",
   450  	}
   451  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   452  		return srv.(SessionServiceServer).Create(ctx, req.(*SessionCreateRequest))
   453  	}
   454  	return interceptor(ctx, in, info, handler)
   455  }
   456  
   457  func _SessionService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   458  	in := new(SessionDeleteRequest)
   459  	if err := dec(in); err != nil {
   460  		return nil, err
   461  	}
   462  	if interceptor == nil {
   463  		return srv.(SessionServiceServer).Delete(ctx, in)
   464  	}
   465  	info := &grpc.UnaryServerInfo{
   466  		Server:     srv,
   467  		FullMethod: "/session.SessionService/Delete",
   468  	}
   469  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   470  		return srv.(SessionServiceServer).Delete(ctx, req.(*SessionDeleteRequest))
   471  	}
   472  	return interceptor(ctx, in, info, handler)
   473  }
   474  
   475  var _SessionService_serviceDesc = grpc.ServiceDesc{
   476  	ServiceName: "session.SessionService",
   477  	HandlerType: (*SessionServiceServer)(nil),
   478  	Methods: []grpc.MethodDesc{
   479  		{
   480  			MethodName: "GetUserInfo",
   481  			Handler:    _SessionService_GetUserInfo_Handler,
   482  		},
   483  		{
   484  			MethodName: "Create",
   485  			Handler:    _SessionService_Create_Handler,
   486  		},
   487  		{
   488  			MethodName: "Delete",
   489  			Handler:    _SessionService_Delete_Handler,
   490  		},
   491  	},
   492  	Streams:  []grpc.StreamDesc{},
   493  	Metadata: "server/session/session.proto",
   494  }
   495  
   496  func (m *SessionCreateRequest) Marshal() (dAtA []byte, err error) {
   497  	size := m.Size()
   498  	dAtA = make([]byte, size)
   499  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   500  	if err != nil {
   501  		return nil, err
   502  	}
   503  	return dAtA[:n], nil
   504  }
   505  
   506  func (m *SessionCreateRequest) MarshalTo(dAtA []byte) (int, error) {
   507  	size := m.Size()
   508  	return m.MarshalToSizedBuffer(dAtA[:size])
   509  }
   510  
   511  func (m *SessionCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   512  	i := len(dAtA)
   513  	_ = i
   514  	var l int
   515  	_ = l
   516  	if m.XXX_unrecognized != nil {
   517  		i -= len(m.XXX_unrecognized)
   518  		copy(dAtA[i:], m.XXX_unrecognized)
   519  	}
   520  	if len(m.Token) > 0 {
   521  		i -= len(m.Token)
   522  		copy(dAtA[i:], m.Token)
   523  		i = encodeVarintSession(dAtA, i, uint64(len(m.Token)))
   524  		i--
   525  		dAtA[i] = 0x1a
   526  	}
   527  	if len(m.Password) > 0 {
   528  		i -= len(m.Password)
   529  		copy(dAtA[i:], m.Password)
   530  		i = encodeVarintSession(dAtA, i, uint64(len(m.Password)))
   531  		i--
   532  		dAtA[i] = 0x12
   533  	}
   534  	if len(m.Username) > 0 {
   535  		i -= len(m.Username)
   536  		copy(dAtA[i:], m.Username)
   537  		i = encodeVarintSession(dAtA, i, uint64(len(m.Username)))
   538  		i--
   539  		dAtA[i] = 0xa
   540  	}
   541  	return len(dAtA) - i, nil
   542  }
   543  
   544  func (m *SessionDeleteRequest) Marshal() (dAtA []byte, err error) {
   545  	size := m.Size()
   546  	dAtA = make([]byte, size)
   547  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   548  	if err != nil {
   549  		return nil, err
   550  	}
   551  	return dAtA[:n], nil
   552  }
   553  
   554  func (m *SessionDeleteRequest) MarshalTo(dAtA []byte) (int, error) {
   555  	size := m.Size()
   556  	return m.MarshalToSizedBuffer(dAtA[:size])
   557  }
   558  
   559  func (m *SessionDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   560  	i := len(dAtA)
   561  	_ = i
   562  	var l int
   563  	_ = l
   564  	if m.XXX_unrecognized != nil {
   565  		i -= len(m.XXX_unrecognized)
   566  		copy(dAtA[i:], m.XXX_unrecognized)
   567  	}
   568  	return len(dAtA) - i, nil
   569  }
   570  
   571  func (m *SessionResponse) Marshal() (dAtA []byte, err error) {
   572  	size := m.Size()
   573  	dAtA = make([]byte, size)
   574  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   575  	if err != nil {
   576  		return nil, err
   577  	}
   578  	return dAtA[:n], nil
   579  }
   580  
   581  func (m *SessionResponse) MarshalTo(dAtA []byte) (int, error) {
   582  	size := m.Size()
   583  	return m.MarshalToSizedBuffer(dAtA[:size])
   584  }
   585  
   586  func (m *SessionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   587  	i := len(dAtA)
   588  	_ = i
   589  	var l int
   590  	_ = l
   591  	if m.XXX_unrecognized != nil {
   592  		i -= len(m.XXX_unrecognized)
   593  		copy(dAtA[i:], m.XXX_unrecognized)
   594  	}
   595  	if len(m.Token) > 0 {
   596  		i -= len(m.Token)
   597  		copy(dAtA[i:], m.Token)
   598  		i = encodeVarintSession(dAtA, i, uint64(len(m.Token)))
   599  		i--
   600  		dAtA[i] = 0xa
   601  	}
   602  	return len(dAtA) - i, nil
   603  }
   604  
   605  func (m *GetUserInfoRequest) Marshal() (dAtA []byte, err error) {
   606  	size := m.Size()
   607  	dAtA = make([]byte, size)
   608  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   609  	if err != nil {
   610  		return nil, err
   611  	}
   612  	return dAtA[:n], nil
   613  }
   614  
   615  func (m *GetUserInfoRequest) MarshalTo(dAtA []byte) (int, error) {
   616  	size := m.Size()
   617  	return m.MarshalToSizedBuffer(dAtA[:size])
   618  }
   619  
   620  func (m *GetUserInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   621  	i := len(dAtA)
   622  	_ = i
   623  	var l int
   624  	_ = l
   625  	if m.XXX_unrecognized != nil {
   626  		i -= len(m.XXX_unrecognized)
   627  		copy(dAtA[i:], m.XXX_unrecognized)
   628  	}
   629  	return len(dAtA) - i, nil
   630  }
   631  
   632  func (m *GetUserInfoResponse) Marshal() (dAtA []byte, err error) {
   633  	size := m.Size()
   634  	dAtA = make([]byte, size)
   635  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   636  	if err != nil {
   637  		return nil, err
   638  	}
   639  	return dAtA[:n], nil
   640  }
   641  
   642  func (m *GetUserInfoResponse) MarshalTo(dAtA []byte) (int, error) {
   643  	size := m.Size()
   644  	return m.MarshalToSizedBuffer(dAtA[:size])
   645  }
   646  
   647  func (m *GetUserInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   648  	i := len(dAtA)
   649  	_ = i
   650  	var l int
   651  	_ = l
   652  	if m.XXX_unrecognized != nil {
   653  		i -= len(m.XXX_unrecognized)
   654  		copy(dAtA[i:], m.XXX_unrecognized)
   655  	}
   656  	if len(m.Groups) > 0 {
   657  		for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
   658  			i -= len(m.Groups[iNdEx])
   659  			copy(dAtA[i:], m.Groups[iNdEx])
   660  			i = encodeVarintSession(dAtA, i, uint64(len(m.Groups[iNdEx])))
   661  			i--
   662  			dAtA[i] = 0x22
   663  		}
   664  	}
   665  	if len(m.Iss) > 0 {
   666  		i -= len(m.Iss)
   667  		copy(dAtA[i:], m.Iss)
   668  		i = encodeVarintSession(dAtA, i, uint64(len(m.Iss)))
   669  		i--
   670  		dAtA[i] = 0x1a
   671  	}
   672  	if len(m.Username) > 0 {
   673  		i -= len(m.Username)
   674  		copy(dAtA[i:], m.Username)
   675  		i = encodeVarintSession(dAtA, i, uint64(len(m.Username)))
   676  		i--
   677  		dAtA[i] = 0x12
   678  	}
   679  	if m.LoggedIn {
   680  		i--
   681  		if m.LoggedIn {
   682  			dAtA[i] = 1
   683  		} else {
   684  			dAtA[i] = 0
   685  		}
   686  		i--
   687  		dAtA[i] = 0x8
   688  	}
   689  	return len(dAtA) - i, nil
   690  }
   691  
   692  func encodeVarintSession(dAtA []byte, offset int, v uint64) int {
   693  	offset -= sovSession(v)
   694  	base := offset
   695  	for v >= 1<<7 {
   696  		dAtA[offset] = uint8(v&0x7f | 0x80)
   697  		v >>= 7
   698  		offset++
   699  	}
   700  	dAtA[offset] = uint8(v)
   701  	return base
   702  }
   703  func (m *SessionCreateRequest) Size() (n int) {
   704  	if m == nil {
   705  		return 0
   706  	}
   707  	var l int
   708  	_ = l
   709  	l = len(m.Username)
   710  	if l > 0 {
   711  		n += 1 + l + sovSession(uint64(l))
   712  	}
   713  	l = len(m.Password)
   714  	if l > 0 {
   715  		n += 1 + l + sovSession(uint64(l))
   716  	}
   717  	l = len(m.Token)
   718  	if l > 0 {
   719  		n += 1 + l + sovSession(uint64(l))
   720  	}
   721  	if m.XXX_unrecognized != nil {
   722  		n += len(m.XXX_unrecognized)
   723  	}
   724  	return n
   725  }
   726  
   727  func (m *SessionDeleteRequest) Size() (n int) {
   728  	if m == nil {
   729  		return 0
   730  	}
   731  	var l int
   732  	_ = l
   733  	if m.XXX_unrecognized != nil {
   734  		n += len(m.XXX_unrecognized)
   735  	}
   736  	return n
   737  }
   738  
   739  func (m *SessionResponse) Size() (n int) {
   740  	if m == nil {
   741  		return 0
   742  	}
   743  	var l int
   744  	_ = l
   745  	l = len(m.Token)
   746  	if l > 0 {
   747  		n += 1 + l + sovSession(uint64(l))
   748  	}
   749  	if m.XXX_unrecognized != nil {
   750  		n += len(m.XXX_unrecognized)
   751  	}
   752  	return n
   753  }
   754  
   755  func (m *GetUserInfoRequest) Size() (n int) {
   756  	if m == nil {
   757  		return 0
   758  	}
   759  	var l int
   760  	_ = l
   761  	if m.XXX_unrecognized != nil {
   762  		n += len(m.XXX_unrecognized)
   763  	}
   764  	return n
   765  }
   766  
   767  func (m *GetUserInfoResponse) Size() (n int) {
   768  	if m == nil {
   769  		return 0
   770  	}
   771  	var l int
   772  	_ = l
   773  	if m.LoggedIn {
   774  		n += 2
   775  	}
   776  	l = len(m.Username)
   777  	if l > 0 {
   778  		n += 1 + l + sovSession(uint64(l))
   779  	}
   780  	l = len(m.Iss)
   781  	if l > 0 {
   782  		n += 1 + l + sovSession(uint64(l))
   783  	}
   784  	if len(m.Groups) > 0 {
   785  		for _, s := range m.Groups {
   786  			l = len(s)
   787  			n += 1 + l + sovSession(uint64(l))
   788  		}
   789  	}
   790  	if m.XXX_unrecognized != nil {
   791  		n += len(m.XXX_unrecognized)
   792  	}
   793  	return n
   794  }
   795  
   796  func sovSession(x uint64) (n int) {
   797  	return (math_bits.Len64(x|1) + 6) / 7
   798  }
   799  func sozSession(x uint64) (n int) {
   800  	return sovSession(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   801  }
   802  func (m *SessionCreateRequest) Unmarshal(dAtA []byte) error {
   803  	l := len(dAtA)
   804  	iNdEx := 0
   805  	for iNdEx < l {
   806  		preIndex := iNdEx
   807  		var wire uint64
   808  		for shift := uint(0); ; shift += 7 {
   809  			if shift >= 64 {
   810  				return ErrIntOverflowSession
   811  			}
   812  			if iNdEx >= l {
   813  				return io.ErrUnexpectedEOF
   814  			}
   815  			b := dAtA[iNdEx]
   816  			iNdEx++
   817  			wire |= uint64(b&0x7F) << shift
   818  			if b < 0x80 {
   819  				break
   820  			}
   821  		}
   822  		fieldNum := int32(wire >> 3)
   823  		wireType := int(wire & 0x7)
   824  		if wireType == 4 {
   825  			return fmt.Errorf("proto: SessionCreateRequest: wiretype end group for non-group")
   826  		}
   827  		if fieldNum <= 0 {
   828  			return fmt.Errorf("proto: SessionCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   829  		}
   830  		switch fieldNum {
   831  		case 1:
   832  			if wireType != 2 {
   833  				return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
   834  			}
   835  			var stringLen uint64
   836  			for shift := uint(0); ; shift += 7 {
   837  				if shift >= 64 {
   838  					return ErrIntOverflowSession
   839  				}
   840  				if iNdEx >= l {
   841  					return io.ErrUnexpectedEOF
   842  				}
   843  				b := dAtA[iNdEx]
   844  				iNdEx++
   845  				stringLen |= uint64(b&0x7F) << shift
   846  				if b < 0x80 {
   847  					break
   848  				}
   849  			}
   850  			intStringLen := int(stringLen)
   851  			if intStringLen < 0 {
   852  				return ErrInvalidLengthSession
   853  			}
   854  			postIndex := iNdEx + intStringLen
   855  			if postIndex < 0 {
   856  				return ErrInvalidLengthSession
   857  			}
   858  			if postIndex > l {
   859  				return io.ErrUnexpectedEOF
   860  			}
   861  			m.Username = string(dAtA[iNdEx:postIndex])
   862  			iNdEx = postIndex
   863  		case 2:
   864  			if wireType != 2 {
   865  				return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
   866  			}
   867  			var stringLen uint64
   868  			for shift := uint(0); ; shift += 7 {
   869  				if shift >= 64 {
   870  					return ErrIntOverflowSession
   871  				}
   872  				if iNdEx >= l {
   873  					return io.ErrUnexpectedEOF
   874  				}
   875  				b := dAtA[iNdEx]
   876  				iNdEx++
   877  				stringLen |= uint64(b&0x7F) << shift
   878  				if b < 0x80 {
   879  					break
   880  				}
   881  			}
   882  			intStringLen := int(stringLen)
   883  			if intStringLen < 0 {
   884  				return ErrInvalidLengthSession
   885  			}
   886  			postIndex := iNdEx + intStringLen
   887  			if postIndex < 0 {
   888  				return ErrInvalidLengthSession
   889  			}
   890  			if postIndex > l {
   891  				return io.ErrUnexpectedEOF
   892  			}
   893  			m.Password = string(dAtA[iNdEx:postIndex])
   894  			iNdEx = postIndex
   895  		case 3:
   896  			if wireType != 2 {
   897  				return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
   898  			}
   899  			var stringLen uint64
   900  			for shift := uint(0); ; shift += 7 {
   901  				if shift >= 64 {
   902  					return ErrIntOverflowSession
   903  				}
   904  				if iNdEx >= l {
   905  					return io.ErrUnexpectedEOF
   906  				}
   907  				b := dAtA[iNdEx]
   908  				iNdEx++
   909  				stringLen |= uint64(b&0x7F) << shift
   910  				if b < 0x80 {
   911  					break
   912  				}
   913  			}
   914  			intStringLen := int(stringLen)
   915  			if intStringLen < 0 {
   916  				return ErrInvalidLengthSession
   917  			}
   918  			postIndex := iNdEx + intStringLen
   919  			if postIndex < 0 {
   920  				return ErrInvalidLengthSession
   921  			}
   922  			if postIndex > l {
   923  				return io.ErrUnexpectedEOF
   924  			}
   925  			m.Token = string(dAtA[iNdEx:postIndex])
   926  			iNdEx = postIndex
   927  		default:
   928  			iNdEx = preIndex
   929  			skippy, err := skipSession(dAtA[iNdEx:])
   930  			if err != nil {
   931  				return err
   932  			}
   933  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   934  				return ErrInvalidLengthSession
   935  			}
   936  			if (iNdEx + skippy) > l {
   937  				return io.ErrUnexpectedEOF
   938  			}
   939  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   940  			iNdEx += skippy
   941  		}
   942  	}
   943  
   944  	if iNdEx > l {
   945  		return io.ErrUnexpectedEOF
   946  	}
   947  	return nil
   948  }
   949  func (m *SessionDeleteRequest) Unmarshal(dAtA []byte) error {
   950  	l := len(dAtA)
   951  	iNdEx := 0
   952  	for iNdEx < l {
   953  		preIndex := iNdEx
   954  		var wire uint64
   955  		for shift := uint(0); ; shift += 7 {
   956  			if shift >= 64 {
   957  				return ErrIntOverflowSession
   958  			}
   959  			if iNdEx >= l {
   960  				return io.ErrUnexpectedEOF
   961  			}
   962  			b := dAtA[iNdEx]
   963  			iNdEx++
   964  			wire |= uint64(b&0x7F) << shift
   965  			if b < 0x80 {
   966  				break
   967  			}
   968  		}
   969  		fieldNum := int32(wire >> 3)
   970  		wireType := int(wire & 0x7)
   971  		if wireType == 4 {
   972  			return fmt.Errorf("proto: SessionDeleteRequest: wiretype end group for non-group")
   973  		}
   974  		if fieldNum <= 0 {
   975  			return fmt.Errorf("proto: SessionDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   976  		}
   977  		switch fieldNum {
   978  		default:
   979  			iNdEx = preIndex
   980  			skippy, err := skipSession(dAtA[iNdEx:])
   981  			if err != nil {
   982  				return err
   983  			}
   984  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   985  				return ErrInvalidLengthSession
   986  			}
   987  			if (iNdEx + skippy) > l {
   988  				return io.ErrUnexpectedEOF
   989  			}
   990  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   991  			iNdEx += skippy
   992  		}
   993  	}
   994  
   995  	if iNdEx > l {
   996  		return io.ErrUnexpectedEOF
   997  	}
   998  	return nil
   999  }
  1000  func (m *SessionResponse) Unmarshal(dAtA []byte) error {
  1001  	l := len(dAtA)
  1002  	iNdEx := 0
  1003  	for iNdEx < l {
  1004  		preIndex := iNdEx
  1005  		var wire uint64
  1006  		for shift := uint(0); ; shift += 7 {
  1007  			if shift >= 64 {
  1008  				return ErrIntOverflowSession
  1009  			}
  1010  			if iNdEx >= l {
  1011  				return io.ErrUnexpectedEOF
  1012  			}
  1013  			b := dAtA[iNdEx]
  1014  			iNdEx++
  1015  			wire |= uint64(b&0x7F) << shift
  1016  			if b < 0x80 {
  1017  				break
  1018  			}
  1019  		}
  1020  		fieldNum := int32(wire >> 3)
  1021  		wireType := int(wire & 0x7)
  1022  		if wireType == 4 {
  1023  			return fmt.Errorf("proto: SessionResponse: wiretype end group for non-group")
  1024  		}
  1025  		if fieldNum <= 0 {
  1026  			return fmt.Errorf("proto: SessionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1027  		}
  1028  		switch fieldNum {
  1029  		case 1:
  1030  			if wireType != 2 {
  1031  				return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
  1032  			}
  1033  			var stringLen uint64
  1034  			for shift := uint(0); ; shift += 7 {
  1035  				if shift >= 64 {
  1036  					return ErrIntOverflowSession
  1037  				}
  1038  				if iNdEx >= l {
  1039  					return io.ErrUnexpectedEOF
  1040  				}
  1041  				b := dAtA[iNdEx]
  1042  				iNdEx++
  1043  				stringLen |= uint64(b&0x7F) << shift
  1044  				if b < 0x80 {
  1045  					break
  1046  				}
  1047  			}
  1048  			intStringLen := int(stringLen)
  1049  			if intStringLen < 0 {
  1050  				return ErrInvalidLengthSession
  1051  			}
  1052  			postIndex := iNdEx + intStringLen
  1053  			if postIndex < 0 {
  1054  				return ErrInvalidLengthSession
  1055  			}
  1056  			if postIndex > l {
  1057  				return io.ErrUnexpectedEOF
  1058  			}
  1059  			m.Token = string(dAtA[iNdEx:postIndex])
  1060  			iNdEx = postIndex
  1061  		default:
  1062  			iNdEx = preIndex
  1063  			skippy, err := skipSession(dAtA[iNdEx:])
  1064  			if err != nil {
  1065  				return err
  1066  			}
  1067  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1068  				return ErrInvalidLengthSession
  1069  			}
  1070  			if (iNdEx + skippy) > l {
  1071  				return io.ErrUnexpectedEOF
  1072  			}
  1073  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1074  			iNdEx += skippy
  1075  		}
  1076  	}
  1077  
  1078  	if iNdEx > l {
  1079  		return io.ErrUnexpectedEOF
  1080  	}
  1081  	return nil
  1082  }
  1083  func (m *GetUserInfoRequest) Unmarshal(dAtA []byte) error {
  1084  	l := len(dAtA)
  1085  	iNdEx := 0
  1086  	for iNdEx < l {
  1087  		preIndex := iNdEx
  1088  		var wire uint64
  1089  		for shift := uint(0); ; shift += 7 {
  1090  			if shift >= 64 {
  1091  				return ErrIntOverflowSession
  1092  			}
  1093  			if iNdEx >= l {
  1094  				return io.ErrUnexpectedEOF
  1095  			}
  1096  			b := dAtA[iNdEx]
  1097  			iNdEx++
  1098  			wire |= uint64(b&0x7F) << shift
  1099  			if b < 0x80 {
  1100  				break
  1101  			}
  1102  		}
  1103  		fieldNum := int32(wire >> 3)
  1104  		wireType := int(wire & 0x7)
  1105  		if wireType == 4 {
  1106  			return fmt.Errorf("proto: GetUserInfoRequest: wiretype end group for non-group")
  1107  		}
  1108  		if fieldNum <= 0 {
  1109  			return fmt.Errorf("proto: GetUserInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1110  		}
  1111  		switch fieldNum {
  1112  		default:
  1113  			iNdEx = preIndex
  1114  			skippy, err := skipSession(dAtA[iNdEx:])
  1115  			if err != nil {
  1116  				return err
  1117  			}
  1118  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1119  				return ErrInvalidLengthSession
  1120  			}
  1121  			if (iNdEx + skippy) > l {
  1122  				return io.ErrUnexpectedEOF
  1123  			}
  1124  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1125  			iNdEx += skippy
  1126  		}
  1127  	}
  1128  
  1129  	if iNdEx > l {
  1130  		return io.ErrUnexpectedEOF
  1131  	}
  1132  	return nil
  1133  }
  1134  func (m *GetUserInfoResponse) Unmarshal(dAtA []byte) error {
  1135  	l := len(dAtA)
  1136  	iNdEx := 0
  1137  	for iNdEx < l {
  1138  		preIndex := iNdEx
  1139  		var wire uint64
  1140  		for shift := uint(0); ; shift += 7 {
  1141  			if shift >= 64 {
  1142  				return ErrIntOverflowSession
  1143  			}
  1144  			if iNdEx >= l {
  1145  				return io.ErrUnexpectedEOF
  1146  			}
  1147  			b := dAtA[iNdEx]
  1148  			iNdEx++
  1149  			wire |= uint64(b&0x7F) << shift
  1150  			if b < 0x80 {
  1151  				break
  1152  			}
  1153  		}
  1154  		fieldNum := int32(wire >> 3)
  1155  		wireType := int(wire & 0x7)
  1156  		if wireType == 4 {
  1157  			return fmt.Errorf("proto: GetUserInfoResponse: wiretype end group for non-group")
  1158  		}
  1159  		if fieldNum <= 0 {
  1160  			return fmt.Errorf("proto: GetUserInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1161  		}
  1162  		switch fieldNum {
  1163  		case 1:
  1164  			if wireType != 0 {
  1165  				return fmt.Errorf("proto: wrong wireType = %d for field LoggedIn", wireType)
  1166  			}
  1167  			var v int
  1168  			for shift := uint(0); ; shift += 7 {
  1169  				if shift >= 64 {
  1170  					return ErrIntOverflowSession
  1171  				}
  1172  				if iNdEx >= l {
  1173  					return io.ErrUnexpectedEOF
  1174  				}
  1175  				b := dAtA[iNdEx]
  1176  				iNdEx++
  1177  				v |= int(b&0x7F) << shift
  1178  				if b < 0x80 {
  1179  					break
  1180  				}
  1181  			}
  1182  			m.LoggedIn = bool(v != 0)
  1183  		case 2:
  1184  			if wireType != 2 {
  1185  				return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
  1186  			}
  1187  			var stringLen uint64
  1188  			for shift := uint(0); ; shift += 7 {
  1189  				if shift >= 64 {
  1190  					return ErrIntOverflowSession
  1191  				}
  1192  				if iNdEx >= l {
  1193  					return io.ErrUnexpectedEOF
  1194  				}
  1195  				b := dAtA[iNdEx]
  1196  				iNdEx++
  1197  				stringLen |= uint64(b&0x7F) << shift
  1198  				if b < 0x80 {
  1199  					break
  1200  				}
  1201  			}
  1202  			intStringLen := int(stringLen)
  1203  			if intStringLen < 0 {
  1204  				return ErrInvalidLengthSession
  1205  			}
  1206  			postIndex := iNdEx + intStringLen
  1207  			if postIndex < 0 {
  1208  				return ErrInvalidLengthSession
  1209  			}
  1210  			if postIndex > l {
  1211  				return io.ErrUnexpectedEOF
  1212  			}
  1213  			m.Username = string(dAtA[iNdEx:postIndex])
  1214  			iNdEx = postIndex
  1215  		case 3:
  1216  			if wireType != 2 {
  1217  				return fmt.Errorf("proto: wrong wireType = %d for field Iss", wireType)
  1218  			}
  1219  			var stringLen uint64
  1220  			for shift := uint(0); ; shift += 7 {
  1221  				if shift >= 64 {
  1222  					return ErrIntOverflowSession
  1223  				}
  1224  				if iNdEx >= l {
  1225  					return io.ErrUnexpectedEOF
  1226  				}
  1227  				b := dAtA[iNdEx]
  1228  				iNdEx++
  1229  				stringLen |= uint64(b&0x7F) << shift
  1230  				if b < 0x80 {
  1231  					break
  1232  				}
  1233  			}
  1234  			intStringLen := int(stringLen)
  1235  			if intStringLen < 0 {
  1236  				return ErrInvalidLengthSession
  1237  			}
  1238  			postIndex := iNdEx + intStringLen
  1239  			if postIndex < 0 {
  1240  				return ErrInvalidLengthSession
  1241  			}
  1242  			if postIndex > l {
  1243  				return io.ErrUnexpectedEOF
  1244  			}
  1245  			m.Iss = string(dAtA[iNdEx:postIndex])
  1246  			iNdEx = postIndex
  1247  		case 4:
  1248  			if wireType != 2 {
  1249  				return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
  1250  			}
  1251  			var stringLen uint64
  1252  			for shift := uint(0); ; shift += 7 {
  1253  				if shift >= 64 {
  1254  					return ErrIntOverflowSession
  1255  				}
  1256  				if iNdEx >= l {
  1257  					return io.ErrUnexpectedEOF
  1258  				}
  1259  				b := dAtA[iNdEx]
  1260  				iNdEx++
  1261  				stringLen |= uint64(b&0x7F) << shift
  1262  				if b < 0x80 {
  1263  					break
  1264  				}
  1265  			}
  1266  			intStringLen := int(stringLen)
  1267  			if intStringLen < 0 {
  1268  				return ErrInvalidLengthSession
  1269  			}
  1270  			postIndex := iNdEx + intStringLen
  1271  			if postIndex < 0 {
  1272  				return ErrInvalidLengthSession
  1273  			}
  1274  			if postIndex > l {
  1275  				return io.ErrUnexpectedEOF
  1276  			}
  1277  			m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
  1278  			iNdEx = postIndex
  1279  		default:
  1280  			iNdEx = preIndex
  1281  			skippy, err := skipSession(dAtA[iNdEx:])
  1282  			if err != nil {
  1283  				return err
  1284  			}
  1285  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1286  				return ErrInvalidLengthSession
  1287  			}
  1288  			if (iNdEx + skippy) > l {
  1289  				return io.ErrUnexpectedEOF
  1290  			}
  1291  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1292  			iNdEx += skippy
  1293  		}
  1294  	}
  1295  
  1296  	if iNdEx > l {
  1297  		return io.ErrUnexpectedEOF
  1298  	}
  1299  	return nil
  1300  }
  1301  func skipSession(dAtA []byte) (n int, err error) {
  1302  	l := len(dAtA)
  1303  	iNdEx := 0
  1304  	depth := 0
  1305  	for iNdEx < l {
  1306  		var wire uint64
  1307  		for shift := uint(0); ; shift += 7 {
  1308  			if shift >= 64 {
  1309  				return 0, ErrIntOverflowSession
  1310  			}
  1311  			if iNdEx >= l {
  1312  				return 0, io.ErrUnexpectedEOF
  1313  			}
  1314  			b := dAtA[iNdEx]
  1315  			iNdEx++
  1316  			wire |= (uint64(b) & 0x7F) << shift
  1317  			if b < 0x80 {
  1318  				break
  1319  			}
  1320  		}
  1321  		wireType := int(wire & 0x7)
  1322  		switch wireType {
  1323  		case 0:
  1324  			for shift := uint(0); ; shift += 7 {
  1325  				if shift >= 64 {
  1326  					return 0, ErrIntOverflowSession
  1327  				}
  1328  				if iNdEx >= l {
  1329  					return 0, io.ErrUnexpectedEOF
  1330  				}
  1331  				iNdEx++
  1332  				if dAtA[iNdEx-1] < 0x80 {
  1333  					break
  1334  				}
  1335  			}
  1336  		case 1:
  1337  			iNdEx += 8
  1338  		case 2:
  1339  			var length int
  1340  			for shift := uint(0); ; shift += 7 {
  1341  				if shift >= 64 {
  1342  					return 0, ErrIntOverflowSession
  1343  				}
  1344  				if iNdEx >= l {
  1345  					return 0, io.ErrUnexpectedEOF
  1346  				}
  1347  				b := dAtA[iNdEx]
  1348  				iNdEx++
  1349  				length |= (int(b) & 0x7F) << shift
  1350  				if b < 0x80 {
  1351  					break
  1352  				}
  1353  			}
  1354  			if length < 0 {
  1355  				return 0, ErrInvalidLengthSession
  1356  			}
  1357  			iNdEx += length
  1358  		case 3:
  1359  			depth++
  1360  		case 4:
  1361  			if depth == 0 {
  1362  				return 0, ErrUnexpectedEndOfGroupSession
  1363  			}
  1364  			depth--
  1365  		case 5:
  1366  			iNdEx += 4
  1367  		default:
  1368  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1369  		}
  1370  		if iNdEx < 0 {
  1371  			return 0, ErrInvalidLengthSession
  1372  		}
  1373  		if depth == 0 {
  1374  			return iNdEx, nil
  1375  		}
  1376  	}
  1377  	return 0, io.ErrUnexpectedEOF
  1378  }
  1379  
  1380  var (
  1381  	ErrInvalidLengthSession        = fmt.Errorf("proto: negative length found during unmarshaling")
  1382  	ErrIntOverflowSession          = fmt.Errorf("proto: integer overflow")
  1383  	ErrUnexpectedEndOfGroupSession = fmt.Errorf("proto: unexpected end of group")
  1384  )