2019-03-18 10:55:06 +00:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
|
|
// source: orders.proto
|
|
|
|
|
|
|
|
package pb
|
|
|
|
|
2019-03-18 13:08:24 +00:00
|
|
|
import (
|
|
|
|
fmt "fmt"
|
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
|
|
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
|
|
|
math "math"
|
|
|
|
)
|
2019-03-18 10:55:06 +00:00
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
|
|
|
|
// PieceAction is an enumeration of all possible executed actions on storage node
|
|
|
|
type PieceAction int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
PieceAction_INVALID PieceAction = 0
|
|
|
|
PieceAction_PUT PieceAction = 1
|
|
|
|
PieceAction_GET PieceAction = 2
|
|
|
|
PieceAction_GET_AUDIT PieceAction = 3
|
|
|
|
PieceAction_GET_REPAIR PieceAction = 4
|
|
|
|
PieceAction_PUT_REPAIR PieceAction = 5
|
|
|
|
PieceAction_DELETE PieceAction = 6
|
|
|
|
)
|
|
|
|
|
|
|
|
var PieceAction_name = map[int32]string{
|
|
|
|
0: "INVALID",
|
|
|
|
1: "PUT",
|
|
|
|
2: "GET",
|
|
|
|
3: "GET_AUDIT",
|
|
|
|
4: "GET_REPAIR",
|
|
|
|
5: "PUT_REPAIR",
|
|
|
|
6: "DELETE",
|
|
|
|
}
|
2019-03-18 13:08:24 +00:00
|
|
|
|
2019-03-18 10:55:06 +00:00
|
|
|
var PieceAction_value = map[string]int32{
|
|
|
|
"INVALID": 0,
|
|
|
|
"PUT": 1,
|
|
|
|
"GET": 2,
|
|
|
|
"GET_AUDIT": 3,
|
|
|
|
"GET_REPAIR": 4,
|
|
|
|
"PUT_REPAIR": 5,
|
|
|
|
"DELETE": 6,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x PieceAction) String() string {
|
|
|
|
return proto.EnumName(PieceAction_name, int32(x))
|
|
|
|
}
|
2019-03-18 13:08:24 +00:00
|
|
|
|
2019-03-18 10:55:06 +00:00
|
|
|
func (PieceAction) EnumDescriptor() ([]byte, []int) {
|
2019-03-18 13:08:24 +00:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{0}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// OrderLimit2 is provided by satellite to execute specific action on storage node within some limits
|
|
|
|
type OrderLimit2 struct {
|
|
|
|
// unique serial to avoid replay attacks
|
2019-03-18 13:08:24 +00:00
|
|
|
SerialNumber SerialNumber `protobuf:"bytes,1,opt,name=serial_number,json=serialNumber,proto3,customtype=SerialNumber" json:"serial_number"`
|
2019-03-18 10:55:06 +00:00
|
|
|
// satellite who issued this order limit allowing orderer to do the specified action
|
|
|
|
SatelliteId NodeID `protobuf:"bytes,2,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"`
|
|
|
|
// uplink who requested or whom behalf the order limit to do an action
|
|
|
|
UplinkId NodeID `protobuf:"bytes,3,opt,name=uplink_id,json=uplinkId,proto3,customtype=NodeID" json:"uplink_id"`
|
|
|
|
// storage node who can reclaim the order limit specified by serial
|
|
|
|
StorageNodeId NodeID `protobuf:"bytes,4,opt,name=storage_node_id,json=storageNodeId,proto3,customtype=NodeID" json:"storage_node_id"`
|
|
|
|
// piece which is allowed to be touched
|
|
|
|
PieceId PieceID `protobuf:"bytes,5,opt,name=piece_id,json=pieceId,proto3,customtype=PieceID" json:"piece_id"`
|
|
|
|
// limit in bytes how much can be changed
|
|
|
|
Limit int64 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
|
|
Action PieceAction `protobuf:"varint,7,opt,name=action,proto3,enum=orders.PieceAction" json:"action,omitempty"`
|
|
|
|
PieceExpiration *timestamp.Timestamp `protobuf:"bytes,8,opt,name=piece_expiration,json=pieceExpiration,proto3" json:"piece_expiration,omitempty"`
|
|
|
|
OrderExpiration *timestamp.Timestamp `protobuf:"bytes,9,opt,name=order_expiration,json=orderExpiration,proto3" json:"order_expiration,omitempty"`
|
|
|
|
SatelliteSignature []byte `protobuf:"bytes,10,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 *OrderLimit2) Reset() { *m = OrderLimit2{} }
|
|
|
|
func (m *OrderLimit2) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*OrderLimit2) ProtoMessage() {}
|
|
|
|
func (*OrderLimit2) Descriptor() ([]byte, []int) {
|
2019-03-18 13:08:24 +00:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{0}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
func (m *OrderLimit2) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_OrderLimit2.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *OrderLimit2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_OrderLimit2.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-03-18 13:08:24 +00:00
|
|
|
func (m *OrderLimit2) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_OrderLimit2.Merge(m, src)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
func (m *OrderLimit2) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_OrderLimit2.Size(m)
|
|
|
|
}
|
|
|
|
func (m *OrderLimit2) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_OrderLimit2.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_OrderLimit2 proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *OrderLimit2) GetLimit() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Limit
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OrderLimit2) GetAction() PieceAction {
|
|
|
|
if m != nil {
|
|
|
|
return m.Action
|
|
|
|
}
|
|
|
|
return PieceAction_INVALID
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OrderLimit2) GetPieceExpiration() *timestamp.Timestamp {
|
|
|
|
if m != nil {
|
|
|
|
return m.PieceExpiration
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OrderLimit2) GetOrderExpiration() *timestamp.Timestamp {
|
|
|
|
if m != nil {
|
|
|
|
return m.OrderExpiration
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OrderLimit2) GetSatelliteSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SatelliteSignature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Order2 is a one step of fullfilling Amount number of bytes from an OrderLimit2 with SerialNumber
|
|
|
|
type Order2 struct {
|
|
|
|
// serial of the order limit that was signed
|
2019-03-18 13:08:24 +00:00
|
|
|
SerialNumber SerialNumber `protobuf:"bytes,1,opt,name=serial_number,json=serialNumber,proto3,customtype=SerialNumber" json:"serial_number"`
|
2019-03-18 10:55:06 +00:00
|
|
|
// amount to be signed for
|
|
|
|
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
|
|
|
// signature
|
|
|
|
UplinkSignature []byte `protobuf:"bytes,3,opt,name=uplink_signature,json=uplinkSignature,proto3" json:"uplink_signature,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Order2) Reset() { *m = Order2{} }
|
|
|
|
func (m *Order2) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Order2) ProtoMessage() {}
|
|
|
|
func (*Order2) Descriptor() ([]byte, []int) {
|
2019-03-18 13:08:24 +00:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{1}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
func (m *Order2) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Order2.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Order2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Order2.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-03-18 13:08:24 +00:00
|
|
|
func (m *Order2) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Order2.Merge(m, src)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
func (m *Order2) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Order2.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Order2) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Order2.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Order2 proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Order2) GetAmount() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Amount
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Order2) GetUplinkSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.UplinkSignature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type PieceHash struct {
|
|
|
|
// piece id
|
|
|
|
PieceId PieceID `protobuf:"bytes,1,opt,name=piece_id,json=pieceId,proto3,customtype=PieceID" json:"piece_id"`
|
|
|
|
// hash of the piece that was/is uploaded
|
|
|
|
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
|
|
|
// signature either satellite or storage node
|
|
|
|
Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PieceHash) Reset() { *m = PieceHash{} }
|
|
|
|
func (m *PieceHash) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PieceHash) ProtoMessage() {}
|
|
|
|
func (*PieceHash) Descriptor() ([]byte, []int) {
|
2019-03-18 13:08:24 +00:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{2}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
func (m *PieceHash) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_PieceHash.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *PieceHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_PieceHash.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-03-18 13:08:24 +00:00
|
|
|
func (m *PieceHash) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PieceHash.Merge(m, src)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
func (m *PieceHash) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_PieceHash.Size(m)
|
|
|
|
}
|
|
|
|
func (m *PieceHash) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_PieceHash.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_PieceHash proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *PieceHash) GetHash() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Hash
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PieceHash) GetSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2019-03-18 13:08:24 +00:00
|
|
|
proto.RegisterEnum("orders.PieceAction", PieceAction_name, PieceAction_value)
|
2019-03-18 10:55:06 +00:00
|
|
|
proto.RegisterType((*OrderLimit2)(nil), "orders.OrderLimit2")
|
|
|
|
proto.RegisterType((*Order2)(nil), "orders.Order2")
|
|
|
|
proto.RegisterType((*PieceHash)(nil), "orders.PieceHash")
|
|
|
|
}
|
|
|
|
|
2019-03-18 13:08:24 +00:00
|
|
|
func init() { proto.RegisterFile("orders.proto", fileDescriptor_e0f5d4cf0fc9e41b) }
|
2019-03-18 10:55:06 +00:00
|
|
|
|
2019-03-18 13:08:24 +00:00
|
|
|
var fileDescriptor_e0f5d4cf0fc9e41b = []byte{
|
|
|
|
// 502 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0x4d, 0x6b, 0xdb, 0x40,
|
|
|
|
0x10, 0x8d, 0xfc, 0x21, 0xdb, 0xe3, 0x2f, 0xb1, 0x09, 0x45, 0x98, 0x82, 0x4d, 0x4e, 0x6e, 0x02,
|
|
|
|
0x32, 0x75, 0xa1, 0xd0, 0xa3, 0x83, 0x44, 0x2a, 0x30, 0xae, 0xd9, 0xc8, 0x3d, 0xf4, 0x62, 0xd6,
|
|
|
|
0xd1,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