2025 lines
46 KiB
Go
2025 lines
46 KiB
Go
|
// Code generated by protoc-gen-gogo.
|
||
|
// source: registry.proto
|
||
|
// DO NOT EDIT!
|
||
|
|
||
|
/*
|
||
|
Package registry is a generated protocol buffer package.
|
||
|
|
||
|
It is generated from these files:
|
||
|
registry.proto
|
||
|
|
||
|
It has these top-level messages:
|
||
|
PullRequest
|
||
|
PullResponse
|
||
|
PushRequest
|
||
|
PushResponse
|
||
|
StatusRequest
|
||
|
StatusResponse
|
||
|
DeleteRequest
|
||
|
DeleteResponse
|
||
|
CancelRequest
|
||
|
CancelResponse
|
||
|
Layer
|
||
|
Authentication
|
||
|
*/
|
||
|
package registry
|
||
|
|
||
|
import proto "github.com/gogo/protobuf/proto"
|
||
|
import fmt "fmt"
|
||
|
import math "math"
|
||
|
import _ "github.com/gogo/protobuf/gogoproto"
|
||
|
|
||
|
import strings "strings"
|
||
|
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
||
|
import sort "sort"
|
||
|
import strconv "strconv"
|
||
|
import reflect "reflect"
|
||
|
|
||
|
import (
|
||
|
context "golang.org/x/net/context"
|
||
|
grpc "google.golang.org/grpc"
|
||
|
)
|
||
|
|
||
|
import io "io"
|
||
|
|
||
|
// 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.
|
||
|
const _ = proto.GoGoProtoPackageIsVersion1
|
||
|
|
||
|
type PullRequest struct {
|
||
|
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
|
||
|
Auth *Authentication `protobuf:"bytes,2,opt,name=auth" json:"auth,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *PullRequest) Reset() { *m = PullRequest{} }
|
||
|
func (*PullRequest) ProtoMessage() {}
|
||
|
func (*PullRequest) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{0} }
|
||
|
|
||
|
type PullResponse struct {
|
||
|
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||
|
Layers []*Layer `protobuf:"bytes,2,rep,name=layers" json:"layers,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *PullResponse) Reset() { *m = PullResponse{} }
|
||
|
func (*PullResponse) ProtoMessage() {}
|
||
|
func (*PullResponse) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{1} }
|
||
|
|
||
|
type PushRequest struct {
|
||
|
}
|
||
|
|
||
|
func (m *PushRequest) Reset() { *m = PushRequest{} }
|
||
|
func (*PushRequest) ProtoMessage() {}
|
||
|
func (*PushRequest) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{2} }
|
||
|
|
||
|
type PushResponse struct {
|
||
|
}
|
||
|
|
||
|
func (m *PushResponse) Reset() { *m = PushResponse{} }
|
||
|
func (*PushResponse) ProtoMessage() {}
|
||
|
func (*PushResponse) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{3} }
|
||
|
|
||
|
type StatusRequest struct {
|
||
|
}
|
||
|
|
||
|
func (m *StatusRequest) Reset() { *m = StatusRequest{} }
|
||
|
func (*StatusRequest) ProtoMessage() {}
|
||
|
func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{4} }
|
||
|
|
||
|
type StatusResponse struct {
|
||
|
}
|
||
|
|
||
|
func (m *StatusResponse) Reset() { *m = StatusResponse{} }
|
||
|
func (*StatusResponse) ProtoMessage() {}
|
||
|
func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{5} }
|
||
|
|
||
|
type DeleteRequest struct {
|
||
|
}
|
||
|
|
||
|
func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
|
||
|
func (*DeleteRequest) ProtoMessage() {}
|
||
|
func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{6} }
|
||
|
|
||
|
type DeleteResponse struct {
|
||
|
}
|
||
|
|
||
|
func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
|
||
|
func (*DeleteResponse) ProtoMessage() {}
|
||
|
func (*DeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{7} }
|
||
|
|
||
|
type CancelRequest struct {
|
||
|
}
|
||
|
|
||
|
func (m *CancelRequest) Reset() { *m = CancelRequest{} }
|
||
|
func (*CancelRequest) ProtoMessage() {}
|
||
|
func (*CancelRequest) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{8} }
|
||
|
|
||
|
type CancelResponse struct {
|
||
|
}
|
||
|
|
||
|
func (m *CancelResponse) Reset() { *m = CancelResponse{} }
|
||
|
func (*CancelResponse) ProtoMessage() {}
|
||
|
func (*CancelResponse) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{9} }
|
||
|
|
||
|
type Layer struct {
|
||
|
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||
|
Size_ uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *Layer) Reset() { *m = Layer{} }
|
||
|
func (*Layer) ProtoMessage() {}
|
||
|
func (*Layer) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{10} }
|
||
|
|
||
|
// TODO: we have no clue what should go here, halp stevvooo
|
||
|
type Authentication 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"`
|
||
|
}
|
||
|
|
||
|
func (m *Authentication) Reset() { *m = Authentication{} }
|
||
|
func (*Authentication) ProtoMessage() {}
|
||
|
func (*Authentication) Descriptor() ([]byte, []int) { return fileDescriptorRegistry, []int{11} }
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*PullRequest)(nil), "containerd.v1.PullRequest")
|
||
|
proto.RegisterType((*PullResponse)(nil), "containerd.v1.PullResponse")
|
||
|
proto.RegisterType((*PushRequest)(nil), "containerd.v1.PushRequest")
|
||
|
proto.RegisterType((*PushResponse)(nil), "containerd.v1.PushResponse")
|
||
|
proto.RegisterType((*StatusRequest)(nil), "containerd.v1.StatusRequest")
|
||
|
proto.RegisterType((*StatusResponse)(nil), "containerd.v1.StatusResponse")
|
||
|
proto.RegisterType((*DeleteRequest)(nil), "containerd.v1.DeleteRequest")
|
||
|
proto.RegisterType((*DeleteResponse)(nil), "containerd.v1.DeleteResponse")
|
||
|
proto.RegisterType((*CancelRequest)(nil), "containerd.v1.CancelRequest")
|
||
|
proto.RegisterType((*CancelResponse)(nil), "containerd.v1.CancelResponse")
|
||
|
proto.RegisterType((*Layer)(nil), "containerd.v1.Layer")
|
||
|
proto.RegisterType((*Authentication)(nil), "containerd.v1.Authentication")
|
||
|
}
|
||
|
func (this *PullRequest) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 6)
|
||
|
s = append(s, "®istry.PullRequest{")
|
||
|
s = append(s, "Uri: "+fmt.Sprintf("%#v", this.Uri)+",\n")
|
||
|
if this.Auth != nil {
|
||
|
s = append(s, "Auth: "+fmt.Sprintf("%#v", this.Auth)+",\n")
|
||
|
}
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *PullResponse) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 6)
|
||
|
s = append(s, "®istry.PullResponse{")
|
||
|
s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
|
||
|
if this.Layers != nil {
|
||
|
s = append(s, "Layers: "+fmt.Sprintf("%#v", this.Layers)+",\n")
|
||
|
}
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *PushRequest) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.PushRequest{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *PushResponse) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.PushResponse{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *StatusRequest) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.StatusRequest{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *StatusResponse) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.StatusResponse{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *DeleteRequest) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.DeleteRequest{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *DeleteResponse) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.DeleteResponse{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *CancelRequest) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.CancelRequest{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *CancelResponse) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 4)
|
||
|
s = append(s, "®istry.CancelResponse{")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *Layer) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 6)
|
||
|
s = append(s, "®istry.Layer{")
|
||
|
s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
|
||
|
s = append(s, "Size_: "+fmt.Sprintf("%#v", this.Size_)+",\n")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func (this *Authentication) GoString() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := make([]string, 0, 6)
|
||
|
s = append(s, "®istry.Authentication{")
|
||
|
s = append(s, "Username: "+fmt.Sprintf("%#v", this.Username)+",\n")
|
||
|
s = append(s, "Password: "+fmt.Sprintf("%#v", this.Password)+",\n")
|
||
|
s = append(s, "}")
|
||
|
return strings.Join(s, "")
|
||
|
}
|
||
|
func valueToGoStringRegistry(v interface{}, typ string) string {
|
||
|
rv := reflect.ValueOf(v)
|
||
|
if rv.IsNil() {
|
||
|
return "nil"
|
||
|
}
|
||
|
pv := reflect.Indirect(rv).Interface()
|
||
|
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||
|
}
|
||
|
func extensionToGoStringRegistry(e map[int32]github_com_gogo_protobuf_proto.Extension) string {
|
||
|
if e == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := "map[int32]proto.Extension{"
|
||
|
keys := make([]int, 0, len(e))
|
||
|
for k := range e {
|
||
|
keys = append(keys, int(k))
|
||
|
}
|
||
|
sort.Ints(keys)
|
||
|
ss := []string{}
|
||
|
for _, k := range keys {
|
||
|
ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
|
||
|
}
|
||
|
s += strings.Join(ss, ",") + "}"
|
||
|
return s
|
||
|
}
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ context.Context
|
||
|
var _ grpc.ClientConn
|
||
|
|
||
|
// Client API for Registry service
|
||
|
|
||
|
type RegistryClient interface {
|
||
|
// Pull an image from a registry
|
||
|
Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*PullResponse, error)
|
||
|
// Push pushes a new or existing image to a registry
|
||
|
Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
|
||
|
// Delete deletes an image from the registry
|
||
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
||
|
// Status returns a progress stream of the push or pull operation
|
||
|
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (Registry_StatusClient, error)
|
||
|
// Cancel cancels a push or pull operation
|
||
|
Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*CancelResponse, error)
|
||
|
}
|
||
|
|
||
|
type registryClient struct {
|
||
|
cc *grpc.ClientConn
|
||
|
}
|
||
|
|
||
|
func NewRegistryClient(cc *grpc.ClientConn) RegistryClient {
|
||
|
return ®istryClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *registryClient) Pull(ctx context.Context, in *PullRequest, opts ...grpc.CallOption) (*PullResponse, error) {
|
||
|
out := new(PullResponse)
|
||
|
err := grpc.Invoke(ctx, "/containerd.v1.Registry/Pull", in, out, c.cc, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *registryClient) Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error) {
|
||
|
out := new(PushResponse)
|
||
|
err := grpc.Invoke(ctx, "/containerd.v1.Registry/Push", in, out, c.cc, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *registryClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
|
||
|
out := new(DeleteResponse)
|
||
|
err := grpc.Invoke(ctx, "/containerd.v1.Registry/Delete", in, out, c.cc, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *registryClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (Registry_StatusClient, error) {
|
||
|
stream, err := grpc.NewClientStream(ctx, &_Registry_serviceDesc.Streams[0], c.cc, "/containerd.v1.Registry/Status", opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
x := ®istryStatusClient{stream}
|
||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return x, nil
|
||
|
}
|
||
|
|
||
|
type Registry_StatusClient interface {
|
||
|
Recv() (*StatusResponse, error)
|
||
|
grpc.ClientStream
|
||
|
}
|
||
|
|
||
|
type registryStatusClient struct {
|
||
|
grpc.ClientStream
|
||
|
}
|
||
|
|
||
|
func (x *registryStatusClient) Recv() (*StatusResponse, error) {
|
||
|
m := new(StatusResponse)
|
||
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return m, nil
|
||
|
}
|
||
|
|
||
|
func (c *registryClient) Cancel(ctx context.Context, in *CancelRequest, opts ...grpc.CallOption) (*CancelResponse, error) {
|
||
|
out := new(CancelResponse)
|
||
|
err := grpc.Invoke(ctx, "/containerd.v1.Registry/Cancel", in, out, c.cc, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// Server API for Registry service
|
||
|
|
||
|
type RegistryServer interface {
|
||
|
// Pull an image from a registry
|
||
|
Pull(context.Context, *PullRequest) (*PullResponse, error)
|
||
|
// Push pushes a new or existing image to a registry
|
||
|
Push(context.Context, *PushRequest) (*PushResponse, error)
|
||
|
// Delete deletes an image from the registry
|
||
|
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
|
||
|
// Status returns a progress stream of the push or pull operation
|
||
|
Status(*StatusRequest, Registry_StatusServer) error
|
||
|
// Cancel cancels a push or pull operation
|
||
|
Cancel(context.Context, *CancelRequest) (*CancelResponse, error)
|
||
|
}
|
||
|
|
||
|
func RegisterRegistryServer(s *grpc.Server, srv RegistryServer) {
|
||
|
s.RegisterService(&_Registry_serviceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _Registry_Pull_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
|
||
|
in := new(PullRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
out, err := srv.(RegistryServer).Pull(ctx, in)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func _Registry_Push_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
|
||
|
in := new(PushRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
out, err := srv.(RegistryServer).Push(ctx, in)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func _Registry_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
|
||
|
in := new(DeleteRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
out, err := srv.(RegistryServer).Delete(ctx, in)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func _Registry_Status_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||
|
m := new(StatusRequest)
|
||
|
if err := stream.RecvMsg(m); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
return srv.(RegistryServer).Status(m, ®istryStatusServer{stream})
|
||
|
}
|
||
|
|
||
|
type Registry_StatusServer interface {
|
||
|
Send(*StatusResponse) error
|
||
|
grpc.ServerStream
|
||
|
}
|
||
|
|
||
|
type registryStatusServer struct {
|
||
|
grpc.ServerStream
|
||
|
}
|
||
|
|
||
|
func (x *registryStatusServer) Send(m *StatusResponse) error {
|
||
|
return x.ServerStream.SendMsg(m)
|
||
|
}
|
||
|
|
||
|
func _Registry_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
|
||
|
in := new(CancelRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
out, err := srv.(RegistryServer).Cancel(ctx, in)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
var _Registry_serviceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "containerd.v1.Registry",
|
||
|
HandlerType: (*RegistryServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Pull",
|
||
|
Handler: _Registry_Pull_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Push",
|
||
|
Handler: _Registry_Push_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Delete",
|
||
|
Handler: _Registry_Delete_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Cancel",
|
||
|
Handler: _Registry_Cancel_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{
|
||
|
{
|
||
|
StreamName: "Status",
|
||
|
Handler: _Registry_Status_Handler,
|
||
|
ServerStreams: true,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
func (m *PullRequest) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *PullRequest) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.Uri) > 0 {
|
||
|
data[i] = 0xa
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(len(m.Uri)))
|
||
|
i += copy(data[i:], m.Uri)
|
||
|
}
|
||
|
if m.Auth != nil {
|
||
|
data[i] = 0x12
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(m.Auth.Size()))
|
||
|
n1, err := m.Auth.MarshalTo(data[i:])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i += n1
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *PullResponse) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *PullResponse) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.ID) > 0 {
|
||
|
data[i] = 0xa
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(len(m.ID)))
|
||
|
i += copy(data[i:], m.ID)
|
||
|
}
|
||
|
if len(m.Layers) > 0 {
|
||
|
for _, msg := range m.Layers {
|
||
|
data[i] = 0x12
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(msg.Size()))
|
||
|
n, err := msg.MarshalTo(data[i:])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i += n
|
||
|
}
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *PushRequest) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *PushRequest) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *PushResponse) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *PushResponse) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *StatusRequest) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *StatusRequest) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *StatusResponse) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *StatusResponse) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *DeleteRequest) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *DeleteRequest) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *DeleteResponse) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *DeleteResponse) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *CancelRequest) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *CancelRequest) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *CancelResponse) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *CancelResponse) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *Layer) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *Layer) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.ID) > 0 {
|
||
|
data[i] = 0xa
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(len(m.ID)))
|
||
|
i += copy(data[i:], m.ID)
|
||
|
}
|
||
|
if m.Size_ != 0 {
|
||
|
data[i] = 0x10
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(m.Size_))
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *Authentication) Marshal() (data []byte, err error) {
|
||
|
size := m.Size()
|
||
|
data = make([]byte, size)
|
||
|
n, err := m.MarshalTo(data)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return data[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *Authentication) MarshalTo(data []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if len(m.Username) > 0 {
|
||
|
data[i] = 0xa
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(len(m.Username)))
|
||
|
i += copy(data[i:], m.Username)
|
||
|
}
|
||
|
if len(m.Password) > 0 {
|
||
|
data[i] = 0x12
|
||
|
i++
|
||
|
i = encodeVarintRegistry(data, i, uint64(len(m.Password)))
|
||
|
i += copy(data[i:], m.Password)
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func encodeFixed64Registry(data []byte, offset int, v uint64) int {
|
||
|
data[offset] = uint8(v)
|
||
|
data[offset+1] = uint8(v >> 8)
|
||
|
data[offset+2] = uint8(v >> 16)
|
||
|
data[offset+3] = uint8(v >> 24)
|
||
|
data[offset+4] = uint8(v >> 32)
|
||
|
data[offset+5] = uint8(v >> 40)
|
||
|
data[offset+6] = uint8(v >> 48)
|
||
|
data[offset+7] = uint8(v >> 56)
|
||
|
return offset + 8
|
||
|
}
|
||
|
func encodeFixed32Registry(data []byte, offset int, v uint32) int {
|
||
|
data[offset] = uint8(v)
|
||
|
data[offset+1] = uint8(v >> 8)
|
||
|
data[offset+2] = uint8(v >> 16)
|
||
|
data[offset+3] = uint8(v >> 24)
|
||
|
return offset + 4
|
||
|
}
|
||
|
func encodeVarintRegistry(data []byte, offset int, v uint64) int {
|
||
|
for v >= 1<<7 {
|
||
|
data[offset] = uint8(v&0x7f | 0x80)
|
||
|
v >>= 7
|
||
|
offset++
|
||
|
}
|
||
|
data[offset] = uint8(v)
|
||
|
return offset + 1
|
||
|
}
|
||
|
func (m *PullRequest) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.Uri)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovRegistry(uint64(l))
|
||
|
}
|
||
|
if m.Auth != nil {
|
||
|
l = m.Auth.Size()
|
||
|
n += 1 + l + sovRegistry(uint64(l))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *PullResponse) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.ID)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovRegistry(uint64(l))
|
||
|
}
|
||
|
if len(m.Layers) > 0 {
|
||
|
for _, e := range m.Layers {
|
||
|
l = e.Size()
|
||
|
n += 1 + l + sovRegistry(uint64(l))
|
||
|
}
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *PushRequest) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *PushResponse) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *StatusRequest) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *StatusResponse) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *DeleteRequest) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *DeleteResponse) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *CancelRequest) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *CancelResponse) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *Layer) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.ID)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovRegistry(uint64(l))
|
||
|
}
|
||
|
if m.Size_ != 0 {
|
||
|
n += 1 + sovRegistry(uint64(m.Size_))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *Authentication) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
l = len(m.Username)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovRegistry(uint64(l))
|
||
|
}
|
||
|
l = len(m.Password)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovRegistry(uint64(l))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func sovRegistry(x uint64) (n int) {
|
||
|
for {
|
||
|
n++
|
||
|
x >>= 7
|
||
|
if x == 0 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
func sozRegistry(x uint64) (n int) {
|
||
|
return sovRegistry(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||
|
}
|
||
|
func (this *PullRequest) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&PullRequest{`,
|
||
|
`Uri:` + fmt.Sprintf("%v", this.Uri) + `,`,
|
||
|
`Auth:` + strings.Replace(fmt.Sprintf("%v", this.Auth), "Authentication", "Authentication", 1) + `,`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *PullResponse) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&PullResponse{`,
|
||
|
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
|
||
|
`Layers:` + strings.Replace(fmt.Sprintf("%v", this.Layers), "Layer", "Layer", 1) + `,`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *PushRequest) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&PushRequest{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *PushResponse) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&PushResponse{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *StatusRequest) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&StatusRequest{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *StatusResponse) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&StatusResponse{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *DeleteRequest) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&DeleteRequest{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *DeleteResponse) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&DeleteResponse{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *CancelRequest) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&CancelRequest{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *CancelResponse) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&CancelResponse{`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *Layer) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&Layer{`,
|
||
|
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
|
||
|
`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func (this *Authentication) String() string {
|
||
|
if this == nil {
|
||
|
return "nil"
|
||
|
}
|
||
|
s := strings.Join([]string{`&Authentication{`,
|
||
|
`Username:` + fmt.Sprintf("%v", this.Username) + `,`,
|
||
|
`Password:` + fmt.Sprintf("%v", this.Password) + `,`,
|
||
|
`}`,
|
||
|
}, "")
|
||
|
return s
|
||
|
}
|
||
|
func valueToStringRegistry(v interface{}) string {
|
||
|
rv := reflect.ValueOf(v)
|
||
|
if rv.IsNil() {
|
||
|
return "nil"
|
||
|
}
|
||
|
pv := reflect.Indirect(rv).Interface()
|
||
|
return fmt.Sprintf("*%v", pv)
|
||
|
}
|
||
|
func (m *PullRequest) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: PullRequest: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: PullRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowRegistry
|
||
|
}
|
||
|
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 ErrInvalidLengthRegistry
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Uri = string(data[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowRegistry
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := data[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= (int(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.Auth == nil {
|
||
|
m.Auth = &Authentication{}
|
||
|
}
|
||
|
if err := m.Auth.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *PullResponse) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: PullResponse: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: PullResponse: 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 stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowRegistry
|
||
|
}
|
||
|
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 ErrInvalidLengthRegistry
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.ID = string(data[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Layers", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowRegistry
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := data[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= (int(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Layers = append(m.Layers, &Layer{})
|
||
|
if err := m.Layers[len(m.Layers)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *PushRequest) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: PushRequest: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: PushRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *PushResponse) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: PushResponse: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: PushResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *StatusRequest) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: StatusRequest: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *StatusResponse) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: StatusResponse: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *DeleteRequest) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: DeleteRequest: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *DeleteResponse) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: DeleteResponse: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: DeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *CancelRequest) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: CancelRequest: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: CancelRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *CancelResponse) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: CancelResponse: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: CancelResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *Layer) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: Layer: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: Layer: 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 stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowRegistry
|
||
|
}
|
||
|
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 ErrInvalidLengthRegistry
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.ID = string(data[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 2:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
|
||
|
}
|
||
|
m.Size_ = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowRegistry
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := data[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Size_ |= (uint64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *Authentication) 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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: Authentication: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: Authentication: 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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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 ErrInvalidLengthRegistry
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
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 ErrIntOverflowRegistry
|
||
|
}
|
||
|
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 ErrInvalidLengthRegistry
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Password = string(data[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipRegistry(data[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthRegistry
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func skipRegistry(data []byte) (n int, err error) {
|
||
|
l := len(data)
|
||
|
iNdEx := 0
|
||
|
for iNdEx < l {
|
||
|
var wire uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowRegistry
|
||
|
}
|
||
|
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, ErrIntOverflowRegistry
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx++
|
||
|
if data[iNdEx-1] < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
return iNdEx, nil
|
||
|
case 1:
|
||
|
iNdEx += 8
|
||
|
return iNdEx, nil
|
||
|
case 2:
|
||
|
var length int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowRegistry
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := data[iNdEx]
|
||
|
iNdEx++
|
||
|
length |= (int(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
iNdEx += length
|
||
|
if length < 0 {
|
||
|
return 0, ErrInvalidLengthRegistry
|
||
|
}
|
||
|
return iNdEx, nil
|
||
|
case 3:
|
||
|
for {
|
||
|
var innerWire uint64
|
||
|
var start int = iNdEx
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowRegistry
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := data[iNdEx]
|
||
|
iNdEx++
|
||
|
innerWire |= (uint64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
innerWireType := int(innerWire & 0x7)
|
||
|
if innerWireType == 4 {
|
||
|
break
|
||
|
}
|
||
|
next, err := skipRegistry(data[start:])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
iNdEx = start + next
|
||
|
}
|
||
|
return iNdEx, nil
|
||
|
case 4:
|
||
|
return iNdEx, nil
|
||
|
case 5:
|
||
|
iNdEx += 4
|
||
|
return iNdEx, nil
|
||
|
default:
|
||
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||
|
}
|
||
|
}
|
||
|
panic("unreachable")
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
ErrInvalidLengthRegistry = fmt.Errorf("proto: negative length found during unmarshaling")
|
||
|
ErrIntOverflowRegistry = fmt.Errorf("proto: integer overflow")
|
||
|
)
|
||
|
|
||
|
var fileDescriptorRegistry = []byte{
|
||
|
// 418 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x93, 0xd1, 0x8e, 0xd2, 0x40,
|
||
|
0x14, 0x86, 0x6d, 0xa9, 0x0d, 0x1e, 0xa4, 0x92, 0x09, 0x31, 0xa4, 0x02, 0x9a, 0x5e, 0x79, 0x61,
|
||
|
0xaa, 0xc0, 0x03, 0x18, 0x11, 0xa3, 0x26, 0x5e, 0x98, 0xd1, 0x17, 0x18, 0x61, 0x02, 0x4d, 0x6a,
|
||
|
0x07, 0x67, 0xa6, 0x6e, 0xd8, 0xab, 0x7d, 0x3c, 0x2e, 0xf7, 0x72, 0xaf, 0x36, 0x0b, 0xfb, 0x02,
|
||
|
0xfb, 0x08, 0x3b, 0x33, 0x6d, 0x81, 0x52, 0xb8, 0x38, 0xc9, 0xcc, 0x39, 0x7f, 0xbe, 0x39, 0xfd,
|
||
|
0xff, 0x14, 0x3c, 0x4e, 0xe7, 0x91, 0x90, 0x7c, 0x15, 0x2e, 0x39, 0x93, 0x0c, 0x35, 0xa7, 0x2c,
|
||
|
0x91, 0x24, 0x4a, 0x28, 0x9f, 0x85, 0xff, 0x07, 0x7e, 0x7b, 0xce, 0xe6, 0xcc, 0x4c, 0xde, 0xeb,
|
||
|
0x53, 0x26, 0x0a, 0x30, 0x34, 0x7e, 0xa6, 0x71, 0x8c, 0xe9, 0xbf, 0x94, 0x0a, 0x89, 0x5a, 0x50,
|
||
|
0x4b, 0x79, 0xd4, 0xb1, 0xde, 0x58, 0x6f, 0x9f, 0x61, 0x7d, 0x44, 0x03, 0x70, 0x48, 0x2a, 0x17,
|
||
|
0x1d, 0x5b, 0xb5, 0x1a, 0xc3, 0x5e, 0x58, 0x82, 0x86, 0x9f, 0xd4, 0x88, 0x26, 0x32, 0x9a, 0x12,
|
||
|
0x19, 0xb1, 0x04, 0x1b, 0x69, 0xf0, 0x1b, 0x9e, 0x67, 0x4c, 0xb1, 0x64, 0x89, 0xa0, 0xe8, 0x25,
|
||
|
0xd8, 0xd1, 0x2c, 0x63, 0x8e, 0xdd, 0xed, 0xed, 0x6b, 0xfb, 0xfb, 0x04, 0xab, 0x0e, 0x7a, 0x07,
|
||
|
0x6e, 0x4c, 0x56, 0x94, 0x0b, 0x05, 0xaf, 0x29, 0x78, 0xfb, 0x08, 0xfe, 0x43, 0x0f, 0x71, 0xae,
|
||
|
0x09, 0x9a, 0x7a, 0x53, 0xb1, 0xc8, 0x37, 0x0d, 0x3c, 0xfd, 0x88, 0xbe, 0x66, 0x8f, 0x04, 0x2f,
|
||
|
0xa0, 0xf9, 0x4b, 0x12, 0x99, 0x8a, 0x42, 0xd0, 0x02, 0xaf, 0x68, 0xec, 0x25, 0x13, 0x1a, 0x53,
|
||
|
0x49, 0x0f, 0x24, 0x45, 0x63, 0x2f, 0xf9, 0x4c, 0x92, 0x29, 0x8d, 0x0f, 0x24, 0x45, 0x23, 0x97,
|
||
|
0x8c, 0xe0, 0xa9, 0x59, 0xec, 0xec, 0x67, 0x21, 0x70, 0x44, 0x74, 0x49, 0x8d, 0x63, 0x0e, 0x36,
|
||
|
0xe7, 0xe0, 0x1b, 0x78, 0x65, 0xab, 0x90, 0x0f, 0xf5, 0x54, 0x50, 0x9e, 0x90, 0xbf, 0x34, 0xb7,
|
||
|
0x7b, 0x77, 0xd7, 0xb3, 0x25, 0x11, 0xe2, 0x82, 0xf1, 0x99, 0xa1, 0xa8, 0x59, 0x71, 0x1f, 0xde,
|
||
|
0xdb, 0x50, 0xc7, 0x79, 0xd0, 0xe8, 0x23, 0x38, 0xda, 0x69, 0xe4, 0x1f, 0x39, 0x77, 0x10, 0xa9,
|
||
|
0xff, 0xea, 0xe4, 0x2c, 0x8f, 0xc6, 0x00, 0xc4, 0xe2, 0x04, 0x60, 0xe7, 0xf4, 0x09, 0xc0, 0xde,
|
||
|
0x76, 0xf4, 0x05, 0xdc, 0xcc, 0x42, 0xd4, 0x3d, 0x92, 0x95, 0xac, 0xf6, 0x7b, 0x67, 0xa6, 0x39,
|
||
|
0xe6, 0x2b, 0xb8, 0x59, 0x58, 0x15, 0x4c, 0x29, 0xd4, 0x0a, 0xa6, 0x9c, 0xf0, 0x07, 0x4b, 0xef,
|
||
|
0x93, 0xe5, 0x55, 0x01, 0x95, 0x72, 0xad, 0x80, 0xca, 0x21, 0x8f, 0xbb, 0xeb, 0x4d, 0xff, 0xc9,
|
||
|
0x8d, 0xaa, 0x87, 0x4d, 0xdf, 0xba, 0xda, 0xf6, 0xad, 0xb5, 0xaa, 0x6b, 0x55, 0x77, 0xaa, 0xfe,
|
||
|
0xb8, 0xe6, 0xdf, 0x19, 0x3d, 0x06, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xe2, 0x86, 0x58, 0x72, 0x03,
|
||
|
0x00, 0x00,
|
||
|
}
|