1386 lines
35 KiB
Go
1386 lines
35 KiB
Go
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||
|
// source: session/v2/service.proto
|
||
|
|
||
|
package v2
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
fmt "fmt"
|
||
|
proto "github.com/golang/protobuf/proto"
|
||
|
v21 "github.com/nspcc-dev/neofs-api-go/refs/v2"
|
||
|
v2 "github.com/nspcc-dev/neofs-api-go/service/v2"
|
||
|
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||
|
|
||
|
// CreateRequest carries an information necessary for opening a session.v2.
|
||
|
type CreateRequest struct {
|
||
|
// Body of create session token request message.
|
||
|
Body *CreateRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
|
||
|
// Carries request meta information. Header data is used only to regulate message
|
||
|
// transport and does not affect request execution.
|
||
|
MetaHeader *v2.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"`
|
||
|
// Carries request verification information. This header is used to authenticate
|
||
|
// the nodes of the message route and check the correctness of transmission.
|
||
|
VerifyHeader *v2.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest) Reset() { *m = CreateRequest{} }
|
||
|
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
|
||
|
func (*CreateRequest) ProtoMessage() {}
|
||
|
func (*CreateRequest) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_dc9d885cd3f2324e, []int{0}
|
||
|
}
|
||
|
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_CreateRequest.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 *CreateRequest) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_CreateRequest.Merge(m, src)
|
||
|
}
|
||
|
func (m *CreateRequest) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *CreateRequest) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_CreateRequest.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_CreateRequest proto.InternalMessageInfo
|
||
|
|
||
|
func (m *CreateRequest) GetBody() *CreateRequest_Body {
|
||
|
if m != nil {
|
||
|
return m.Body
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest) GetMetaHeader() *v2.RequestMetaHeader {
|
||
|
if m != nil {
|
||
|
return m.MetaHeader
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest) GetVerifyHeader() *v2.RequestVerificationHeader {
|
||
|
if m != nil {
|
||
|
return m.VerifyHeader
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type CreateRequest_Body struct {
|
||
|
// Carries an identifier of a session initiator.
|
||
|
OwnerId *v21.OwnerID `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
||
|
// Carries a lifetime of the session.v2.
|
||
|
Lifetime *v2.TokenLifetime `protobuf:"bytes,2,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest_Body) Reset() { *m = CreateRequest_Body{} }
|
||
|
func (m *CreateRequest_Body) String() string { return proto.CompactTextString(m) }
|
||
|
func (*CreateRequest_Body) ProtoMessage() {}
|
||
|
func (*CreateRequest_Body) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_dc9d885cd3f2324e, []int{0, 0}
|
||
|
}
|
||
|
func (m *CreateRequest_Body) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *CreateRequest_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_CreateRequest_Body.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 *CreateRequest_Body) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_CreateRequest_Body.Merge(m, src)
|
||
|
}
|
||
|
func (m *CreateRequest_Body) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *CreateRequest_Body) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_CreateRequest_Body.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_CreateRequest_Body proto.InternalMessageInfo
|
||
|
|
||
|
func (m *CreateRequest_Body) GetOwnerId() *v21.OwnerID {
|
||
|
if m != nil {
|
||
|
return m.OwnerId
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest_Body) GetLifetime() *v2.TokenLifetime {
|
||
|
if m != nil {
|
||
|
return m.Lifetime
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// CreateResponse carries an information about the opened session.v2.
|
||
|
type CreateResponse struct {
|
||
|
// Body of create session token response message.
|
||
|
Body *CreateResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
|
||
|
// Carries response meta information. Header data is used only to regulate
|
||
|
// message transport and does not affect request execution.
|
||
|
MetaHeader *v2.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"`
|
||
|
// Carries response verification information. This header is used to
|
||
|
// authenticate the nodes of the message route and check the correctness
|
||
|
// of transmission.
|
||
|
VerifyHeader *v2.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse) Reset() { *m = CreateResponse{} }
|
||
|
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
|
||
|
func (*CreateResponse) ProtoMessage() {}
|
||
|
func (*CreateResponse) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_dc9d885cd3f2324e, []int{1}
|
||
|
}
|
||
|
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_CreateResponse.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 *CreateResponse) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_CreateResponse.Merge(m, src)
|
||
|
}
|
||
|
func (m *CreateResponse) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *CreateResponse) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_CreateResponse.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_CreateResponse proto.InternalMessageInfo
|
||
|
|
||
|
func (m *CreateResponse) GetBody() *CreateResponse_Body {
|
||
|
if m != nil {
|
||
|
return m.Body
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse) GetMetaHeader() *v2.ResponseMetaHeader {
|
||
|
if m != nil {
|
||
|
return m.MetaHeader
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse) GetVerifyHeader() *v2.ResponseVerificationHeader {
|
||
|
if m != nil {
|
||
|
return m.VerifyHeader
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type CreateResponse_Body struct {
|
||
|
// id carries an identifier of session token.
|
||
|
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||
|
// session_key carries a session public key.
|
||
|
SessionKey []byte `protobuf:"bytes,2,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"`
|
||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||
|
XXX_unrecognized []byte `json:"-"`
|
||
|
XXX_sizecache int32 `json:"-"`
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse_Body) Reset() { *m = CreateResponse_Body{} }
|
||
|
func (m *CreateResponse_Body) String() string { return proto.CompactTextString(m) }
|
||
|
func (*CreateResponse_Body) ProtoMessage() {}
|
||
|
func (*CreateResponse_Body) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_dc9d885cd3f2324e, []int{1, 0}
|
||
|
}
|
||
|
func (m *CreateResponse_Body) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *CreateResponse_Body) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_CreateResponse_Body.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 *CreateResponse_Body) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_CreateResponse_Body.Merge(m, src)
|
||
|
}
|
||
|
func (m *CreateResponse_Body) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *CreateResponse_Body) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_CreateResponse_Body.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_CreateResponse_Body proto.InternalMessageInfo
|
||
|
|
||
|
func (m *CreateResponse_Body) GetId() []byte {
|
||
|
if m != nil {
|
||
|
return m.Id
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse_Body) GetSessionKey() []byte {
|
||
|
if m != nil {
|
||
|
return m.SessionKey
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*CreateRequest)(nil), "session.v2.CreateRequest")
|
||
|
proto.RegisterType((*CreateRequest_Body)(nil), "session.v2.CreateRequest.Body")
|
||
|
proto.RegisterType((*CreateResponse)(nil), "session.v2.CreateResponse")
|
||
|
proto.RegisterType((*CreateResponse_Body)(nil), "session.v2.CreateResponse.Body")
|
||
|
}
|
||
|
|
||
|
func init() { proto.RegisterFile("session/v2/service.proto", fileDescriptor_dc9d885cd3f2324e) }
|
||
|
|
||
|
var fileDescriptor_dc9d885cd3f2324e = []byte{
|
||
|
// 448 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xdf, 0x8a, 0xd3, 0x40,
|
||
|
0x14, 0xc6, 0x4d, 0x5c, 0x76, 0x97, 0x69, 0x77, 0xd1, 0x11, 0xb1, 0x1b, 0x30, 0x2b, 0x0b, 0x8a,
|
||
|
0xa0, 0x9d, 0x40, 0x16, 0xf1, 0xce, 0x62, 0x15, 0xb1, 0xad, 0xff, 0x98, 0x8a, 0x17, 0xde, 0x94,
|
||
|
0x34, 0x39, 0x69, 0xc7, 0x9a, 0x4c, 0xcc, 0x4c, 0x23, 0x79, 0x07, 0x1f, 0xc0, 0x67, 0xf0, 0x15,
|
||
|
0x7c, 0x01, 0x2f, 0x7d, 0x04, 0xa9, 0x2f, 0x22, 0x93, 0x99, 0xf4, 0x0f, 0xa4, 0x78, 0x97, 0x99,
|
||
|
0xf9, 0xce, 0x77, 0xbe, 0xf3, 0xe3, 0x04, 0x75, 0x04, 0x08, 0xc1, 0x78, 0xea, 0x15, 0xbe, 0x27,
|
||
|
0x20, 0x2f, 0x58, 0x08, 0x24, 0xcb, 0xb9, 0xe4, 0x18, 0x99, 0x17, 0x52, 0xf8, 0xce, 0x8d, 0x1c,
|
||
|
0x62, 0xa1, 0x24, 0xb2, 0xcc, 0x40, 0x68, 0x81, 0x73, 0xd3, 0xe8, 0xd5, 0x7d, 0x02, 0x32, 0x30,
|
||
|
0xd7, 0xb7, 0xb6, 0xae, 0x0b, 0xc8, 0x59, 0x5c, 0xea, 0x87, 0x8b, 0x9f, 0x36, 0x3a, 0x79, 0x96,
|
||
|
0x43, 0x20, 0x81, 0xc2, 0x97, 0x25, 0x08, 0x89, 0x7d, 0x74, 0x30, 0xe5, 0x51, 0xd9, 0xb1, 0xee,
|
||
|
0x58, 0xf7, 0x5b, 0xbe, 0x4b, 0x36, 0x1d, 0xc9, 0x8e, 0x90, 0xf4, 0x79, 0x54, 0xd2, 0x4a, 0x8b,
|
||
|
0x9f, 0xa0, 0x96, 0x6a, 0x36, 0x99, 0x43, 0x10, 0x41, 0xde, 0xb1, 0xab, 0xd2, 0xdb, 0xa4, 0xce,
|
||
|
0x5e, 0xf8, 0xc4, 0x14, 0xbd, 0x06, 0x19, 0xbc, 0xac, 0x44, 0x14, 0x25, 0xeb, 0x6f, 0x3c, 0x44,
|
||
|
0x27, 0x3a, 0x55, 0xed, 0x70, 0xb5, 0x72, 0xb8, 0xdb, 0xe0, 0xf0, 0x41, 0xe9, 0x58, 0x18, 0x48,
|
||
|
0xc6, 0x53, 0xe3, 0xd4, 0xd6, 0xb5, 0xfa, 0xe4, 0x7c, 0x42, 0x07, 0x2a, 0x19, 0x7e, 0x80, 0x8e,
|
||
|
0xf9, 0xd7, 0x14, 0xf2, 0x09, 0x8b, 0xcc, 0x2c, 0xd7, 0x88, 0x22, 0xa6, 0xbc, 0xde, 0xaa, 0x87,
|
||
|
0xc1, 0x73, 0x7a, 0x54, 0x29, 0x06, 0x11, 0x7e, 0x84, 0x8e, 0x3f, 0xb3, 0x18, 0x24, 0x4b, 0xc0,
|
||
|
0xa4, 0x3f, 0xdb, 0xee, 0xfd, 0x9e, 0x2f, 0x20, 0x7d, 0x65, 0x04, 0x74, 0x2d, 0xbd, 0xf8, 0x66,
|
||
|
0xa3, 0xd3, 0x1a, 0x8a, 0xc8, 0x78, 0x2a, 0x00, 0x5f, 0xee, 0xe0, 0x3b, 0x6f, 0xc2, 0xa7, 0x95,
|
||
|
0xdb, 0xfc, 0x7a, 0x4d, 0xfc, 0xdc, 0xdd, 0xe9, 0x75, 0xd5, 0x1e, 0x80, 0xa3, 0x66, 0x80, 0xf7,
|
||
|
0x9a, 0x2c, 0xfe, 0x4b, 0xf0, 0xb1, 0x21, 0x78, 0x8a, 0x6c, 0xc3, 0xae, 0x4d, 0x6d, 0x16, 0xe1,
|
||
|
0x73, 0xd4, 0x32, 0xd3, 0x4c, 0x16, 0x50, 0x56, 0x29, 0xdb, 0xb4, 0xde, 0xc8, 0x11, 0x94, 0xfe,
|
||
|
0x10, 0x1d, 0x8d, 0xf5, 0x09, 0xf7, 0xd0, 0xa1, 0x1e, 0x17, 0x9f, 0xed, 0xdd, 0x20, 0xc7, 0xd9,
|
||
|
0x4f, 0xa7, 0x4f, 0x7f, 0xad, 0x5c, 0xeb, 0xf7, 0xca, 0xb5, 0xfe, 0xac, 0x5c, 0xeb, 0xfb, 0x5f,
|
||
|
0xf7, 0xca, 0xc7, 0x87, 0x33, 0x26, 0xe7, 0xcb, 0x29, 0x09, 0x79, 0xe2, 0xa5, 0x22, 0x0b, 0xc3,
|
||
|
0x6e, 0x04, 0x85, 0x97, 0x02, 0x8f, 0x45, 0x37, 0xc8, 0x58, 0x77, 0xc6, 0xbd, 0xcd, 0x7f, 0xf3,
|
||
|
0xc3, 0xbe, 0xfe, 0x06, 0xf8, 0x8b, 0x31, 0x79, 0xfa, 0x6e, 0x40, 0x4c, 0xa8, 0xe9, 0x61, 0xb5,
|
||
|
0xf3, 0x97, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x41, 0x43, 0x09, 0xb3, 0x60, 0x03, 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
|
||
|
|
||
|
// SessionClient is the client API for Session service.
|
||
|
//
|
||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||
|
type SessionClient interface {
|
||
|
// Create opens new session between the client and the server.
|
||
|
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
|
||
|
}
|
||
|
|
||
|
type sessionClient struct {
|
||
|
cc *grpc.ClientConn
|
||
|
}
|
||
|
|
||
|
func NewSessionClient(cc *grpc.ClientConn) SessionClient {
|
||
|
return &sessionClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *sessionClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
|
||
|
out := new(CreateResponse)
|
||
|
err := c.cc.Invoke(ctx, "/session.v2.Session/Create", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// SessionServer is the server API for Session service.
|
||
|
type SessionServer interface {
|
||
|
// Create opens new session between the client and the server.
|
||
|
Create(context.Context, *CreateRequest) (*CreateResponse, error)
|
||
|
}
|
||
|
|
||
|
// UnimplementedSessionServer can be embedded to have forward compatible implementations.
|
||
|
type UnimplementedSessionServer struct {
|
||
|
}
|
||
|
|
||
|
func (*UnimplementedSessionServer) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||
|
}
|
||
|
|
||
|
func RegisterSessionServer(s *grpc.Server, srv SessionServer) {
|
||
|
s.RegisterService(&_Session_serviceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _Session_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(CreateRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(SessionServer).Create(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/session.v2.Session/Create",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(SessionServer).Create(ctx, req.(*CreateRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
var _Session_serviceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "session.v2.Session",
|
||
|
HandlerType: (*SessionServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Create",
|
||
|
Handler: _Session_Create_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "session/v2/service.proto",
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest) 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 *CreateRequest) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest) 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 m.VerifyHeader != nil {
|
||
|
{
|
||
|
size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x1a
|
||
|
}
|
||
|
if m.MetaHeader != nil {
|
||
|
{
|
||
|
size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
if m.Body != nil {
|
||
|
{
|
||
|
size, err := m.Body.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest_Body) 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 *CreateRequest_Body) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest_Body) 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 m.Lifetime != nil {
|
||
|
{
|
||
|
size, err := m.Lifetime.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
if m.OwnerId != nil {
|
||
|
{
|
||
|
size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse) 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 *CreateResponse) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse) 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 m.VerifyHeader != nil {
|
||
|
{
|
||
|
size, err := m.VerifyHeader.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x1a
|
||
|
}
|
||
|
if m.MetaHeader != nil {
|
||
|
{
|
||
|
size, err := m.MetaHeader.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
if m.Body != nil {
|
||
|
{
|
||
|
size, err := m.Body.MarshalToSizedBuffer(dAtA[:i])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i -= size
|
||
|
i = encodeVarintService(dAtA, i, uint64(size))
|
||
|
}
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse_Body) 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 *CreateResponse_Body) MarshalTo(dAtA []byte) (int, error) {
|
||
|
size := m.Size()
|
||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse_Body) 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.SessionKey) > 0 {
|
||
|
i -= len(m.SessionKey)
|
||
|
copy(dAtA[i:], m.SessionKey)
|
||
|
i = encodeVarintService(dAtA, i, uint64(len(m.SessionKey)))
|
||
|
i--
|
||
|
dAtA[i] = 0x12
|
||
|
}
|
||
|
if len(m.Id) > 0 {
|
||
|
i -= len(m.Id)
|
||
|
copy(dAtA[i:], m.Id)
|
||
|
i = encodeVarintService(dAtA, i, uint64(len(m.Id)))
|
||
|
i--
|
||
|
dAtA[i] = 0xa
|
||
|
}
|
||
|
return len(dAtA) - i, nil
|
||
|
}
|
||
|
|
||
|
func encodeVarintService(dAtA []byte, offset int, v uint64) int {
|
||
|
offset -= sovService(v)
|
||
|
base := offset
|
||
|
for v >= 1<<7 {
|
||
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||
|
v >>= 7
|
||
|
offset++
|
||
|
}
|
||
|
dAtA[offset] = uint8(v)
|
||
|
return base
|
||
|
}
|
||
|
func (m *CreateRequest) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Body != nil {
|
||
|
l = m.Body.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.MetaHeader != nil {
|
||
|
l = m.MetaHeader.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.VerifyHeader != nil {
|
||
|
l = m.VerifyHeader.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.XXX_unrecognized != nil {
|
||
|
n += len(m.XXX_unrecognized)
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *CreateRequest_Body) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.OwnerId != nil {
|
||
|
l = m.OwnerId.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.Lifetime != nil {
|
||
|
l = m.Lifetime.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.XXX_unrecognized != nil {
|
||
|
n += len(m.XXX_unrecognized)
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Body != nil {
|
||
|
l = m.Body.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.MetaHeader != nil {
|
||
|
l = m.MetaHeader.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.VerifyHeader != nil {
|
||
|
l = m.VerifyHeader.Size()
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.XXX_unrecognized != nil {
|
||
|
n += len(m.XXX_unrecognized)
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *CreateResponse_Body) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.Id)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
l = len(m.SessionKey)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovService(uint64(l))
|
||
|
}
|
||
|
if m.XXX_unrecognized != nil {
|
||
|
n += len(m.XXX_unrecognized)
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func sovService(x uint64) (n int) {
|
||
|
return (math_bits.Len64(x|1) + 6) / 7
|
||
|
}
|
||
|
func sozService(x uint64) (n int) {
|
||
|
return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||
|
}
|
||
|
func (m *CreateRequest) 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 ErrIntOverflowService
|
||
|
}
|
||
|
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: CreateRequest: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: CreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.Body == nil {
|
||
|
m.Body = &CreateRequest_Body{}
|
||
|
}
|
||
|
if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.MetaHeader == nil {
|
||
|
m.MetaHeader = &v2.RequestMetaHeader{}
|
||
|
}
|
||
|
if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 3:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.VerifyHeader == nil {
|
||
|
m.VerifyHeader = &v2.RequestVerificationHeader{}
|
||
|
}
|
||
|
if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipService(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if (iNdEx + skippy) < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
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 *CreateRequest_Body) 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 ErrIntOverflowService
|
||
|
}
|
||
|
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: Body: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.OwnerId == nil {
|
||
|
m.OwnerId = &v21.OwnerID{}
|
||
|
}
|
||
|
if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Lifetime", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.Lifetime == nil {
|
||
|
m.Lifetime = &v2.TokenLifetime{}
|
||
|
}
|
||
|
if err := m.Lifetime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipService(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if (iNdEx + skippy) < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
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 *CreateResponse) 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 ErrIntOverflowService
|
||
|
}
|
||
|
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: CreateResponse: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: CreateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.Body == nil {
|
||
|
m.Body = &CreateResponse_Body{}
|
||
|
}
|
||
|
if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field MetaHeader", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.MetaHeader == nil {
|
||
|
m.MetaHeader = &v2.ResponseMetaHeader{}
|
||
|
}
|
||
|
if err := m.MetaHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 3:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field VerifyHeader", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.VerifyHeader == nil {
|
||
|
m.VerifyHeader = &v2.ResponseVerificationHeader{}
|
||
|
}
|
||
|
if err := m.VerifyHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipService(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if (iNdEx + skippy) < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
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 *CreateResponse_Body) 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 ErrIntOverflowService
|
||
|
}
|
||
|
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: Body: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: Body: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||
|
}
|
||
|
var byteLen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
byteLen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if byteLen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + byteLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.Id == nil {
|
||
|
m.Id = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field SessionKey", wireType)
|
||
|
}
|
||
|
var byteLen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowService
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
byteLen |= int(b&0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if byteLen < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
postIndex := iNdEx + byteLen
|
||
|
if postIndex < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.SessionKey = append(m.SessionKey[:0], dAtA[iNdEx:postIndex]...)
|
||
|
if m.SessionKey == nil {
|
||
|
m.SessionKey = []byte{}
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipService(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
if (iNdEx + skippy) < 0 {
|
||
|
return ErrInvalidLengthService
|
||
|
}
|
||
|
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 skipService(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, ErrIntOverflowService
|
||
|
}
|
||
|
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, ErrIntOverflowService
|
||
|
}
|
||
|
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, ErrIntOverflowService
|
||
|
}
|
||
|
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, ErrInvalidLengthService
|
||
|
}
|
||
|
iNdEx += length
|
||
|
case 3:
|
||
|
depth++
|
||
|
case 4:
|
||
|
if depth == 0 {
|
||
|
return 0, ErrUnexpectedEndOfGroupService
|
||
|
}
|
||
|
depth--
|
||
|
case 5:
|
||
|
iNdEx += 4
|
||
|
default:
|
||
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||
|
}
|
||
|
if iNdEx < 0 {
|
||
|
return 0, ErrInvalidLengthService
|
||
|
}
|
||
|
if depth == 0 {
|
||
|
return iNdEx, nil
|
||
|
}
|
||
|
}
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling")
|
||
|
ErrIntOverflowService = fmt.Errorf("proto: integer overflow")
|
||
|
ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
|
||
|
)
|