2017-02-14 02:44:01 +00:00
|
|
|
// Code generated by protoc-gen-gogo.
|
|
|
|
// source: github.com/docker/containerd/api/services/content/content.proto
|
|
|
|
// DO NOT EDIT!
|
|
|
|
|
|
|
|
/*
|
|
|
|
Package content is a generated protocol buffer package.
|
|
|
|
|
|
|
|
It is generated from these files:
|
|
|
|
github.com/docker/containerd/api/services/content/content.proto
|
|
|
|
|
|
|
|
It has these top-level messages:
|
|
|
|
InfoRequest
|
|
|
|
InfoResponse
|
2017-02-28 04:06:29 +00:00
|
|
|
DeleteContentRequest
|
2017-02-14 02:44:01 +00:00
|
|
|
ReadRequest
|
|
|
|
ReadResponse
|
|
|
|
WriteRequest
|
|
|
|
WriteResponse
|
|
|
|
StatusRequest
|
|
|
|
StatusResponse
|
|
|
|
*/
|
|
|
|
package content
|
|
|
|
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
|
|
|
import _ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
import _ "github.com/gogo/protobuf/types"
|
2017-02-28 04:06:29 +00:00
|
|
|
import google_protobuf2 "github.com/golang/protobuf/ptypes/empty"
|
2017-02-14 02:44:01 +00:00
|
|
|
|
|
|
|
import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
|
|
|
|
import time "time"
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "golang.org/x/net/context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
|
|
|
|
|
|
import strings "strings"
|
|
|
|
import reflect "reflect"
|
|
|
|
|
|
|
|
import io "io"
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
var _ = time.Kitchen
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
|
|
|
|
// WriteAction defines the behavior of a WriteRequest.
|
|
|
|
type WriteAction int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
// WriteActionStat instructs the writer to return the current status while
|
|
|
|
// holding the lock on the write.
|
|
|
|
WriteActionStat WriteAction = 0
|
|
|
|
// WriteActionWrite sets the action for the write request to write data.
|
|
|
|
//
|
|
|
|
// Any data included will be written at the provided offset. The
|
|
|
|
// transaction will be left open for further writes.
|
|
|
|
//
|
|
|
|
// This is the default.
|
|
|
|
WriteActionWrite WriteAction = 1
|
|
|
|
// WriteActionCommit will write any outstanding data in the message and
|
|
|
|
// commit the write, storing it under the digest.
|
|
|
|
//
|
|
|
|
// This can be used in a single message to send the data, verify it and
|
|
|
|
// commit it.
|
|
|
|
//
|
|
|
|
// This action will always terminate the write.
|
|
|
|
WriteActionCommit WriteAction = 2
|
|
|
|
// WriteActionAbort will release any resources associated with the write
|
|
|
|
// and free up the ref for a completely new set of writes.
|
|
|
|
//
|
|
|
|
// This action will always terminate the write.
|
|
|
|
WriteActionAbort WriteAction = -1
|
|
|
|
)
|
|
|
|
|
|
|
|
var WriteAction_name = map[int32]string{
|
|
|
|
0: "STAT",
|
|
|
|
1: "WRITE",
|
|
|
|
2: "COMMIT",
|
|
|
|
-1: "ABORT",
|
|
|
|
}
|
|
|
|
var WriteAction_value = map[string]int32{
|
|
|
|
"STAT": 0,
|
|
|
|
"WRITE": 1,
|
|
|
|
"COMMIT": 2,
|
|
|
|
"ABORT": -1,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x WriteAction) String() string {
|
|
|
|
return proto.EnumName(WriteAction_name, int32(x))
|
|
|
|
}
|
|
|
|
func (WriteAction) EnumDescriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} }
|
|
|
|
|
|
|
|
type InfoRequest struct {
|
|
|
|
Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InfoRequest) Reset() { *m = InfoRequest{} }
|
|
|
|
func (*InfoRequest) ProtoMessage() {}
|
|
|
|
func (*InfoRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} }
|
|
|
|
|
|
|
|
type InfoResponse struct {
|
|
|
|
// Digest is the hash identity of the blob.
|
|
|
|
Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
|
|
|
|
// Size is the total number of bytes in the blob.
|
|
|
|
Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
|
|
|
// CommittedAt provides the time at which the blob was committed.
|
|
|
|
CommittedAt time.Time `protobuf:"bytes,3,opt,name=committed_at,json=committedAt,stdtime" json:"committed_at"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InfoResponse) Reset() { *m = InfoResponse{} }
|
|
|
|
func (*InfoResponse) ProtoMessage() {}
|
|
|
|
func (*InfoResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{1} }
|
|
|
|
|
2017-02-28 04:06:29 +00:00
|
|
|
type DeleteContentRequest struct {
|
|
|
|
// Digest specifies which content to delete.
|
|
|
|
Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DeleteContentRequest) Reset() { *m = DeleteContentRequest{} }
|
|
|
|
func (*DeleteContentRequest) ProtoMessage() {}
|
|
|
|
func (*DeleteContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{2} }
|
|
|
|
|
2017-02-14 02:44:01 +00:00
|
|
|
// ReadRequest defines the fields that make up a request to read a portion of
|
|
|
|
// data from a stored object.
|
|
|
|
type ReadRequest struct {
|
|
|
|
// Digest is the hash identity to read.
|
|
|
|
Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
|
|
|
|
// Offset specifies the number of bytes from the start at which to begin
|
|
|
|
// the read. If zero or less, the read will be from the start. This uses
|
|
|
|
// standard zero-indexed semantics.
|
|
|
|
Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
|
|
// size is the total size of the read. If zero, the entire blob will be
|
|
|
|
// returned by the service.
|
|
|
|
Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadRequest) Reset() { *m = ReadRequest{} }
|
|
|
|
func (*ReadRequest) ProtoMessage() {}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (*ReadRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{3} }
|
2017-02-14 02:44:01 +00:00
|
|
|
|
|
|
|
// ReadResponse carries byte data for a read request.
|
|
|
|
type ReadResponse struct {
|
|
|
|
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadResponse) Reset() { *m = ReadResponse{} }
|
|
|
|
func (*ReadResponse) ProtoMessage() {}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (*ReadResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{4} }
|
2017-02-14 02:44:01 +00:00
|
|
|
|
|
|
|
// WriteRequest writes data to the request ref at offset.
|
|
|
|
type WriteRequest struct {
|
|
|
|
// Action sets the behavior of the write.
|
|
|
|
//
|
|
|
|
// When this is a write and the ref is not yet allocated, the ref will be
|
|
|
|
// allocated and the data will be written at offset.
|
|
|
|
//
|
|
|
|
// If the action is write and the ref is allocated, it will accept data to
|
|
|
|
// an offset that has not yet been written.
|
|
|
|
//
|
|
|
|
// If the action is write and there is no data, the current write status
|
|
|
|
// will be returned. This works differently from status because the stream
|
|
|
|
// holds a lock.
|
|
|
|
Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.v1.WriteAction" json:"action,omitempty"`
|
|
|
|
// Ref identifies the pre-commit object to write to.
|
|
|
|
Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
|
2017-02-22 07:41:11 +00:00
|
|
|
// Total can be set to have the service validate the total size of the
|
|
|
|
// committed content.
|
2017-02-14 02:44:01 +00:00
|
|
|
//
|
|
|
|
// The latest value before or with the commit action message will be use to
|
2017-02-22 07:41:11 +00:00
|
|
|
// validate the content. If the offset overflows total, the service may
|
|
|
|
// report an error. It is only required on one message for the write.
|
2017-02-14 02:44:01 +00:00
|
|
|
//
|
|
|
|
// If the value is zero or less, no validation of the final content will be
|
|
|
|
// performed.
|
2017-02-22 07:41:11 +00:00
|
|
|
Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
|
|
|
|
// Expected can be set to have the service validate the final content against
|
|
|
|
// the provided digest.
|
2017-02-14 02:44:01 +00:00
|
|
|
//
|
2017-02-22 07:41:11 +00:00
|
|
|
// If the digest is already present in the object store, an AlreadyExists
|
2017-02-14 02:44:01 +00:00
|
|
|
// error will be returned.
|
|
|
|
//
|
|
|
|
// Only the latest version will be used to check the content against the
|
|
|
|
// digest. It is only required to include it on a single message, before or
|
|
|
|
// with the commit action message.
|
2017-02-22 07:41:11 +00:00
|
|
|
Expected github_com_opencontainers_go_digest.Digest `protobuf:"bytes,4,opt,name=expected,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"expected"`
|
2017-02-14 02:44:01 +00:00
|
|
|
// Offset specifies the number of bytes from the start at which to begin
|
2017-02-28 03:02:16 +00:00
|
|
|
// the write. For most implementations, this means from the start of the
|
|
|
|
// file. This uses standard, zero-indexed semantics.
|
|
|
|
//
|
|
|
|
// If the action is write, the remote may remove all previously written
|
|
|
|
// data up to the offset. Implementations may support arbitrary offsets but
|
|
|
|
// MUST support reseting this value to zero with with a write. If an
|
|
|
|
// implementation does not support a write at a particular offset, an
|
|
|
|
// OutOfRange error must be returned.
|
2017-02-14 02:44:01 +00:00
|
|
|
Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
|
|
// Data is the actual bytes to be written.
|
|
|
|
//
|
|
|
|
// If this is empty and the message is not a commit, a response will be
|
|
|
|
// returned with the current write state.
|
|
|
|
Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WriteRequest) Reset() { *m = WriteRequest{} }
|
|
|
|
func (*WriteRequest) ProtoMessage() {}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (*WriteRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{5} }
|
2017-02-14 02:44:01 +00:00
|
|
|
|
|
|
|
// WriteResponse is returned on the culmination of a write call.
|
|
|
|
type WriteResponse struct {
|
|
|
|
// Action contains the action for the final message of the stream. A writer
|
|
|
|
// should confirm that they match the intended result.
|
|
|
|
Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.v1.WriteAction" json:"action,omitempty"`
|
2017-02-22 07:41:11 +00:00
|
|
|
// StartedAt provides the time at which the write began.
|
|
|
|
//
|
|
|
|
// This must be set for stat and commit write actions. All other write
|
|
|
|
// actions may omit this.
|
|
|
|
StartedAt time.Time `protobuf:"bytes,2,opt,name=started_at,json=startedAt,stdtime" json:"started_at"`
|
|
|
|
// UpdatedAt provides the last time of a successful write.
|
|
|
|
//
|
|
|
|
// This must be set for stat and commit write actions. All other write
|
|
|
|
// actions may omit this.
|
|
|
|
UpdatedAt time.Time `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
|
|
|
|
// Offset is the current committed size for the write.
|
|
|
|
Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
|
|
// Total provides the current, expected total size of the write.
|
|
|
|
//
|
|
|
|
// We include this to provide consistency with the Status structure on the
|
|
|
|
// client writer.
|
|
|
|
//
|
|
|
|
// This is only valid on the Stat and Commit response.
|
|
|
|
Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
|
2017-02-14 02:44:01 +00:00
|
|
|
// Digest, if present, includes the digest up to the currently committed
|
|
|
|
// bytes. If action is commit, this field will be set. It is implementation
|
|
|
|
// defined if this is set for other actions, except abort. On abort, this
|
|
|
|
// will be empty.
|
2017-02-22 07:41:11 +00:00
|
|
|
Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WriteResponse) Reset() { *m = WriteResponse{} }
|
|
|
|
func (*WriteResponse) ProtoMessage() {}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (*WriteResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{6} }
|
2017-02-14 02:44:01 +00:00
|
|
|
|
|
|
|
type StatusRequest struct {
|
|
|
|
Refs []string `protobuf:"bytes,1,rep,name=refs" json:"refs,omitempty"`
|
|
|
|
Prefix []string `protobuf:"bytes,2,rep,name=prefix" json:"prefix,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *StatusRequest) Reset() { *m = StatusRequest{} }
|
|
|
|
func (*StatusRequest) ProtoMessage() {}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{7} }
|
2017-02-14 02:44:01 +00:00
|
|
|
|
|
|
|
type StatusResponse struct {
|
2017-02-22 07:41:11 +00:00
|
|
|
StartedAt time.Time `protobuf:"bytes,1,opt,name=started_at,json=startedAt,stdtime" json:"started_at"`
|
|
|
|
UpdatedAt time.Time `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
|
|
|
|
Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"`
|
|
|
|
Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
|
|
Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *StatusResponse) Reset() { *m = StatusResponse{} }
|
|
|
|
func (*StatusResponse) ProtoMessage() {}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{8} }
|
2017-02-14 02:44:01 +00:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*InfoRequest)(nil), "containerd.v1.InfoRequest")
|
|
|
|
proto.RegisterType((*InfoResponse)(nil), "containerd.v1.InfoResponse")
|
2017-02-28 04:06:29 +00:00
|
|
|
proto.RegisterType((*DeleteContentRequest)(nil), "containerd.v1.DeleteContentRequest")
|
2017-02-14 02:44:01 +00:00
|
|
|
proto.RegisterType((*ReadRequest)(nil), "containerd.v1.ReadRequest")
|
|
|
|
proto.RegisterType((*ReadResponse)(nil), "containerd.v1.ReadResponse")
|
|
|
|
proto.RegisterType((*WriteRequest)(nil), "containerd.v1.WriteRequest")
|
|
|
|
proto.RegisterType((*WriteResponse)(nil), "containerd.v1.WriteResponse")
|
|
|
|
proto.RegisterType((*StatusRequest)(nil), "containerd.v1.StatusRequest")
|
|
|
|
proto.RegisterType((*StatusResponse)(nil), "containerd.v1.StatusResponse")
|
|
|
|
proto.RegisterEnum("containerd.v1.WriteAction", WriteAction_name, WriteAction_value)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
|
|
|
// Client API for Content service
|
|
|
|
|
|
|
|
type ContentClient interface {
|
|
|
|
// Info returns information about a committed object.
|
|
|
|
//
|
|
|
|
// This call can be used for getting the size of content and checking for
|
|
|
|
// existence.
|
|
|
|
Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
|
2017-02-28 04:06:29 +00:00
|
|
|
// Delete will delete the referenced object.
|
|
|
|
Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
|
2017-02-14 02:44:01 +00:00
|
|
|
// Read allows one to read an object based on the offset into the content.
|
|
|
|
//
|
|
|
|
// The requested data may be returned in one or more messages.
|
|
|
|
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (Content_ReadClient, error)
|
|
|
|
// Status returns the status of ongoing object ingestions, started via
|
|
|
|
// Write.
|
|
|
|
//
|
|
|
|
// For active ingestions, the status will be streamed until the client
|
|
|
|
// closes the connection or all matched ingestions are committed.
|
|
|
|
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (Content_StatusClient, error)
|
|
|
|
// Write begins or resumes writes to a resource identified by a unique ref.
|
|
|
|
// Only one active stream may exist at a time for each ref.
|
|
|
|
//
|
|
|
|
// Once a write stream has started, it may only write to a single ref, thus
|
|
|
|
// once a stream is started, the ref may be ommitted on subsequent writes.
|
|
|
|
//
|
|
|
|
// For any write transaction represented by a ref, only a single write may
|
|
|
|
// be made to a given offset. If overlapping writes occur, it is an error.
|
|
|
|
// Writes should be sequential and implementations may throw an error if
|
|
|
|
// this is required.
|
|
|
|
//
|
|
|
|
// If expected_digest is set and already part of the content store, the
|
|
|
|
// write will fail.
|
|
|
|
//
|
|
|
|
// When completed, the commit flag should be set to true. If expected size
|
|
|
|
// or digest is set, the content will be validated against those values.
|
|
|
|
Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type contentClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewContentClient(cc *grpc.ClientConn) ContentClient {
|
|
|
|
return &contentClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *contentClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) {
|
|
|
|
out := new(InfoResponse)
|
|
|
|
err := grpc.Invoke(ctx, "/containerd.v1.Content/Info", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-02-28 04:06:29 +00:00
|
|
|
func (c *contentClient) Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) {
|
|
|
|
out := new(google_protobuf2.Empty)
|
|
|
|
err := grpc.Invoke(ctx, "/containerd.v1.Content/Delete", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-02-14 02:44:01 +00:00
|
|
|
func (c *contentClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (Content_ReadClient, error) {
|
|
|
|
stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[0], c.cc, "/containerd.v1.Content/Read", opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
x := &contentReadClient{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 Content_ReadClient interface {
|
|
|
|
Recv() (*ReadResponse, error)
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type contentReadClient struct {
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentReadClient) Recv() (*ReadResponse, error) {
|
|
|
|
m := new(ReadResponse)
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *contentClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (Content_StatusClient, error) {
|
|
|
|
stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[1], c.cc, "/containerd.v1.Content/Status", opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
x := &contentStatusClient{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 Content_StatusClient interface {
|
|
|
|
Recv() (*StatusResponse, error)
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type contentStatusClient struct {
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentStatusClient) Recv() (*StatusResponse, error) {
|
|
|
|
m := new(StatusResponse)
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *contentClient) Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error) {
|
|
|
|
stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[2], c.cc, "/containerd.v1.Content/Write", opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
x := &contentWriteClient{stream}
|
|
|
|
return x, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type Content_WriteClient interface {
|
|
|
|
Send(*WriteRequest) error
|
|
|
|
Recv() (*WriteResponse, error)
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type contentWriteClient struct {
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentWriteClient) Send(m *WriteRequest) error {
|
|
|
|
return x.ClientStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentWriteClient) Recv() (*WriteResponse, error) {
|
|
|
|
m := new(WriteResponse)
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Server API for Content service
|
|
|
|
|
|
|
|
type ContentServer interface {
|
|
|
|
// Info returns information about a committed object.
|
|
|
|
//
|
|
|
|
// This call can be used for getting the size of content and checking for
|
|
|
|
// existence.
|
|
|
|
Info(context.Context, *InfoRequest) (*InfoResponse, error)
|
2017-02-28 04:06:29 +00:00
|
|
|
// Delete will delete the referenced object.
|
|
|
|
Delete(context.Context, *DeleteContentRequest) (*google_protobuf2.Empty, error)
|
2017-02-14 02:44:01 +00:00
|
|
|
// Read allows one to read an object based on the offset into the content.
|
|
|
|
//
|
|
|
|
// The requested data may be returned in one or more messages.
|
|
|
|
Read(*ReadRequest, Content_ReadServer) error
|
|
|
|
// Status returns the status of ongoing object ingestions, started via
|
|
|
|
// Write.
|
|
|
|
//
|
|
|
|
// For active ingestions, the status will be streamed until the client
|
|
|
|
// closes the connection or all matched ingestions are committed.
|
|
|
|
Status(*StatusRequest, Content_StatusServer) error
|
|
|
|
// Write begins or resumes writes to a resource identified by a unique ref.
|
|
|
|
// Only one active stream may exist at a time for each ref.
|
|
|
|
//
|
|
|
|
// Once a write stream has started, it may only write to a single ref, thus
|
|
|
|
// once a stream is started, the ref may be ommitted on subsequent writes.
|
|
|
|
//
|
|
|
|
// For any write transaction represented by a ref, only a single write may
|
|
|
|
// be made to a given offset. If overlapping writes occur, it is an error.
|
|
|
|
// Writes should be sequential and implementations may throw an error if
|
|
|
|
// this is required.
|
|
|
|
//
|
|
|
|
// If expected_digest is set and already part of the content store, the
|
|
|
|
// write will fail.
|
|
|
|
//
|
|
|
|
// When completed, the commit flag should be set to true. If expected size
|
|
|
|
// or digest is set, the content will be validated against those values.
|
|
|
|
Write(Content_WriteServer) error
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterContentServer(s *grpc.Server, srv ContentServer) {
|
|
|
|
s.RegisterService(&_Content_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Content_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(InfoRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ContentServer).Info(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/containerd.v1.Content/Info",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ContentServer).Info(ctx, req.(*InfoRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-02-28 04:06:29 +00:00
|
|
|
func _Content_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(DeleteContentRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ContentServer).Delete(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/containerd.v1.Content/Delete",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ContentServer).Delete(ctx, req.(*DeleteContentRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-02-14 02:44:01 +00:00
|
|
|
func _Content_Read_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
m := new(ReadRequest)
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return srv.(ContentServer).Read(m, &contentReadServer{stream})
|
|
|
|
}
|
|
|
|
|
|
|
|
type Content_ReadServer interface {
|
|
|
|
Send(*ReadResponse) error
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type contentReadServer struct {
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentReadServer) Send(m *ReadResponse) error {
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Content_Status_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
m := new(StatusRequest)
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return srv.(ContentServer).Status(m, &contentStatusServer{stream})
|
|
|
|
}
|
|
|
|
|
|
|
|
type Content_StatusServer interface {
|
|
|
|
Send(*StatusResponse) error
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type contentStatusServer struct {
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentStatusServer) Send(m *StatusResponse) error {
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Content_Write_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
return srv.(ContentServer).Write(&contentWriteServer{stream})
|
|
|
|
}
|
|
|
|
|
|
|
|
type Content_WriteServer interface {
|
|
|
|
Send(*WriteResponse) error
|
|
|
|
Recv() (*WriteRequest, error)
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type contentWriteServer struct {
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentWriteServer) Send(m *WriteResponse) error {
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *contentWriteServer) Recv() (*WriteRequest, error) {
|
|
|
|
m := new(WriteRequest)
|
|
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Content_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "containerd.v1.Content",
|
|
|
|
HandlerType: (*ContentServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Info",
|
|
|
|
Handler: _Content_Info_Handler,
|
|
|
|
},
|
2017-02-28 04:06:29 +00:00
|
|
|
{
|
|
|
|
MethodName: "Delete",
|
|
|
|
Handler: _Content_Delete_Handler,
|
|
|
|
},
|
2017-02-14 02:44:01 +00:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{
|
|
|
|
{
|
|
|
|
StreamName: "Read",
|
|
|
|
Handler: _Content_Read_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
StreamName: "Status",
|
|
|
|
Handler: _Content_Status_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
StreamName: "Write",
|
|
|
|
Handler: _Content_Write_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
ClientStreams: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Metadata: "github.com/docker/containerd/api/services/content/content.proto",
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InfoRequest) 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 *InfoRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Digest) > 0 {
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
|
|
|
|
i += copy(dAtA[i:], m.Digest)
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InfoResponse) 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 *InfoResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Digest) > 0 {
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
|
|
|
|
i += copy(dAtA[i:], m.Digest)
|
|
|
|
}
|
|
|
|
if m.Size_ != 0 {
|
|
|
|
dAtA[i] = 0x10
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Size_))
|
|
|
|
}
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CommittedAt)))
|
|
|
|
n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CommittedAt, dAtA[i:])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n1
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-02-28 04:06:29 +00:00
|
|
|
func (m *DeleteContentRequest) 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 *DeleteContentRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Digest) > 0 {
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
|
|
|
|
i += copy(dAtA[i:], m.Digest)
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
2017-02-14 02:44:01 +00:00
|
|
|
func (m *ReadRequest) 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 *ReadRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Digest) > 0 {
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
|
|
|
|
i += copy(dAtA[i:], m.Digest)
|
|
|
|
}
|
|
|
|
if m.Offset != 0 {
|
|
|
|
dAtA[i] = 0x10
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Offset))
|
|
|
|
}
|
|
|
|
if m.Size_ != 0 {
|
|
|
|
dAtA[i] = 0x18
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Size_))
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadResponse) 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 *ReadResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Offset != 0 {
|
|
|
|
dAtA[i] = 0x8
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Offset))
|
|
|
|
}
|
|
|
|
if len(m.Data) > 0 {
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Data)))
|
|
|
|
i += copy(dAtA[i:], m.Data)
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WriteRequest) 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 *WriteRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Action != 0 {
|
|
|
|
dAtA[i] = 0x8
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Action))
|
|
|
|
}
|
|
|
|
if len(m.Ref) > 0 {
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Ref)))
|
|
|
|
i += copy(dAtA[i:], m.Ref)
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if m.Total != 0 {
|
2017-02-14 02:44:01 +00:00
|
|
|
dAtA[i] = 0x18
|
|
|
|
i++
|
2017-02-22 07:41:11 +00:00
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Total))
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if len(m.Expected) > 0 {
|
2017-02-14 02:44:01 +00:00
|
|
|
dAtA[i] = 0x22
|
|
|
|
i++
|
2017-02-22 07:41:11 +00:00
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Expected)))
|
|
|
|
i += copy(dAtA[i:], m.Expected)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
|
|
|
if m.Offset != 0 {
|
|
|
|
dAtA[i] = 0x28
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Offset))
|
|
|
|
}
|
|
|
|
if len(m.Data) > 0 {
|
|
|
|
dAtA[i] = 0x32
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Data)))
|
|
|
|
i += copy(dAtA[i:], m.Data)
|
|
|
|
}
|
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WriteResponse) 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 *WriteResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
var i int
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Action != 0 {
|
|
|
|
dAtA[i] = 0x8
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Action))
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
dAtA[i] = 0x12
|
2017-02-14 02:44:01 +00:00
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)))
|
|
|
|
n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n2
|
2017-02-22 07:41:11 +00:00
|
|
|
dAtA[i] = 0x1a
|
2017-02-14 02:44:01 +00:00
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
|
|
|
|
n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n3
|
2017-02-22 07:41:11 +00:00
|
|
|
if m.Offset != 0 {
|
|
|
|
dAtA[i] = 0x20
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Offset))
|
|
|
|
}
|
|
|
|
if m.Total != 0 {
|
|
|
|
dAtA[i] = 0x28
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Total))
|
|
|
|
}
|
|
|
|
if len(m.Digest) > 0 {
|
|
|
|
dAtA[i] = 0x32
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
|
|
|
|
i += copy(dAtA[i:], m.Digest)
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
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
|
|
|
|
if len(m.Refs) > 0 {
|
|
|
|
for _, s := range m.Refs {
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
i++
|
|
|
|
l = len(s)
|
|
|
|
for l >= 1<<7 {
|
|
|
|
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
|
|
l >>= 7
|
|
|
|
i++
|
|
|
|
}
|
|
|
|
dAtA[i] = uint8(l)
|
|
|
|
i++
|
|
|
|
i += copy(dAtA[i:], s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(m.Prefix) > 0 {
|
|
|
|
for _, s := range m.Prefix {
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
i++
|
|
|
|
l = len(s)
|
|
|
|
for l >= 1<<7 {
|
|
|
|
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
|
|
|
|
l >>= 7
|
|
|
|
i++
|
|
|
|
}
|
|
|
|
dAtA[i] = uint8(l)
|
|
|
|
i++
|
|
|
|
i += copy(dAtA[i:], s)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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
|
2017-02-22 07:41:11 +00:00
|
|
|
dAtA[i] = 0xa
|
2017-02-14 02:44:01 +00:00
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)))
|
|
|
|
n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n4
|
2017-02-22 07:41:11 +00:00
|
|
|
dAtA[i] = 0x12
|
2017-02-14 02:44:01 +00:00
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
|
|
|
|
n5, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i += n5
|
2017-02-22 07:41:11 +00:00
|
|
|
if len(m.Ref) > 0 {
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(len(m.Ref)))
|
|
|
|
i += copy(dAtA[i:], m.Ref)
|
|
|
|
}
|
|
|
|
if m.Offset != 0 {
|
|
|
|
dAtA[i] = 0x20
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Offset))
|
|
|
|
}
|
|
|
|
if m.Total != 0 {
|
|
|
|
dAtA[i] = 0x28
|
|
|
|
i++
|
|
|
|
i = encodeVarintContent(dAtA, i, uint64(m.Total))
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
return i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func encodeFixed64Content(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 encodeFixed32Content(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 encodeVarintContent(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 *InfoRequest) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Digest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InfoResponse) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Digest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Size_ != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Size_))
|
|
|
|
}
|
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CommittedAt)
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2017-02-28 04:06:29 +00:00
|
|
|
func (m *DeleteContentRequest) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Digest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2017-02-14 02:44:01 +00:00
|
|
|
func (m *ReadRequest) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Digest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Offset != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Offset))
|
|
|
|
}
|
|
|
|
if m.Size_ != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Size_))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadResponse) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Offset != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Offset))
|
|
|
|
}
|
|
|
|
l = len(m.Data)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WriteRequest) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Action != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Action))
|
|
|
|
}
|
|
|
|
l = len(m.Ref)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if m.Total != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Total))
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
l = len(m.Expected)
|
2017-02-14 02:44:01 +00:00
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Offset != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Offset))
|
|
|
|
}
|
|
|
|
l = len(m.Data)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *WriteResponse) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Action != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Action))
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
2017-02-14 02:44:01 +00:00
|
|
|
if m.Offset != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Offset))
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if m.Total != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Total))
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
l = len(m.Digest)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *StatusRequest) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Refs) > 0 {
|
|
|
|
for _, s := range m.Refs {
|
|
|
|
l = len(s)
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(m.Prefix) > 0 {
|
|
|
|
for _, s := range m.Prefix {
|
|
|
|
l = len(s)
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *StatusResponse) Size() (n int) {
|
|
|
|
var l int
|
|
|
|
_ = l
|
2017-02-22 07:41:11 +00:00
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
2017-02-14 02:44:01 +00:00
|
|
|
l = len(m.Ref)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovContent(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Offset != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Offset))
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if m.Total != 0 {
|
|
|
|
n += 1 + sovContent(uint64(m.Total))
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func sovContent(x uint64) (n int) {
|
|
|
|
for {
|
|
|
|
n++
|
|
|
|
x >>= 7
|
|
|
|
if x == 0 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
func sozContent(x uint64) (n int) {
|
|
|
|
return sovContent(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
|
|
}
|
|
|
|
func (this *InfoRequest) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&InfoRequest{`,
|
|
|
|
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
|
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
func (this *InfoResponse) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&InfoResponse{`,
|
|
|
|
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
|
|
|
|
`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
|
|
|
|
`CommittedAt:` + strings.Replace(strings.Replace(this.CommittedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (this *DeleteContentRequest) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&DeleteContentRequest{`,
|
|
|
|
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
|
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
func (this *ReadRequest) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&ReadRequest{`,
|
|
|
|
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
|
|
|
|
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
|
|
|
|
`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
|
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
func (this *ReadResponse) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&ReadResponse{`,
|
|
|
|
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
|
|
|
|
`Data:` + fmt.Sprintf("%v", this.Data) + `,`,
|
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
func (this *WriteRequest) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&WriteRequest{`,
|
|
|
|
`Action:` + fmt.Sprintf("%v", this.Action) + `,`,
|
|
|
|
`Ref:` + fmt.Sprintf("%v", this.Ref) + `,`,
|
2017-02-22 07:41:11 +00:00
|
|
|
`Total:` + fmt.Sprintf("%v", this.Total) + `,`,
|
|
|
|
`Expected:` + fmt.Sprintf("%v", this.Expected) + `,`,
|
2017-02-14 02:44:01 +00:00
|
|
|
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
|
|
|
|
`Data:` + fmt.Sprintf("%v", this.Data) + `,`,
|
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
func (this *WriteResponse) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&WriteResponse{`,
|
|
|
|
`Action:` + fmt.Sprintf("%v", this.Action) + `,`,
|
|
|
|
`StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
|
|
`UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`,
|
2017-02-22 07:41:11 +00:00
|
|
|
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
|
|
|
|
`Total:` + fmt.Sprintf("%v", this.Total) + `,`,
|
|
|
|
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
|
2017-02-14 02:44:01 +00:00
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
func (this *StatusRequest) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&StatusRequest{`,
|
|
|
|
`Refs:` + fmt.Sprintf("%v", this.Refs) + `,`,
|
|
|
|
`Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`,
|
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
func (this *StatusResponse) String() string {
|
|
|
|
if this == nil {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
s := strings.Join([]string{`&StatusResponse{`,
|
|
|
|
`StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
|
|
`UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`,
|
2017-02-22 07:41:11 +00:00
|
|
|
`Ref:` + fmt.Sprintf("%v", this.Ref) + `,`,
|
|
|
|
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
|
|
|
|
`Total:` + fmt.Sprintf("%v", this.Total) + `,`,
|
2017-02-14 02:44:01 +00:00
|
|
|
`}`,
|
|
|
|
}, "")
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
func valueToStringContent(v interface{}) string {
|
|
|
|
rv := reflect.ValueOf(v)
|
|
|
|
if rv.IsNil() {
|
|
|
|
return "nil"
|
|
|
|
}
|
|
|
|
pv := reflect.Indirect(rv).Interface()
|
|
|
|
return fmt.Sprintf("*%v", pv)
|
|
|
|
}
|
|
|
|
func (m *InfoRequest) 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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: InfoRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: InfoRequest: 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *InfoResponse) 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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: InfoResponse: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: InfoResponse: 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Digest = github_com_opencontainers_go_digest.Digest(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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Size_ |= (int64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CommittedAt", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CommittedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-02-28 04:06:29 +00:00
|
|
|
func (m *DeleteContentRequest) 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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: DeleteContentRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: DeleteContentRequest: 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
func (m *ReadRequest) 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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: ReadRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: ReadRequest: 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
|
|
|
}
|
|
|
|
m.Offset = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Offset |= (int64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 3:
|
|
|
|
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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Size_ |= (int64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *ReadResponse) 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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: ReadResponse: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: ReadResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
|
|
|
}
|
|
|
|
m.Offset = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Offset |= (int64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.Data == nil {
|
|
|
|
m.Data = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *WriteRequest) 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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: WriteRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: WriteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
|
|
|
|
}
|
|
|
|
m.Action = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Action |= (WriteAction(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Ref = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
2017-02-22 07:41:11 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Total = 0
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Total |= (int64(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
2017-02-22 07:41:11 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Expected", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Expected = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])
|
2017-02-14 02:44:01 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 5:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
|
|
|
}
|
|
|
|
m.Offset = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Offset |= (int64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 6:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.Data == nil {
|
|
|
|
m.Data = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *WriteResponse) 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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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: WriteResponse: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: WriteResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
|
|
|
|
}
|
|
|
|
m.Action = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Action |= (WriteAction(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
2017-02-22 07:41:11 +00:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
var msglen int
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2017-02-14 02:44:01 +00:00
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
2017-02-22 07:41:11 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
var msglen int
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if msglen < 0 {
|
2017-02-14 02:44:01 +00:00
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
postIndex := iNdEx + msglen
|
2017-02-14 02:44:01 +00:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 4:
|
2017-02-22 07:41:11 +00:00
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Offset = 0
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Offset |= (int64(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
case 5:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Total = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Total |= (int64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
case 6:
|
2017-02-14 02:44:01 +00:00
|
|
|
if wireType != 2 {
|
2017-02-22 07:41:11 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
var stringLen uint64
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2017-02-14 02:44:01 +00:00
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
postIndex := iNdEx + intStringLen
|
2017-02-14 02:44:01 +00:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])
|
2017-02-14 02:44:01 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Refs", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Refs = append(m.Refs, string(dAtA[iNdEx:postIndex]))
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Prefix = append(m.Prefix, string(dAtA[iNdEx:postIndex]))
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
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 ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
2017-02-22 07:41:11 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
var msglen int
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if msglen < 0 {
|
2017-02-14 02:44:01 +00:00
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
postIndex := iNdEx + msglen
|
2017-02-14 02:44:01 +00:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
2017-02-22 07:41:11 +00:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
var msglen int
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
msglen |= (int(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2017-02-14 02:44:01 +00:00
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
2017-02-22 07:41:11 +00:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
var stringLen uint64
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
stringLen |= (uint64(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2017-02-14 02:44:01 +00:00
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
postIndex := iNdEx + intStringLen
|
2017-02-14 02:44:01 +00:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Ref = string(dAtA[iNdEx:postIndex])
|
2017-02-14 02:44:01 +00:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 4:
|
2017-02-22 07:41:11 +00:00
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Offset = 0
|
2017-02-14 02:44:01 +00:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Offset |= (int64(b) & 0x7F) << shift
|
2017-02-14 02:44:01 +00:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
case 5:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
2017-02-22 07:41:11 +00:00
|
|
|
m.Total = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Total |= (int64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipContent(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func skipContent(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, ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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, ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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, ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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, ErrInvalidLengthContent
|
|
|
|
}
|
|
|
|
return iNdEx, nil
|
|
|
|
case 3:
|
|
|
|
for {
|
|
|
|
var innerWire uint64
|
|
|
|
var start int = iNdEx
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowContent
|
|
|
|
}
|
|
|
|
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 := skipContent(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 (
|
|
|
|
ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
ErrIntOverflowContent = fmt.Errorf("proto: integer overflow")
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterFile("github.com/docker/containerd/api/services/content/content.proto", fileDescriptorContent)
|
|
|
|
}
|
|
|
|
|
|
|
|
var fileDescriptorContent = []byte{
|
2017-02-28 04:06:29 +00:00
|
|
|
// 777 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x4f, 0xdb, 0x48,
|
|
|
|
0x14, 0xce, 0xe4, 0x87, 0x97, 0xbc, 0x04, 0x36, 0x3b, 0x64, 0x51, 0x64, 0xc0, 0xc9, 0x66, 0x2f,
|
|
|
|
0x11, 0xd2, 0xda, 0x6c, 0xf6, 0xb6, 0x7b, 0x40, 0x4e, 0x60, 0x11, 0x2b, 0xb1, 0x48, 0x26, 0x12,
|
|
|
|
0xea, 0xa9, 0x72, 0xe2, 0x49, 0x6a, 0x95, 0x64, 0x5c, 0x7b, 0x82, 0x68, 0x4f, 0xbd, 0x54, 0xaa,
|
|
|
|
0x38, 0xf5, 0x1f, 0xe0, 0xd4, 0xde, 0x7b, 0xac, 0xd4, 0x7f, 0xa0, 0x1c, 0x7b, 0xac, 0x38, 0xd0,
|
|
|
|
0x12, 0xa9, 0xfd, 0x37, 0x5a, 0x79, 0x3c, 0x4e, 0x9c, 0x1f, 0x3d, 0x90, 0x42, 0x2e, 0x9e, 0xf1,
|
|
|
|
0x7b, 0xef, 0xd3, 0xfb, 0xbe, 0xf7, 0xe5, 0x19, 0xb6, 0x3a, 0x36, 0x7b, 0xd0, 0x6f, 0xaa, 0x2d,
|
|
|
|
0xda, 0xd5, 0x2c, 0xda, 0x7a, 0x48, 0x5c, 0xad, 0x45, 0x7b, 0xcc, 0xb4, 0x7b, 0xc4, 0xb5, 0x34,
|
|
|
|
0xd3, 0xb1, 0x35, 0x8f, 0xb8, 0x27, 0x76, 0x8b, 0x78, 0xfc, 0x3d, 0xe9, 0xb1, 0xf0, 0xa9, 0x3a,
|
|
|
|
0x2e, 0x65, 0x14, 0x2f, 0x8e, 0xd2, 0xd5, 0x93, 0x3f, 0xe5, 0x7c, 0x87, 0x76, 0x28, 0x8f, 0x68,
|
|
|
|
0xfe, 0x29, 0x48, 0x92, 0x8b, 0x1d, 0x4a, 0x3b, 0xc7, 0x44, 0xe3, 0xb7, 0x66, 0xbf, 0xad, 0x31,
|
|
|
|
0xbb, 0x4b, 0x3c, 0x66, 0x76, 0x1d, 0x91, 0xb0, 0x3a, 0x99, 0x40, 0xba, 0x0e, 0x7b, 0x1c, 0x04,
|
|
|
|
0xcb, 0xf7, 0x20, 0xb3, 0xd7, 0x6b, 0x53, 0x83, 0x3c, 0xea, 0x13, 0x8f, 0xe1, 0xff, 0x40, 0xb2,
|
|
|
|
0xec, 0x0e, 0xf1, 0x58, 0x01, 0x95, 0x50, 0x25, 0x5d, 0xab, 0x5e, 0x5c, 0x15, 0x63, 0x97, 0x57,
|
|
|
|
0xc5, 0x8d, 0x08, 0x15, 0xea, 0x90, 0xde, 0xb0, 0x31, 0x4f, 0xeb, 0xd0, 0x3f, 0x82, 0x12, 0x75,
|
|
|
|
0x9b, 0x3f, 0x0c, 0x81, 0x50, 0x7e, 0x83, 0x20, 0x1b, 0x60, 0x7b, 0x0e, 0xed, 0x79, 0xe4, 0x36,
|
|
|
|
0xc1, 0x31, 0x86, 0xa4, 0x67, 0x3f, 0x21, 0x85, 0x78, 0x09, 0x55, 0x12, 0x06, 0x3f, 0xe3, 0x5d,
|
|
|
|
0xc8, 0xb6, 0x68, 0xb7, 0x6b, 0x33, 0x46, 0xac, 0xfb, 0x26, 0x2b, 0x24, 0x4a, 0xa8, 0x92, 0xa9,
|
|
|
|
0xca, 0x6a, 0xc0, 0x5f, 0x0d, 0xf9, 0xab, 0x8d, 0x50, 0xa0, 0xda, 0x82, 0xdf, 0xc1, 0x8b, 0x8f,
|
|
|
|
0x45, 0x64, 0x64, 0x86, 0x95, 0x3a, 0x2b, 0x37, 0x21, 0xbf, 0x4d, 0x8e, 0x09, 0x23, 0xf5, 0x60,
|
|
|
|
0x1c, 0x77, 0xa1, 0xce, 0x33, 0x04, 0x19, 0x83, 0x98, 0xd6, 0x1d, 0x60, 0xe3, 0x15, 0x90, 0x68,
|
|
|
|
0xbb, 0xed, 0x11, 0x26, 0xe4, 0x11, 0xb7, 0xa1, 0x68, 0x89, 0x91, 0x68, 0xe5, 0xbf, 0x21, 0x1b,
|
|
|
|
0xb4, 0x21, 0x86, 0x34, 0xaa, 0x45, 0x93, 0xb5, 0x96, 0xc9, 0x4c, 0x8e, 0x98, 0x35, 0xf8, 0xb9,
|
|
|
|
0xfc, 0x05, 0x41, 0xf6, 0xc8, 0xb5, 0x19, 0x09, 0x49, 0x54, 0x41, 0x32, 0x5b, 0xcc, 0xa6, 0x3d,
|
|
|
|
0x5e, 0xbc, 0x54, 0x95, 0xd5, 0x31, 0x07, 0xab, 0x3c, 0x59, 0xe7, 0x19, 0x86, 0xc8, 0xc4, 0x39,
|
|
|
|
0x48, 0xb8, 0xa4, 0xcd, 0x71, 0xd3, 0x86, 0x7f, 0xc4, 0x79, 0x48, 0x31, 0xca, 0xcc, 0x63, 0xd1,
|
|
|
|
0x67, 0x70, 0xc1, 0xff, 0xc3, 0x02, 0x39, 0x75, 0x48, 0x8b, 0x11, 0xab, 0x90, 0x9c, 0x5b, 0xa2,
|
|
|
|
0x21, 0x46, 0x84, 0x68, 0x6a, 0x26, 0x51, 0x29, 0x42, 0xf4, 0x5d, 0x1c, 0x16, 0x05, 0x51, 0x21,
|
|
|
|
0xd3, 0x3c, 0x4c, 0xeb, 0x00, 0x1e, 0x33, 0x5d, 0xe1, 0xce, 0xf8, 0x0d, 0xdc, 0x99, 0x16, 0x75,
|
|
|
|
0x3a, 0xf3, 0x41, 0xfa, 0x8e, 0x65, 0xce, 0x61, 0xf1, 0xb4, 0xa8, 0xd3, 0xa3, 0x06, 0x49, 0x8e,
|
|
|
|
0x71, 0x1f, 0x2a, 0x9f, 0x8a, 0x2a, 0x3f, 0xb2, 0xa6, 0xf4, 0xc3, 0xb6, 0xff, 0x07, 0x16, 0x0f,
|
|
|
|
0x99, 0xc9, 0xfa, 0x5e, 0x68, 0x19, 0x0c, 0x49, 0x97, 0xb4, 0xbd, 0x02, 0x2a, 0x25, 0x2a, 0x69,
|
|
|
|
0x83, 0x9f, 0xfd, 0xf6, 0x1c, 0x97, 0xb4, 0xed, 0xd3, 0x42, 0x9c, 0xbf, 0x15, 0xb7, 0xf2, 0x25,
|
|
|
|
0x82, 0xa5, 0xb0, 0x5a, 0xcc, 0x61, 0x5c, 0x53, 0x74, 0x1b, 0x9a, 0xc6, 0xe7, 0xd3, 0x54, 0xf8,
|
|
|
|
0x38, 0x31, 0xf2, 0xf1, 0x8d, 0x54, 0xde, 0x78, 0x8d, 0x20, 0x13, 0x71, 0x0d, 0x5e, 0x87, 0xe4,
|
|
|
|
0x61, 0x43, 0x6f, 0xe4, 0x62, 0xf2, 0xf2, 0xd9, 0x79, 0xe9, 0xe7, 0x48, 0xc8, 0x97, 0x00, 0x17,
|
|
|
|
0x21, 0x75, 0x64, 0xec, 0x35, 0x76, 0x72, 0x48, 0xce, 0x9f, 0x9d, 0x97, 0x72, 0x91, 0x38, 0x3f,
|
|
|
|
0xe2, 0xdf, 0x40, 0xaa, 0x1f, 0xec, 0xef, 0xef, 0x35, 0x72, 0x71, 0xf9, 0xd7, 0xb3, 0xf3, 0xd2,
|
|
|
|
0x2f, 0x91, 0x8c, 0x3a, 0x5f, 0x76, 0xb8, 0x02, 0x29, 0xbd, 0x76, 0x60, 0x34, 0x72, 0x5f, 0xc3,
|
|
|
|
0xdf, 0x34, 0x98, 0xde, 0xa4, 0x2e, 0x93, 0x97, 0x9f, 0xbf, 0x54, 0x62, 0x6f, 0x5f, 0x29, 0xd1,
|
|
|
|
0x0e, 0xab, 0x9f, 0xe3, 0xf0, 0x93, 0xd8, 0x90, 0x78, 0x0b, 0x92, 0xfe, 0xae, 0xc7, 0x93, 0xff,
|
|
|
|
0x83, 0xc8, 0xc7, 0x45, 0x5e, 0x9d, 0x19, 0x13, 0x83, 0xdc, 0x01, 0x29, 0xd8, 0xb9, 0xf8, 0xf7,
|
|
|
|
0x89, 0xb4, 0x59, 0xab, 0x58, 0x5e, 0x99, 0x1a, 0xcf, 0x8e, 0xff, 0x55, 0xc3, 0x3a, 0x24, 0xfd,
|
|
|
|
0x75, 0x36, 0xd5, 0x47, 0x64, 0xd5, 0x4e, 0xf5, 0x11, 0xdd, 0x7f, 0x9b, 0x08, 0xef, 0x82, 0x14,
|
|
|
|
0x98, 0x0c, 0xaf, 0x4d, 0x24, 0x8e, 0x39, 0x57, 0x5e, 0xff, 0x4e, 0x74, 0x08, 0xf4, 0x2f, 0xa4,
|
|
|
|
0x82, 0x51, 0xac, 0xce, 0x5a, 0x0e, 0x21, 0xcc, 0xda, 0xec, 0x60, 0x80, 0x52, 0x41, 0x9b, 0xa8,
|
|
|
|
0x56, 0xb8, 0xb8, 0x56, 0x62, 0x1f, 0xae, 0x95, 0xd8, 0xd3, 0x81, 0x82, 0x2e, 0x06, 0x0a, 0x7a,
|
|
|
|
0x3f, 0x50, 0xd0, 0xa7, 0x81, 0x82, 0x9a, 0x12, 0x67, 0xff, 0xd7, 0xb7, 0x00, 0x00, 0x00, 0xff,
|
|
|
|
0xff, 0xbb, 0x95, 0xf8, 0xe3, 0x6a, 0x08, 0x00, 0x00,
|
2017-02-14 02:44:01 +00:00
|
|
|
}
|