mirror of
https://github.com/rclone/rclone.git
synced 2024-12-03 13:55:34 +01:00
e7bd392a69
This fixes an important bug with listing that affects users with more than 500 objects in a listing operation.
291 lines
10 KiB
Go
291 lines
10 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: vouchers.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
math "math"
|
|
time "time"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
|
|
drpc "storj.io/drpc"
|
|
)
|
|
|
|
// 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
|
|
|
|
type VoucherResponse_Status int32
|
|
|
|
const (
|
|
VoucherResponse_INVALID VoucherResponse_Status = 0
|
|
VoucherResponse_ACCEPTED VoucherResponse_Status = 1
|
|
VoucherResponse_REJECTED VoucherResponse_Status = 2
|
|
)
|
|
|
|
var VoucherResponse_Status_name = map[int32]string{
|
|
0: "INVALID",
|
|
1: "ACCEPTED",
|
|
2: "REJECTED",
|
|
}
|
|
|
|
var VoucherResponse_Status_value = map[string]int32{
|
|
"INVALID": 0,
|
|
"ACCEPTED": 1,
|
|
"REJECTED": 2,
|
|
}
|
|
|
|
func (x VoucherResponse_Status) String() string {
|
|
return proto.EnumName(VoucherResponse_Status_name, int32(x))
|
|
}
|
|
|
|
func (VoucherResponse_Status) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_3659b9a115b8060d, []int{2, 0}
|
|
}
|
|
|
|
// Voucher is a signed message verifying that a node has been vetted by a particular satellite.
|
|
type Voucher struct {
|
|
SatelliteId NodeID `protobuf:"bytes,1,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"`
|
|
StorageNodeId NodeID `protobuf:"bytes,2,opt,name=storage_node_id,json=storageNodeId,proto3,customtype=NodeID" json:"storage_node_id"`
|
|
Expiration time.Time `protobuf:"bytes,3,opt,name=expiration,proto3,stdtime" json:"expiration"`
|
|
SatelliteSignature []byte `protobuf:"bytes,4,opt,name=satellite_signature,json=satelliteSignature,proto3" json:"satellite_signature,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Voucher) Reset() { *m = Voucher{} }
|
|
func (m *Voucher) String() string { return proto.CompactTextString(m) }
|
|
func (*Voucher) ProtoMessage() {}
|
|
func (*Voucher) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_3659b9a115b8060d, []int{0}
|
|
}
|
|
func (m *Voucher) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Voucher.Unmarshal(m, b)
|
|
}
|
|
func (m *Voucher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Voucher.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Voucher) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Voucher.Merge(m, src)
|
|
}
|
|
func (m *Voucher) XXX_Size() int {
|
|
return xxx_messageInfo_Voucher.Size(m)
|
|
}
|
|
func (m *Voucher) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Voucher.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Voucher proto.InternalMessageInfo
|
|
|
|
func (m *Voucher) GetExpiration() time.Time {
|
|
if m != nil {
|
|
return m.Expiration
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *Voucher) GetSatelliteSignature() []byte {
|
|
if m != nil {
|
|
return m.SatelliteSignature
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type VoucherRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *VoucherRequest) Reset() { *m = VoucherRequest{} }
|
|
func (m *VoucherRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*VoucherRequest) ProtoMessage() {}
|
|
func (*VoucherRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_3659b9a115b8060d, []int{1}
|
|
}
|
|
func (m *VoucherRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_VoucherRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *VoucherRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_VoucherRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *VoucherRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_VoucherRequest.Merge(m, src)
|
|
}
|
|
func (m *VoucherRequest) XXX_Size() int {
|
|
return xxx_messageInfo_VoucherRequest.Size(m)
|
|
}
|
|
func (m *VoucherRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_VoucherRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_VoucherRequest proto.InternalMessageInfo
|
|
|
|
type VoucherResponse struct {
|
|
Voucher *Voucher `protobuf:"bytes,1,opt,name=voucher,proto3" json:"voucher,omitempty"`
|
|
Status VoucherResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=vouchers.VoucherResponse_Status" json:"status,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *VoucherResponse) Reset() { *m = VoucherResponse{} }
|
|
func (m *VoucherResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*VoucherResponse) ProtoMessage() {}
|
|
func (*VoucherResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_3659b9a115b8060d, []int{2}
|
|
}
|
|
func (m *VoucherResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_VoucherResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *VoucherResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_VoucherResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *VoucherResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_VoucherResponse.Merge(m, src)
|
|
}
|
|
func (m *VoucherResponse) XXX_Size() int {
|
|
return xxx_messageInfo_VoucherResponse.Size(m)
|
|
}
|
|
func (m *VoucherResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_VoucherResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_VoucherResponse proto.InternalMessageInfo
|
|
|
|
func (m *VoucherResponse) GetVoucher() *Voucher {
|
|
if m != nil {
|
|
return m.Voucher
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *VoucherResponse) GetStatus() VoucherResponse_Status {
|
|
if m != nil {
|
|
return m.Status
|
|
}
|
|
return VoucherResponse_INVALID
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("vouchers.VoucherResponse_Status", VoucherResponse_Status_name, VoucherResponse_Status_value)
|
|
proto.RegisterType((*Voucher)(nil), "vouchers.Voucher")
|
|
proto.RegisterType((*VoucherRequest)(nil), "vouchers.VoucherRequest")
|
|
proto.RegisterType((*VoucherResponse)(nil), "vouchers.VoucherResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("vouchers.proto", fileDescriptor_3659b9a115b8060d) }
|
|
|
|
var fileDescriptor_3659b9a115b8060d = []byte{
|
|
// 382 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4f, 0x6e, 0x9b, 0x40,
|
|
0x14, 0xc6, 0x8d, 0x5b, 0x01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 0x61, 0x02, 0x00, 0x00,
|
|
}
|
|
|
|
// --- DRPC BEGIN ---
|
|
|
|
type DRPCVouchersClient interface {
|
|
DRPCConn() drpc.Conn
|
|
|
|
Request(ctx context.Context, in *VoucherRequest) (*VoucherResponse, error)
|
|
}
|
|
|
|
type drpcVouchersClient struct {
|
|
cc drpc.Conn
|
|
}
|
|
|
|
func NewDRPCVouchersClient(cc drpc.Conn) DRPCVouchersClient {
|
|
return &drpcVouchersClient{cc}
|
|
}
|
|
|
|
func (c *drpcVouchersClient) DRPCConn() drpc.Conn { return c.cc }
|
|
|
|
func (c *drpcVouchersClient) Request(ctx context.Context, in *VoucherRequest) (*VoucherResponse, error) {
|
|
out := new(VoucherResponse)
|
|
err := c.cc.Invoke(ctx, "/vouchers.Vouchers/Request", in, out)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
type DRPCVouchersServer interface {
|
|
Request(context.Context, *VoucherRequest) (*VoucherResponse, error)
|
|
}
|
|
|
|
type DRPCVouchersDescription struct{}
|
|
|
|
func (DRPCVouchersDescription) NumMethods() int { return 1 }
|
|
|
|
func (DRPCVouchersDescription) Method(n int) (string, drpc.Receiver, interface{}, bool) {
|
|
switch n {
|
|
case 0:
|
|
return "/vouchers.Vouchers/Request",
|
|
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
|
return srv.(DRPCVouchersServer).
|
|
Request(
|
|
ctx,
|
|
in1.(*VoucherRequest),
|
|
)
|
|
}, DRPCVouchersServer.Request, true
|
|
default:
|
|
return "", nil, nil, false
|
|
}
|
|
}
|
|
|
|
func DRPCRegisterVouchers(mux drpc.Mux, impl DRPCVouchersServer) error {
|
|
return mux.Register(impl, DRPCVouchersDescription{})
|
|
}
|
|
|
|
type DRPCVouchers_RequestStream interface {
|
|
drpc.Stream
|
|
SendAndClose(*VoucherResponse) error
|
|
}
|
|
|
|
type drpcVouchersRequestStream struct {
|
|
drpc.Stream
|
|
}
|
|
|
|
func (x *drpcVouchersRequestStream) SendAndClose(m *VoucherResponse) error {
|
|
if err := x.MsgSend(m); err != nil {
|
|
return err
|
|
}
|
|
return x.CloseSend()
|
|
}
|
|
|
|
// --- DRPC END ---
|