mirror of
https://github.com/hanzoai/cd.git
synced 2026-10-30 14:56:45 +00:00
repository.proto and 11 sibling hand-written .proto files referenced generated.proto's application/v1alpha1 types under the pre-fork package path (github.com.argoproj.argo_cd.v3...); protoc silently kept compiling because generated.proto still carried that same stale package too. Point both at the real, mechanically-derived path (github.com.hanzoai.cd.pkg.apis.application.v1alpha1, no v3 segment) and regenerate everything protoc/go-to-protobuf own: generated.proto/pb.go, every pkg/apiclient and reposerver/cmpserver/commitserver *.pb.go, assets/swagger.json, and the CRD manifests. That regeneration surfaced a second, unrelated bug: hack/gen-crd-spec stamped app.kubernetes.io/part-of: cd on the CRDs, but util/settings.isSettingsObject (and the ConfigMap informer built on it) only ever recognizes part-of=hanzocd. The same wrong "cd" value was baked into cmd/cd/commands/admin/settings.go's setSettingsMeta and the shared test/testdata.go fixtures ~30 files import — util/settings' own test suite was panicking on an empty slice because its fixture was invisible to the informer it was supposedly seeding. Fixed the label everywhere it's produced or asserted in the settings path; left the ~90 unrelated part-of:"cd" literals in other packages' local test fixtures alone since they never touch this selector. Also dropped 25 "TODO: Remove deprecated <dead upstream issue link>" comments that duplicated the real explanation already sitting one line away (a proper `Deprecated:` godoc, a cobra Deprecated field, or a nolint:staticcheck marker) — kept the explanation, dropped the link, per the standing rule for these citations. And repointed the two Grafana dashboards' job selector from argocd-server-metrics, a Service the manifests never create, to hanzocd-server-metrics, the one they do.
1384 lines
36 KiB
Go
Generated
1384 lines
36 KiB
Go
Generated
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: server/session/session.proto
|
|
|
|
// Session Service
|
|
//
|
|
// Session Service API performs CRUD actions against session resources
|
|
|
|
package session
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// SessionCreateRequest is for logging in.
|
|
type SessionCreateRequest struct {
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
|
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SessionCreateRequest) Reset() { *m = SessionCreateRequest{} }
|
|
func (m *SessionCreateRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*SessionCreateRequest) ProtoMessage() {}
|
|
func (*SessionCreateRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_87870a51a62685ed, []int{0}
|
|
}
|
|
func (m *SessionCreateRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SessionCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SessionCreateRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SessionCreateRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SessionCreateRequest.Merge(m, src)
|
|
}
|
|
func (m *SessionCreateRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SessionCreateRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SessionCreateRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SessionCreateRequest proto.InternalMessageInfo
|
|
|
|
func (m *SessionCreateRequest) GetUsername() string {
|
|
if m != nil {
|
|
return m.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SessionCreateRequest) GetPassword() string {
|
|
if m != nil {
|
|
return m.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SessionCreateRequest) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// SessionDeleteRequest is for logging out.
|
|
type SessionDeleteRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SessionDeleteRequest) Reset() { *m = SessionDeleteRequest{} }
|
|
func (m *SessionDeleteRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*SessionDeleteRequest) ProtoMessage() {}
|
|
func (*SessionDeleteRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_87870a51a62685ed, []int{1}
|
|
}
|
|
func (m *SessionDeleteRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SessionDeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SessionDeleteRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SessionDeleteRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SessionDeleteRequest.Merge(m, src)
|
|
}
|
|
func (m *SessionDeleteRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SessionDeleteRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SessionDeleteRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SessionDeleteRequest proto.InternalMessageInfo
|
|
|
|
// SessionResponse wraps the created token or returns an empty string if deleted.
|
|
type SessionResponse struct {
|
|
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SessionResponse) Reset() { *m = SessionResponse{} }
|
|
func (m *SessionResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*SessionResponse) ProtoMessage() {}
|
|
func (*SessionResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_87870a51a62685ed, []int{2}
|
|
}
|
|
func (m *SessionResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SessionResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SessionResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SessionResponse.Merge(m, src)
|
|
}
|
|
func (m *SessionResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SessionResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SessionResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SessionResponse proto.InternalMessageInfo
|
|
|
|
func (m *SessionResponse) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Get the current user's userInfo info
|
|
type GetUserInfoRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *GetUserInfoRequest) Reset() { *m = GetUserInfoRequest{} }
|
|
func (m *GetUserInfoRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*GetUserInfoRequest) ProtoMessage() {}
|
|
func (*GetUserInfoRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_87870a51a62685ed, []int{3}
|
|
}
|
|
func (m *GetUserInfoRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetUserInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetUserInfoRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GetUserInfoRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetUserInfoRequest.Merge(m, src)
|
|
}
|
|
func (m *GetUserInfoRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetUserInfoRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetUserInfoRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetUserInfoRequest proto.InternalMessageInfo
|
|
|
|
// The current user's userInfo info
|
|
type GetUserInfoResponse struct {
|
|
LoggedIn bool `protobuf:"varint,1,opt,name=loggedIn,proto3" json:"loggedIn,omitempty"`
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
|
Iss string `protobuf:"bytes,3,opt,name=iss,proto3" json:"iss,omitempty"`
|
|
Groups []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) Reset() { *m = GetUserInfoResponse{} }
|
|
func (m *GetUserInfoResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*GetUserInfoResponse) ProtoMessage() {}
|
|
func (*GetUserInfoResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_87870a51a62685ed, []int{4}
|
|
}
|
|
func (m *GetUserInfoResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetUserInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetUserInfoResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GetUserInfoResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetUserInfoResponse.Merge(m, src)
|
|
}
|
|
func (m *GetUserInfoResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetUserInfoResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetUserInfoResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetUserInfoResponse proto.InternalMessageInfo
|
|
|
|
func (m *GetUserInfoResponse) GetLoggedIn() bool {
|
|
if m != nil {
|
|
return m.LoggedIn
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) GetUsername() string {
|
|
if m != nil {
|
|
return m.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) GetIss() string {
|
|
if m != nil {
|
|
return m.Iss
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) GetGroups() []string {
|
|
if m != nil {
|
|
return m.Groups
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*SessionCreateRequest)(nil), "session.SessionCreateRequest")
|
|
proto.RegisterType((*SessionDeleteRequest)(nil), "session.SessionDeleteRequest")
|
|
proto.RegisterType((*SessionResponse)(nil), "session.SessionResponse")
|
|
proto.RegisterType((*GetUserInfoRequest)(nil), "session.GetUserInfoRequest")
|
|
proto.RegisterType((*GetUserInfoResponse)(nil), "session.GetUserInfoResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("server/session/session.proto", fileDescriptor_87870a51a62685ed) }
|
|
|
|
var fileDescriptor_87870a51a62685ed = []byte{
|
|
// 398 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xdf, 0x0a, 0xd3, 0x30,
|
|
0x18, 0xc5, 0x69, 0xa7, 0x75, 0xcb, 0x50, 0x47, 0x56, 0x4a, 0xa9, 0x75, 0x8c, 0xde, 0x38, 0x26,
|
|
0xac, 0xa8, 0x57, 0x7a, 0xa9, 0x82, 0xec, 0xb6, 0x43, 0x41, 0xef, 0xb2, 0xf6, 0x5b, 0x17, 0xd6,
|
|
0x25, 0x35, 0x49, 0x37, 0xf0, 0xd2, 0x57, 0xf0, 0x31, 0x7c, 0x11, 0x2f, 0x05, 0x5f, 0x40, 0x86,
|
|
0x0f, 0x22, 0x6d, 0xda, 0xda, 0xfd, 0xc1, 0xab, 0xf6, 0xe4, 0x4b, 0x7e, 0xe7, 0x84, 0x13, 0xe4,
|
|
0x4b, 0x10, 0x07, 0x10, 0xa1, 0x04, 0x29, 0x29, 0x67, 0xcd, 0x77, 0x91, 0x0b, 0xae, 0x38, 0xbe,
|
|
0x57, 0x4b, 0xcf, 0x4f, 0x39, 0x4f, 0x33, 0x08, 0x49, 0x4e, 0x43, 0xc2, 0x18, 0x57, 0x44, 0x51,
|
|
0xce, 0xa4, 0xde, 0x16, 0x24, 0xc8, 0x5e, 0xe9, 0x8d, 0x6f, 0x04, 0x10, 0x05, 0x11, 0x7c, 0x2e,
|
|
0x40, 0x2a, 0xec, 0xa1, 0x7e, 0x21, 0x41, 0x30, 0xb2, 0x07, 0xd7, 0x98, 0x1a, 0xb3, 0x41, 0xd4,
|
|
0xea, 0x72, 0x96, 0x13, 0x29, 0x8f, 0x5c, 0x24, 0xae, 0xa9, 0x67, 0x8d, 0xc6, 0x36, 0xba, 0xab,
|
|
0xf8, 0x0e, 0x98, 0xdb, 0xab, 0x06, 0x5a, 0x04, 0x4e, 0xeb, 0xf2, 0x16, 0x32, 0x68, 0x5d, 0x82,
|
|
0x27, 0xe8, 0x61, 0xbd, 0x1e, 0x81, 0xcc, 0x39, 0x93, 0xf0, 0x0f, 0x60, 0x74, 0x01, 0x36, 0xc2,
|
|
0xef, 0x40, 0xbd, 0x97, 0x20, 0x96, 0x6c, 0xc3, 0x9b, 0xe3, 0x47, 0x34, 0x3e, 0x5b, 0xad, 0x11,
|
|
0x1e, 0xea, 0x67, 0x3c, 0x4d, 0x21, 0x59, 0x6a, 0x4a, 0x3f, 0x6a, 0xf5, 0xd9, 0xbd, 0xcc, 0x8b,
|
|
0x7b, 0x8d, 0x50, 0x8f, 0x4a, 0x59, 0x27, 0x2f, 0x7f, 0xb1, 0x83, 0xac, 0x54, 0xf0, 0x22, 0x97,
|
|
0xee, 0x9d, 0x69, 0x6f, 0x36, 0x88, 0x6a, 0xf5, 0xfc, 0xbb, 0x89, 0x1e, 0xd4, 0xc1, 0x57, 0x20,
|
|
0x0e, 0x34, 0x06, 0xbc, 0x41, 0xc3, 0x4e, 0x16, 0xfc, 0x68, 0xd1, 0xd4, 0x71, 0x9d, 0xdb, 0xf3,
|
|
0x6f, 0x0f, 0x75, 0xfc, 0xc0, 0xff, 0xfa, 0xeb, 0xcf, 0x37, 0xd3, 0xc1, 0x76, 0x78, 0x78, 0xd6,
|
|
0x96, 0x5b, 0x86, 0xa4, 0x25, 0xf8, 0x23, 0xb2, 0x74, 0x53, 0xf8, 0x71, 0x4b, 0xb9, 0xd5, 0xa0,
|
|
0xe7, 0x5e, 0x8e, 0x5b, 0x03, 0xa7, 0x32, 0x18, 0x05, 0xc3, 0x8e, 0xc1, 0x2b, 0x63, 0x8e, 0x3f,
|
|
0x20, 0x4b, 0xd7, 0x73, 0x8d, 0x3e, 0xab, 0xed, 0x3f, 0xe8, 0x71, 0x85, 0xbe, 0x3f, 0xef, 0xa2,
|
|
0x5f, 0xbf, 0xfc, 0x71, 0x9a, 0x18, 0x3f, 0x4f, 0x13, 0xe3, 0xf7, 0x69, 0x62, 0x7c, 0x7a, 0x9a,
|
|
0x52, 0xb5, 0x2d, 0xd6, 0x8b, 0x98, 0xef, 0xc3, 0x2d, 0x61, 0x5f, 0x38, 0xa1, 0x61, 0x9c, 0x84,
|
|
0xf9, 0x2e, 0x2d, 0x9f, 0x68, 0x9c, 0x51, 0x60, 0xaa, 0x39, 0xba, 0xb6, 0xaa, 0x57, 0xfa, 0xe2,
|
|
0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xdc, 0x16, 0x41, 0xec, 0x02, 0x00, 0x00,
|
|
}
|
|
|
|
// 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
|
|
|
|
// SessionServiceClient is the client API for SessionService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type SessionServiceClient interface {
|
|
// Get the current user's info
|
|
GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error)
|
|
// Create a new JWT for authentication and set a cookie if using HTTP
|
|
Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error)
|
|
// Delete an existing JWT cookie if using HTTP
|
|
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) GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error) {
|
|
out := new(GetUserInfoResponse)
|
|
err := c.cc.Invoke(ctx, "/session.SessionService/GetUserInfo", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *sessionServiceClient) Create(ctx context.Context, in *SessionCreateRequest, opts ...grpc.CallOption) (*SessionResponse, error) {
|
|
out := new(SessionResponse)
|
|
err := c.cc.Invoke(ctx, "/session.SessionService/Create", in, out, 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 := c.cc.Invoke(ctx, "/session.SessionService/Delete", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// SessionServiceServer is the server API for SessionService service.
|
|
type SessionServiceServer interface {
|
|
// Get the current user's info
|
|
GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error)
|
|
// Create a new JWT for authentication and set a cookie if using HTTP
|
|
Create(context.Context, *SessionCreateRequest) (*SessionResponse, error)
|
|
// Delete an existing JWT cookie if using HTTP
|
|
Delete(context.Context, *SessionDeleteRequest) (*SessionResponse, error)
|
|
}
|
|
|
|
// UnimplementedSessionServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedSessionServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedSessionServiceServer) GetUserInfo(ctx context.Context, req *GetUserInfoRequest) (*GetUserInfoResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
|
|
}
|
|
func (*UnimplementedSessionServiceServer) Create(ctx context.Context, req *SessionCreateRequest) (*SessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
|
}
|
|
func (*UnimplementedSessionServiceServer) Delete(ctx context.Context, req *SessionDeleteRequest) (*SessionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
}
|
|
|
|
func RegisterSessionServiceServer(s *grpc.Server, srv SessionServiceServer) {
|
|
s.RegisterService(&_SessionService_serviceDesc, srv)
|
|
}
|
|
|
|
func _SessionService_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserInfoRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(SessionServiceServer).GetUserInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/session.SessionService/GetUserInfo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(SessionServiceServer).GetUserInfo(ctx, req.(*GetUserInfoRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
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: "GetUserInfo",
|
|
Handler: _SessionService_GetUserInfo_Handler,
|
|
},
|
|
{
|
|
MethodName: "Create",
|
|
Handler: _SessionService_Create_Handler,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _SessionService_Delete_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "server/session/session.proto",
|
|
}
|
|
|
|
func (m *SessionCreateRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SessionCreateRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SessionCreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Token) > 0 {
|
|
i -= len(m.Token)
|
|
copy(dAtA[i:], m.Token)
|
|
i = encodeVarintSession(dAtA, i, uint64(len(m.Token)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Password) > 0 {
|
|
i -= len(m.Password)
|
|
copy(dAtA[i:], m.Password)
|
|
i = encodeVarintSession(dAtA, i, uint64(len(m.Password)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Username) > 0 {
|
|
i -= len(m.Username)
|
|
copy(dAtA[i:], m.Username)
|
|
i = encodeVarintSession(dAtA, i, uint64(len(m.Username)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *SessionDeleteRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SessionDeleteRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SessionDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *SessionResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SessionResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SessionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Token) > 0 {
|
|
i -= len(m.Token)
|
|
copy(dAtA[i:], m.Token)
|
|
i = encodeVarintSession(dAtA, i, uint64(len(m.Token)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GetUserInfoRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetUserInfoRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GetUserInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Groups) > 0 {
|
|
for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Groups[iNdEx])
|
|
copy(dAtA[i:], m.Groups[iNdEx])
|
|
i = encodeVarintSession(dAtA, i, uint64(len(m.Groups[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if len(m.Iss) > 0 {
|
|
i -= len(m.Iss)
|
|
copy(dAtA[i:], m.Iss)
|
|
i = encodeVarintSession(dAtA, i, uint64(len(m.Iss)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Username) > 0 {
|
|
i -= len(m.Username)
|
|
copy(dAtA[i:], m.Username)
|
|
i = encodeVarintSession(dAtA, i, uint64(len(m.Username)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.LoggedIn {
|
|
i--
|
|
if m.LoggedIn {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintSession(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovSession(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *SessionCreateRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Username)
|
|
if l > 0 {
|
|
n += 1 + l + sovSession(uint64(l))
|
|
}
|
|
l = len(m.Password)
|
|
if l > 0 {
|
|
n += 1 + l + sovSession(uint64(l))
|
|
}
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovSession(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SessionDeleteRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *SessionResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovSession(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetUserInfoRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetUserInfoResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.LoggedIn {
|
|
n += 2
|
|
}
|
|
l = len(m.Username)
|
|
if l > 0 {
|
|
n += 1 + l + sovSession(uint64(l))
|
|
}
|
|
l = len(m.Iss)
|
|
if l > 0 {
|
|
n += 1 + l + sovSession(uint64(l))
|
|
}
|
|
if len(m.Groups) > 0 {
|
|
for _, s := range m.Groups {
|
|
l = len(s)
|
|
n += 1 + l + sovSession(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovSession(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozSession(x uint64) (n int) {
|
|
return sovSession(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *SessionCreateRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: SessionCreateRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SessionCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Username = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Password = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSession(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *SessionDeleteRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: SessionDeleteRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SessionDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSession(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *SessionResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: SessionResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SessionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSession(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetUserInfoRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GetUserInfoRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetUserInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSession(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetUserInfoResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GetUserInfoResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetUserInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LoggedIn", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.LoggedIn = bool(v != 0)
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Username = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Iss", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Iss = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSession(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthSession
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipSession(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSession
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthSession
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupSession
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthSession
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthSession = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowSession = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupSession = fmt.Errorf("proto: unexpected end of group")
|
|
)
|