2017-06-06 18:01:18 +00:00
|
|
|
// Code generated by protoc-gen-gogo.
|
|
|
|
// source: ops.proto
|
|
|
|
// DO NOT EDIT!
|
|
|
|
|
|
|
|
/*
|
|
|
|
Package pb is a generated protocol buffer package.
|
|
|
|
|
|
|
|
It is generated from these files:
|
|
|
|
ops.proto
|
|
|
|
|
|
|
|
It has these top-level messages:
|
|
|
|
Op
|
2017-06-09 01:16:19 +00:00
|
|
|
Input
|
2017-06-06 18:01:18 +00:00
|
|
|
ExecOp
|
|
|
|
Meta
|
|
|
|
Mount
|
|
|
|
CopyOp
|
|
|
|
CopySource
|
|
|
|
SourceOp
|
|
|
|
*/
|
|
|
|
package pb
|
|
|
|
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
2017-06-21 21:48:21 +00:00
|
|
|
import _ "github.com/gogo/protobuf/gogoproto"
|
2017-06-06 18:01:18 +00:00
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
|
2017-06-06 18:01:18 +00:00
|
|
|
|
|
|
|
import io "io"
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
type Op struct {
|
2017-06-09 01:16:19 +00:00
|
|
|
Inputs []*Input `protobuf:"bytes,1,rep,name=inputs" json:"inputs,omitempty"`
|
2017-06-06 18:01:18 +00:00
|
|
|
// Types that are valid to be assigned to Op:
|
|
|
|
// *Op_Exec
|
|
|
|
// *Op_Source
|
|
|
|
// *Op_Copy
|
|
|
|
Op isOp_Op `protobuf_oneof:"op"`
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Op) Reset() { *m = Op{} }
|
|
|
|
func (m *Op) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Op) ProtoMessage() {}
|
2017-06-06 18:01:18 +00:00
|
|
|
|
|
|
|
type isOp_Op interface {
|
|
|
|
isOp_Op()
|
|
|
|
MarshalTo([]byte) (int, error)
|
|
|
|
Size() int
|
|
|
|
}
|
|
|
|
|
|
|
|
type Op_Exec struct {
|
|
|
|
Exec *ExecOp `protobuf:"bytes,2,opt,name=exec,oneof"`
|
|
|
|
}
|
|
|
|
type Op_Source struct {
|
|
|
|
Source *SourceOp `protobuf:"bytes,3,opt,name=source,oneof"`
|
|
|
|
}
|
|
|
|
type Op_Copy struct {
|
|
|
|
Copy *CopyOp `protobuf:"bytes,4,opt,name=copy,oneof"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*Op_Exec) isOp_Op() {}
|
|
|
|
func (*Op_Source) isOp_Op() {}
|
|
|
|
func (*Op_Copy) isOp_Op() {}
|
|
|
|
|
|
|
|
func (m *Op) GetOp() isOp_Op {
|
|
|
|
if m != nil {
|
|
|
|
return m.Op
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-06-09 01:16:19 +00:00
|
|
|
func (m *Op) GetInputs() []*Input {
|
2017-06-06 18:01:18 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Inputs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Op) GetExec() *ExecOp {
|
|
|
|
if x, ok := m.GetOp().(*Op_Exec); ok {
|
|
|
|
return x.Exec
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Op) GetSource() *SourceOp {
|
|
|
|
if x, ok := m.GetOp().(*Op_Source); ok {
|
|
|
|
return x.Source
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Op) GetCopy() *CopyOp {
|
|
|
|
if x, ok := m.GetOp().(*Op_Copy); ok {
|
|
|
|
return x.Copy
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
2017-06-21 21:48:21 +00:00
|
|
|
func (*Op) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) {
|
|
|
|
return _Op_OneofMarshaler, _Op_OneofUnmarshaler, []interface{}{
|
2017-06-06 18:01:18 +00:00
|
|
|
(*Op_Exec)(nil),
|
|
|
|
(*Op_Source)(nil),
|
|
|
|
(*Op_Copy)(nil),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Op_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
|
|
m := msg.(*Op)
|
|
|
|
// op
|
|
|
|
switch x := m.Op.(type) {
|
|
|
|
case *Op_Exec:
|
|
|
|
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
|
|
|
|
if err := b.EncodeMessage(x.Exec); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
case *Op_Source:
|
|
|
|
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
|
|
|
|
if err := b.EncodeMessage(x.Source); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
case *Op_Copy:
|
|
|
|
_ = b.EncodeVarint(4<<3 | proto.WireBytes)
|
|
|
|
if err := b.EncodeMessage(x.Copy); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
case nil:
|
|
|
|
default:
|
|
|
|
return fmt.Errorf("Op.Op has unexpected type %T", x)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Op_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
|
|
m := msg.(*Op)
|
|
|
|
switch tag {
|
|
|
|
case 2: // op.exec
|
|
|
|
if wire != proto.WireBytes {
|
|
|
|
return true, proto.ErrInternalBadWireType
|
|
|
|
}
|
|
|
|
msg := new(ExecOp)
|
|
|
|
err := b.DecodeMessage(msg)
|
|
|
|
m.Op = &Op_Exec{msg}
|
|
|
|
return true, err
|
|
|
|
case 3: // op.source
|
|
|
|
if wire != proto.WireBytes {
|
|
|
|
return true, proto.ErrInternalBadWireType
|
|
|
|
}
|
|
|
|
msg := new(SourceOp)
|
|
|
|
err := b.DecodeMessage(msg)
|
|
|
|
m.Op = &Op_Source{msg}
|
|
|
|
return true, err
|
|
|
|
case 4: // op.copy
|
|
|
|
if wire != proto.WireBytes {
|
|
|
|
return true, proto.ErrInternalBadWireType
|
|
|
|
}
|
|
|
|
msg := new(CopyOp)
|
|
|
|
err := b.DecodeMessage(msg)
|
|
|
|
m.Op = &Op_Copy{msg}
|
|
|
|
return true, err
|
|
|
|
default:
|
|
|
|
return false, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-09 01:16:19 +00:00
|
|
|
type Input struct {
|
2017-06-21 21:48:21 +00:00
|
|
|
Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
|
2017-07-21 17:58:24 +00:00
|
|
|
Index OutputIndex `protobuf:"varint,2,opt,name=index,proto3,customtype=OutputIndex" json:"index"`
|
2017-06-09 01:16:19 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Input) Reset() { *m = Input{} }
|
|
|
|
func (m *Input) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Input) ProtoMessage() {}
|
2017-06-09 01:16:19 +00:00
|
|
|
|
2017-06-06 18:01:18 +00:00
|
|
|
type ExecOp struct {
|
|
|
|
Meta *Meta `protobuf:"bytes,1,opt,name=meta" json:"meta,omitempty"`
|
|
|
|
Mounts []*Mount `protobuf:"bytes,2,rep,name=mounts" json:"mounts,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *ExecOp) Reset() { *m = ExecOp{} }
|
|
|
|
func (m *ExecOp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ExecOp) ProtoMessage() {}
|
2017-06-06 18:01:18 +00:00
|
|
|
|
|
|
|
func (m *ExecOp) GetMeta() *Meta {
|
|
|
|
if m != nil {
|
|
|
|
return m.Meta
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ExecOp) GetMounts() []*Mount {
|
|
|
|
if m != nil {
|
|
|
|
return m.Mounts
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type Meta struct {
|
|
|
|
Args []string `protobuf:"bytes,1,rep,name=args" json:"args,omitempty"`
|
|
|
|
Env []string `protobuf:"bytes,2,rep,name=env" json:"env,omitempty"`
|
|
|
|
Cwd string `protobuf:"bytes,3,opt,name=cwd,proto3" json:"cwd,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Meta) Reset() { *m = Meta{} }
|
|
|
|
func (m *Meta) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Meta) ProtoMessage() {}
|
2017-06-06 18:01:18 +00:00
|
|
|
|
|
|
|
type Mount struct {
|
2017-07-21 17:58:24 +00:00
|
|
|
Input InputIndex `protobuf:"varint,1,opt,name=input,proto3,customtype=InputIndex" json:"input"`
|
|
|
|
Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
|
|
|
|
Dest string `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
|
|
|
|
Output OutputIndex `protobuf:"varint,4,opt,name=output,proto3,customtype=OutputIndex" json:"output"`
|
|
|
|
Readonly bool `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Mount) Reset() { *m = Mount{} }
|
|
|
|
func (m *Mount) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Mount) ProtoMessage() {}
|
2017-06-06 18:01:18 +00:00
|
|
|
|
|
|
|
type CopyOp struct {
|
|
|
|
Src []*CopySource `protobuf:"bytes,1,rep,name=src" json:"src,omitempty"`
|
|
|
|
Dest string `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopyOp) Reset() { *m = CopyOp{} }
|
|
|
|
func (m *CopyOp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CopyOp) ProtoMessage() {}
|
2017-06-06 18:01:18 +00:00
|
|
|
|
|
|
|
func (m *CopyOp) GetSrc() []*CopySource {
|
|
|
|
if m != nil {
|
|
|
|
return m.Src
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type CopySource struct {
|
2017-07-21 17:58:24 +00:00
|
|
|
Input InputIndex `protobuf:"varint,1,opt,name=input,proto3,customtype=InputIndex" json:"input"`
|
|
|
|
Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopySource) Reset() { *m = CopySource{} }
|
|
|
|
func (m *CopySource) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CopySource) ProtoMessage() {}
|
2017-06-06 18:01:18 +00:00
|
|
|
|
|
|
|
type SourceOp struct {
|
2017-07-08 23:25:07 +00:00
|
|
|
// source type?
|
|
|
|
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
|
|
|
|
Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *SourceOp) Reset() { *m = SourceOp{} }
|
|
|
|
func (m *SourceOp) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SourceOp) ProtoMessage() {}
|
2017-06-06 18:01:18 +00:00
|
|
|
|
2017-07-08 23:25:07 +00:00
|
|
|
func (m *SourceOp) GetAttrs() map[string]string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Attrs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-06-06 18:01:18 +00:00
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Op)(nil), "pb.Op")
|
2017-06-09 01:16:19 +00:00
|
|
|
proto.RegisterType((*Input)(nil), "pb.Input")
|
2017-06-06 18:01:18 +00:00
|
|
|
proto.RegisterType((*ExecOp)(nil), "pb.ExecOp")
|
|
|
|
proto.RegisterType((*Meta)(nil), "pb.Meta")
|
|
|
|
proto.RegisterType((*Mount)(nil), "pb.Mount")
|
|
|
|
proto.RegisterType((*CopyOp)(nil), "pb.CopyOp")
|
|
|
|
proto.RegisterType((*CopySource)(nil), "pb.CopySource")
|
|
|
|
proto.RegisterType((*SourceOp)(nil), "pb.SourceOp")
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Op) Marshal() (data []byte, err error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Op) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Inputs) > 0 {
|
2017-06-09 01:16:19 +00:00
|
|
|
for _, msg := range m.Inputs {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0xa
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(msg.Size()))
|
|
|
|
n, err := msg.MarshalTo(data[i:])
|
2017-06-09 01:16:19 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
2017-06-09 01:16:19 +00:00
|
|
|
i += n
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if m.Op != nil {
|
2017-06-21 21:48:21 +00:00
|
|
|
nn1, err := m.Op.MarshalTo(data[i:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += nn1
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Op_Exec) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
i := 0
|
|
|
|
if m.Exec != nil {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x12
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Exec.Size()))
|
|
|
|
n2, err := m.Exec.MarshalTo(data[i:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n2
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Op_Source) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
i := 0
|
|
|
|
if m.Source != nil {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x1a
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Source.Size()))
|
|
|
|
n3, err := m.Source.MarshalTo(data[i:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n3
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Op_Copy) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
i := 0
|
|
|
|
if m.Copy != nil {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x22
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Copy.Size()))
|
|
|
|
n4, err := m.Copy.MarshalTo(data[i:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n4
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Input) Marshal() (data []byte, err error) {
|
2017-06-09 01:16:19 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-09 01:16:19 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-09 01:16:19 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Input) MarshalTo(data []byte) (int, error) {
|
2017-06-09 01:16:19 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Digest) > 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0xa
|
2017-06-09 01:16:19 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(len(m.Digest)))
|
|
|
|
i += copy(data[i:], m.Digest)
|
2017-06-09 01:16:19 +00:00
|
|
|
}
|
|
|
|
if m.Index != 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x10
|
2017-06-09 01:16:19 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Index))
|
2017-06-09 01:16:19 +00:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *ExecOp) Marshal() (data []byte, err error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *ExecOp) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Meta != nil {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0xa
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Meta.Size()))
|
|
|
|
n5, err := m.Meta.MarshalTo(data[i:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n5
|
|
|
|
}
|
|
|
|
if len(m.Mounts) > 0 {
|
|
|
|
for _, msg := range m.Mounts {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x12
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(msg.Size()))
|
|
|
|
n, err := msg.MarshalTo(data[i:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Meta) Marshal() (data []byte, err error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Meta) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Args) > 0 {
|
|
|
|
for _, s := range m.Args {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0xa
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
|
|
|
l = len(s)
|
|
|
|
for l >= 1<<7 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
2017-06-06 18:01:18 +00:00
|
|
|
l >>= 7
|
|
|
|
i++
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = uint8(l)
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i += copy(data[i:], s)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(m.Env) > 0 {
|
|
|
|
for _, s := range m.Env {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x12
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
|
|
|
l = len(s)
|
|
|
|
for l >= 1<<7 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = uint8(uint64(l)&0x7f | 0x80)
|
2017-06-06 18:01:18 +00:00
|
|
|
l >>= 7
|
|
|
|
i++
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = uint8(l)
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i += copy(data[i:], s)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(m.Cwd) > 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x1a
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(len(m.Cwd)))
|
|
|
|
i += copy(data[i:], m.Cwd)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Mount) Marshal() (data []byte, err error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Mount) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Input != 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x8
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Input))
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
if len(m.Selector) > 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x12
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(len(m.Selector)))
|
|
|
|
i += copy(data[i:], m.Selector)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
if len(m.Dest) > 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x1a
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(len(m.Dest)))
|
|
|
|
i += copy(data[i:], m.Dest)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
if m.Output != 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x20
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Output))
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
2017-07-18 06:08:22 +00:00
|
|
|
if m.Readonly {
|
|
|
|
data[i] = 0x28
|
|
|
|
i++
|
|
|
|
if m.Readonly {
|
|
|
|
data[i] = 1
|
|
|
|
} else {
|
|
|
|
data[i] = 0
|
|
|
|
}
|
|
|
|
i++
|
|
|
|
}
|
2017-06-06 18:01:18 +00:00
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopyOp) Marshal() (data []byte, err error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopyOp) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Src) > 0 {
|
|
|
|
for _, msg := range m.Src {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0xa
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(msg.Size()))
|
|
|
|
n, err := msg.MarshalTo(data[i:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(m.Dest) > 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x12
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(len(m.Dest)))
|
|
|
|
i += copy(data[i:], m.Dest)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopySource) Marshal() (data []byte, err error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopySource) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Input != 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x8
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(m.Input))
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
if len(m.Selector) > 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0x12
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(len(m.Selector)))
|
|
|
|
i += copy(data[i:], m.Selector)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *SourceOp) Marshal() (data []byte, err error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
size := m.Size()
|
2017-06-21 21:48:21 +00:00
|
|
|
data = make([]byte, size)
|
|
|
|
n, err := m.MarshalTo(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
return data[:n], nil
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *SourceOp) MarshalTo(data []byte) (int, error) {
|
2017-06-06 18:01:18 +00:00
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Identifier) > 0 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[i] = 0xa
|
2017-06-06 18:01:18 +00:00
|
|
|
i++
|
2017-06-21 21:48:21 +00:00
|
|
|
i = encodeVarintOps(data, i, uint64(len(m.Identifier)))
|
|
|
|
i += copy(data[i:], m.Identifier)
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
2017-07-08 23:25:07 +00:00
|
|
|
if len(m.Attrs) > 0 {
|
|
|
|
for k, _ := range m.Attrs {
|
|
|
|
data[i] = 0x12
|
|
|
|
i++
|
|
|
|
v := m.Attrs[k]
|
|
|
|
mapSize := 1 + len(k) + sovOps(uint64(len(k))) + 1 + len(v) + sovOps(uint64(len(v)))
|
|
|
|
i = encodeVarintOps(data, i, uint64(mapSize))
|
|
|
|
data[i] = 0xa
|
|
|
|
i++
|
|
|
|
i = encodeVarintOps(data, i, uint64(len(k)))
|
|
|
|
i += copy(data[i:], k)
|
|
|
|
data[i] = 0x12
|
|
|
|
i++
|
|
|
|
i = encodeVarintOps(data, i, uint64(len(v)))
|
|
|
|
i += copy(data[i:], v)
|
|
|
|
}
|
|
|
|
}
|
2017-06-06 18:01:18 +00:00
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
func encodeFixed64Ops(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)
|
2017-06-06 18:01:18 +00:00
|
|
|
return offset + 8
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func encodeFixed32Ops(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)
|
2017-06-06 18:01:18 +00:00
|
|
|
return offset + 4
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func encodeVarintOps(data []byte, offset int, v uint64) int {
|
2017-06-06 18:01:18 +00:00
|
|
|
for v >= 1<<7 {
|
2017-06-21 21:48:21 +00:00
|
|
|
data[offset] = uint8(v&0x7f | 0x80)
|
2017-06-06 18:01:18 +00:00
|
|
|
v >>= 7
|
|
|
|
offset++
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
data[offset] = uint8(v)
|
2017-06-06 18:01:18 +00:00
|
|
|
return offset + 1
|
|
|
|
}
|
|
|
|
func (m *Op) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Inputs) > 0 {
|
2017-06-09 01:16:19 +00:00
|
|
|
for _, e := range m.Inputs {
|
|
|
|
l = e.Size()
|
2017-06-06 18:01:18 +00:00
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if m.Op != nil {
|
|
|
|
n += m.Op.Size()
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Op_Exec) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Exec != nil {
|
|
|
|
l = m.Exec.Size()
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
func (m *Op_Source) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Source != nil {
|
|
|
|
l = m.Source.Size()
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
func (m *Op_Copy) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Copy != nil {
|
|
|
|
l = m.Copy.Size()
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
2017-06-09 01:16:19 +00:00
|
|
|
func (m *Input) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Digest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Index != 0 {
|
|
|
|
n += 1 + sovOps(uint64(m.Index))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2017-06-06 18:01:18 +00:00
|
|
|
func (m *ExecOp) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Meta != nil {
|
|
|
|
l = m.Meta.Size()
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
if len(m.Mounts) > 0 {
|
|
|
|
for _, e := range m.Mounts {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Meta) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Args) > 0 {
|
|
|
|
for _, s := range m.Args {
|
|
|
|
l = len(s)
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(m.Env) > 0 {
|
|
|
|
for _, s := range m.Env {
|
|
|
|
l = len(s)
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
l = len(m.Cwd)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Mount) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Input != 0 {
|
|
|
|
n += 1 + sovOps(uint64(m.Input))
|
|
|
|
}
|
|
|
|
l = len(m.Selector)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
l = len(m.Dest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Output != 0 {
|
|
|
|
n += 1 + sovOps(uint64(m.Output))
|
|
|
|
}
|
2017-07-18 06:08:22 +00:00
|
|
|
if m.Readonly {
|
|
|
|
n += 2
|
|
|
|
}
|
2017-06-06 18:01:18 +00:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CopyOp) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Src) > 0 {
|
|
|
|
for _, e := range m.Src {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
l = len(m.Dest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CopySource) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Input != 0 {
|
|
|
|
n += 1 + sovOps(uint64(m.Input))
|
|
|
|
}
|
|
|
|
l = len(m.Selector)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SourceOp) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Identifier)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovOps(uint64(l))
|
|
|
|
}
|
2017-07-08 23:25:07 +00:00
|
|
|
if len(m.Attrs) > 0 {
|
|
|
|
for k, v := range m.Attrs {
|
|
|
|
_ = k
|
|
|
|
_ = v
|
|
|
|
mapEntrySize := 1 + len(k) + sovOps(uint64(len(k))) + 1 + len(v) + sovOps(uint64(len(v)))
|
|
|
|
n += mapEntrySize + 1 + sovOps(uint64(mapEntrySize))
|
|
|
|
}
|
|
|
|
}
|
2017-06-06 18:01:18 +00:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func sovOps(x uint64) (n int) {
|
|
|
|
for {
|
|
|
|
n++
|
|
|
|
x >>= 7
|
|
|
|
if x == 0 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
func sozOps(x uint64) (n int) {
|
|
|
|
return sovOps(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Op) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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: Op: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Op: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType)
|
|
|
|
}
|
2017-06-09 01:16:19 +00:00
|
|
|
var msglen int
|
2017-06-06 18:01:18 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
2017-06-09 01:16:19 +00:00
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
2017-06-06 18:01:18 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-06-09 01:16:19 +00:00
|
|
|
if msglen < 0 {
|
2017-06-06 18:01:18 +00:00
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
2017-06-09 01:16:19 +00:00
|
|
|
postIndex := iNdEx + msglen
|
2017-06-06 18:01:18 +00:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-09 01:16:19 +00:00
|
|
|
m.Inputs = append(m.Inputs, &Input{})
|
2017-06-21 21:48:21 +00:00
|
|
|
if err := m.Inputs[len(m.Inputs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
2017-06-09 01:16:19 +00:00
|
|
|
return err
|
|
|
|
}
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
v := &ExecOp{}
|
2017-06-21 21:48:21 +00:00
|
|
|
if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
2017-06-06 18:01:18 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
m.Op = &Op_Exec{v}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
v := &SourceOp{}
|
2017-06-21 21:48:21 +00:00
|
|
|
if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
2017-06-06 18:01:18 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
m.Op = &Op_Source{v}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Copy", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
v := &CopyOp{}
|
2017-06-21 21:48:21 +00:00
|
|
|
if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
2017-06-06 18:01:18 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
m.Op = &Op_Copy{v}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Input) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-09 01:16:19 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-09 01:16:19 +00:00
|
|
|
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: Input: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-09 01:16:19 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Digest = github_com_opencontainers_go_digest.Digest(data[iNdEx:postIndex])
|
2017-06-09 01:16:19 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
|
|
|
}
|
|
|
|
m.Index = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-09 01:16:19 +00:00
|
|
|
iNdEx++
|
2017-07-21 17:58:24 +00:00
|
|
|
m.Index |= (OutputIndex(b) & 0x7F) << shift
|
2017-06-09 01:16:19 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-09 01:16:19 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *ExecOp) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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: ExecOp: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: ExecOp: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if m.Meta == nil {
|
|
|
|
m.Meta = &Meta{}
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
2017-06-06 18:01:18 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Mounts = append(m.Mounts, &Mount{})
|
2017-06-21 21:48:21 +00:00
|
|
|
if err := m.Mounts[len(m.Mounts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
2017-06-06 18:01:18 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Meta) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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: Meta: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Meta: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Args = append(m.Args, string(data[iNdEx:postIndex]))
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Env = append(m.Env, string(data[iNdEx:postIndex]))
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cwd", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Cwd = string(data[iNdEx:postIndex])
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *Mount) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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: Mount: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType)
|
|
|
|
}
|
|
|
|
m.Input = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
2017-07-21 17:58:24 +00:00
|
|
|
m.Input |= (InputIndex(b) & 0x7F) << shift
|
2017-06-06 18:01:18 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Selector = string(data[iNdEx:postIndex])
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Dest", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Dest = string(data[iNdEx:postIndex])
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 4:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType)
|
|
|
|
}
|
|
|
|
m.Output = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
2017-07-21 17:58:24 +00:00
|
|
|
m.Output |= (OutputIndex(b) & 0x7F) << shift
|
2017-06-06 18:01:18 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-07-18 06:08:22 +00:00
|
|
|
case 5:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Readonly", wireType)
|
|
|
|
}
|
|
|
|
var v int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := data[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
v |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m.Readonly = bool(v != 0)
|
2017-06-06 18:01:18 +00:00
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopyOp) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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: CopyOp: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: CopyOp: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Src", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Src = append(m.Src, &CopySource{})
|
2017-06-21 21:48:21 +00:00
|
|
|
if err := m.Src[len(m.Src)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
|
2017-06-06 18:01:18 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Dest", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Dest = string(data[iNdEx:postIndex])
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *CopySource) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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: CopySource: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: CopySource: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType)
|
|
|
|
}
|
|
|
|
m.Input = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
2017-07-21 17:58:24 +00:00
|
|
|
m.Input |= (InputIndex(b) & 0x7F) << shift
|
2017-06-06 18:01:18 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Selector = string(data[iNdEx:postIndex])
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func (m *SourceOp) Unmarshal(data []byte) error {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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: SourceOp: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: SourceOp: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
m.Identifier = string(data[iNdEx:postIndex])
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx = postIndex
|
2017-07-08 23:25:07 +00:00
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := data[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
var keykey uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := data[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
keykey |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var stringLenmapkey uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := data[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLenmapkey := int(stringLenmapkey)
|
|
|
|
if intStringLenmapkey < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
|
|
|
if postStringIndexmapkey > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
mapkey := string(data[iNdEx:postStringIndexmapkey])
|
|
|
|
iNdEx = postStringIndexmapkey
|
|
|
|
var valuekey uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := data[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
valuekey |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var stringLenmapvalue uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := data[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLenmapvalue := int(stringLenmapvalue)
|
|
|
|
if intStringLenmapvalue < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
|
|
|
if postStringIndexmapvalue > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
mapvalue := string(data[iNdEx:postStringIndexmapvalue])
|
|
|
|
iNdEx = postStringIndexmapvalue
|
|
|
|
if m.Attrs == nil {
|
|
|
|
m.Attrs = make(map[string]string)
|
|
|
|
}
|
|
|
|
m.Attrs[mapkey] = mapvalue
|
|
|
|
iNdEx = postIndex
|
2017-06-06 18:01:18 +00:00
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-06-21 21:48:21 +00:00
|
|
|
skippy, err := skipOps(data[iNdEx:])
|
2017-06-06 18:01:18 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
func skipOps(data []byte) (n int, err error) {
|
|
|
|
l := len(data)
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
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, ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx++
|
2017-06-21 21:48:21 +00:00
|
|
|
if data[iNdEx-1] < 0x80 {
|
2017-06-06 18:01:18 +00:00
|
|
|
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, ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
length |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iNdEx += length
|
|
|
|
if length < 0 {
|
|
|
|
return 0, ErrInvalidLengthOps
|
|
|
|
}
|
|
|
|
return iNdEx, nil
|
|
|
|
case 3:
|
|
|
|
for {
|
|
|
|
var innerWire uint64
|
|
|
|
var start int = iNdEx
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowOps
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
b := data[iNdEx]
|
2017-06-06 18:01:18 +00:00
|
|
|
iNdEx++
|
|
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
innerWireType := int(innerWire & 0x7)
|
|
|
|
if innerWireType == 4 {
|
|
|
|
break
|
|
|
|
}
|
2017-06-21 21:48:21 +00:00
|
|
|
next, err := skipOps(data[start:])
|
2017-06-06 18:01:18 +00:00
|
|
|
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 (
|
|
|
|
ErrInvalidLengthOps = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
ErrIntOverflowOps = fmt.Errorf("proto: integer overflow")
|
|
|
|
)
|