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 (
|
2019-07-06 14:40:58 +01:00
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
2019-07-09 22:54:00 +01:00
|
|
|
_ "github.com/golang/protobuf/ptypes/timestamp"
|
2019-03-21 13:24:26 +00:00
|
|
|
grpc "google.golang.org/grpc"
|
2019-07-06 14:40:58 +01:00
|
|
|
math "math"
|
|
|
|
time "time"
|
2019-03-18 13:08:24 +00:00
|
|
|
)
|
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
|
2019-07-02 17:06:12 +01:00
|
|
|
var _ = time.Kitchen
|
2019-03-18 10:55:06 +00:00
|
|
|
|
|
|
|
// 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-07-06 14:40:58 +01: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-07-06 14:40:58 +01:00
|
|
|
|
2019-03-18 10:55:06 +00:00
|
|
|
func (PieceAction) EnumDescriptor() ([]byte, []int) {
|
2019-07-06 14:40:58 +01:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{0}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-03-21 13:24:26 +00:00
|
|
|
type SettlementResponse_Status int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
SettlementResponse_INVALID SettlementResponse_Status = 0
|
|
|
|
SettlementResponse_ACCEPTED SettlementResponse_Status = 1
|
|
|
|
SettlementResponse_REJECTED SettlementResponse_Status = 2
|
|
|
|
)
|
|
|
|
|
|
|
|
var SettlementResponse_Status_name = map[int32]string{
|
|
|
|
0: "INVALID",
|
|
|
|
1: "ACCEPTED",
|
|
|
|
2: "REJECTED",
|
|
|
|
}
|
2019-07-06 14:40:58 +01:00
|
|
|
|
2019-03-21 13:24:26 +00:00
|
|
|
var SettlementResponse_Status_value = map[string]int32{
|
|
|
|
"INVALID": 0,
|
|
|
|
"ACCEPTED": 1,
|
|
|
|
"REJECTED": 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x SettlementResponse_Status) String() string {
|
|
|
|
return proto.EnumName(SettlementResponse_Status_name, int32(x))
|
|
|
|
}
|
2019-07-06 14:40:58 +01:00
|
|
|
|
2019-03-21 13:24:26 +00:00
|
|
|
func (SettlementResponse_Status) EnumDescriptor() ([]byte, []int) {
|
2019-07-06 14:40:58 +01:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{4, 0}
|
2019-03-21 13:24:26 +00:00
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
// OrderLimit is provided by satellite to execute specific action on storage node within some limits
|
|
|
|
type OrderLimit struct {
|
2019-03-18 10:55:06 +00:00
|
|
|
// 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
|
2019-07-11 21:51:40 +01:00
|
|
|
DeprecatedUplinkId *NodeID `protobuf:"bytes,3,opt,name=deprecated_uplink_id,json=deprecatedUplinkId,proto3,customtype=NodeID" json:"deprecated_uplink_id,omitempty"`
|
|
|
|
// public key that will be used to sign orders and piece hash
|
|
|
|
UplinkPublicKey PiecePublicKey `protobuf:"bytes,13,opt,name=uplink_public_key,json=uplinkPublicKey,proto3,customtype=PiecePublicKey" json:"uplink_public_key"`
|
|
|
|
// storage node who can re claimthe order limit specified by serial
|
2019-03-18 10:55:06 +00:00
|
|
|
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
|
2019-07-09 22:54:00 +01:00
|
|
|
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 time.Time `protobuf:"bytes,8,opt,name=piece_expiration,json=pieceExpiration,proto3,stdtime" json:"piece_expiration"`
|
|
|
|
OrderExpiration time.Time `protobuf:"bytes,9,opt,name=order_expiration,json=orderExpiration,proto3,stdtime" json:"order_expiration"`
|
|
|
|
OrderCreation time.Time `protobuf:"bytes,12,opt,name=order_creation,json=orderCreation,proto3,stdtime" json:"order_creation"`
|
|
|
|
SatelliteSignature []byte `protobuf:"bytes,10,opt,name=satellite_signature,json=satelliteSignature,proto3" json:"satellite_signature,omitempty"`
|
2019-06-21 10:19:52 +01:00
|
|
|
// satellites aren't necessarily discoverable in kademlia. this allows
|
|
|
|
// a storage node to find a satellite and handshake with it to get its key.
|
|
|
|
SatelliteAddress *NodeAddress `protobuf:"bytes,11,opt,name=satellite_address,json=satelliteAddress,proto3" json:"satellite_address,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) Reset() { *m = OrderLimit{} }
|
|
|
|
func (m *OrderLimit) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*OrderLimit) ProtoMessage() {}
|
|
|
|
func (*OrderLimit) Descriptor() ([]byte, []int) {
|
2019-07-06 14:40:58 +01:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{0}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_OrderLimit.Unmarshal(m, b)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_OrderLimit.Marshal(b, m, deterministic)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-06 14:40:58 +01:00
|
|
|
func (m *OrderLimit) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_OrderLimit.Merge(m, src)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_OrderLimit.Size(m)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_OrderLimit.DiscardUnknown(m)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
var xxx_messageInfo_OrderLimit proto.InternalMessageInfo
|
2019-03-18 10:55:06 +00:00
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) GetLimit() int64 {
|
2019-03-18 10:55:06 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Limit
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) GetAction() PieceAction {
|
2019-03-18 10:55:06 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Action
|
|
|
|
}
|
|
|
|
return PieceAction_INVALID
|
|
|
|
}
|
|
|
|
|
2019-07-09 22:54:00 +01:00
|
|
|
func (m *OrderLimit) GetPieceExpiration() time.Time {
|
2019-03-18 10:55:06 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.PieceExpiration
|
|
|
|
}
|
2019-07-09 22:54:00 +01:00
|
|
|
return time.Time{}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-09 22:54:00 +01:00
|
|
|
func (m *OrderLimit) GetOrderExpiration() time.Time {
|
2019-03-18 10:55:06 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.OrderExpiration
|
|
|
|
}
|
2019-07-09 22:54:00 +01:00
|
|
|
return time.Time{}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-02 17:06:12 +01:00
|
|
|
func (m *OrderLimit) GetOrderCreation() time.Time {
|
|
|
|
if m != nil {
|
|
|
|
return m.OrderCreation
|
|
|
|
}
|
|
|
|
return time.Time{}
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) GetSatelliteSignature() []byte {
|
2019-03-18 10:55:06 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.SatelliteSignature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *OrderLimit) GetSatelliteAddress() *NodeAddress {
|
2019-06-21 10:19:52 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.SatelliteAddress
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
// Order is a one step of fullfilling Amount number of bytes from an OrderLimit with SerialNumber
|
|
|
|
type Order struct {
|
2019-03-18 10:55:06 +00:00
|
|
|
// 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:"-"`
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *Order) Reset() { *m = Order{} }
|
|
|
|
func (m *Order) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Order) ProtoMessage() {}
|
|
|
|
func (*Order) Descriptor() ([]byte, []int) {
|
2019-07-06 14:40:58 +01:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{1}
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *Order) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Order.Unmarshal(m, b)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Order.Marshal(b, m, deterministic)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-06 14:40:58 +01:00
|
|
|
func (m *Order) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Order.Merge(m, src)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *Order) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Order.Size(m)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *Order) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Order.DiscardUnknown(m)
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
var xxx_messageInfo_Order proto.InternalMessageInfo
|
2019-03-18 10:55:06 +00:00
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *Order) GetAmount() int64 {
|
2019-03-18 10:55:06 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Amount
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *Order) GetUplinkSignature() []byte {
|
2019-03-18 10:55:06 +00:00
|
|
|
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"`
|
2019-07-03 17:14:37 +01:00
|
|
|
// size of uploaded piece
|
|
|
|
PieceSize int64 `protobuf:"varint,4,opt,name=piece_size,json=pieceSize,proto3" json:"piece_size,omitempty"`
|
2019-07-11 21:51:40 +01:00
|
|
|
// timestamp when upload occurred
|
|
|
|
Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
|
|
|
|
// 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:"-"`
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PieceHash) Reset() { *m = PieceHash{} }
|
|
|
|
func (m *PieceHash) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PieceHash) ProtoMessage() {}
|
|
|
|
func (*PieceHash) Descriptor() ([]byte, []int) {
|
2019-07-06 14:40:58 +01: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-07-06 14:40:58 +01: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
|
|
|
|
}
|
|
|
|
|
2019-07-03 17:14:37 +01:00
|
|
|
func (m *PieceHash) GetPieceSize() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.PieceSize
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PieceHash) GetTimestamp() time.Time {
|
|
|
|
if m != nil {
|
|
|
|
return m.Timestamp
|
|
|
|
}
|
|
|
|
return time.Time{}
|
|
|
|
}
|
|
|
|
|
2019-07-11 21:51:40 +01:00
|
|
|
func (m *PieceHash) GetSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-03-21 13:24:26 +00:00
|
|
|
type SettlementRequest struct {
|
2019-07-01 16:54:11 +01:00
|
|
|
Limit *OrderLimit `protobuf:"bytes,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
|
|
Order *Order `protobuf:"bytes,2,opt,name=order,proto3" json:"order,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2019-03-21 13:24:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SettlementRequest) Reset() { *m = SettlementRequest{} }
|
|
|
|
func (m *SettlementRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SettlementRequest) ProtoMessage() {}
|
|
|
|
func (*SettlementRequest) Descriptor() ([]byte, []int) {
|
2019-07-06 14:40:58 +01:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{3}
|
2019-03-21 13:24:26 +00:00
|
|
|
}
|
|
|
|
func (m *SettlementRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SettlementRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SettlementRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SettlementRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-07-06 14:40:58 +01:00
|
|
|
func (m *SettlementRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SettlementRequest.Merge(m, src)
|
2019-03-21 13:24:26 +00:00
|
|
|
}
|
|
|
|
func (m *SettlementRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SettlementRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SettlementRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SettlementRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SettlementRequest proto.InternalMessageInfo
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *SettlementRequest) GetLimit() *OrderLimit {
|
2019-03-21 13:24:26 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Limit
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-07-01 16:54:11 +01:00
|
|
|
func (m *SettlementRequest) GetOrder() *Order {
|
2019-03-21 13:24:26 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Order
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type SettlementResponse struct {
|
|
|
|
SerialNumber SerialNumber `protobuf:"bytes,1,opt,name=serial_number,json=serialNumber,proto3,customtype=SerialNumber" json:"serial_number"`
|
|
|
|
Status SettlementResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=orders.SettlementResponse_Status" json:"status,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SettlementResponse) Reset() { *m = SettlementResponse{} }
|
|
|
|
func (m *SettlementResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SettlementResponse) ProtoMessage() {}
|
|
|
|
func (*SettlementResponse) Descriptor() ([]byte, []int) {
|
2019-07-06 14:40:58 +01:00
|
|
|
return fileDescriptor_e0f5d4cf0fc9e41b, []int{4}
|
2019-03-21 13:24:26 +00:00
|
|
|
}
|
|
|
|
func (m *SettlementResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SettlementResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SettlementResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SettlementResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-07-06 14:40:58 +01:00
|
|
|
func (m *SettlementResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SettlementResponse.Merge(m, src)
|
2019-03-21 13:24:26 +00:00
|
|
|
}
|
|
|
|
func (m *SettlementResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SettlementResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SettlementResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SettlementResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SettlementResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SettlementResponse) GetStatus() SettlementResponse_Status {
|
|
|
|
if m != nil {
|
|
|
|
return m.Status
|
|
|
|
}
|
|
|
|
return SettlementResponse_INVALID
|
|
|
|
}
|
|
|
|
|
2019-03-18 10:55:06 +00:00
|
|
|
func init() {
|
2019-07-06 14:40:58 +01:00
|
|
|
proto.RegisterEnum("orders.PieceAction", PieceAction_name, PieceAction_value)
|
|
|
|
proto.RegisterEnum("orders.SettlementResponse_Status", SettlementResponse_Status_name, SettlementResponse_Status_value)
|
2019-07-01 16:54:11 +01:00
|
|
|
proto.RegisterType((*OrderLimit)(nil), "orders.OrderLimit")
|
|
|
|
proto.RegisterType((*Order)(nil), "orders.Order")
|
2019-03-18 10:55:06 +00:00
|
|
|
proto.RegisterType((*PieceHash)(nil), "orders.PieceHash")
|
2019-03-21 13:24:26 +00:00
|
|
|
proto.RegisterType((*SettlementRequest)(nil), "orders.SettlementRequest")
|
|
|
|
proto.RegisterType((*SettlementResponse)(nil), "orders.SettlementResponse")
|
2019-07-06 14:40:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("orders.proto", fileDescriptor_e0f5d4cf0fc9e41b) }
|
|
|
|
|
|
|
|
var fileDescriptor_e0f5d4cf0fc9e41b = []byte{
|
2019-07-11 21:51:40 +01:00
|
|
|
// 775 bytes of a gzipped FileDescriptorProto
|
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, 0x7e, 0xbe, 0x5a, 0x6a, 0x8a, 0xfc, 0xb8, 0xd4, 0x97, 0x5a, 0x8e,
|
|
|
|
0xd4, 0xa1, 0x72, 0xa9, 0x2f, 0xd7, 0xe3, 0xd5, 0xcc, 0x58, 0x6a, 0x79, 0xd2, 0x00, 0x90, 0x26,
|
|
|
|
0xd5, 0xe7, 0x63, 0x83, 0x6a, 0x05, 0x69, 0xcf, 0x57, 0xa9, 0x5d, 0x24, 0x00, 0xea, 0x4c, 0xbf,
|
|
|
|
0xd6, 0x97, 0xba, 0xa6, 0x8e, 0x16, 0xa0, 0xe2, 0xc3, 0x71, 0x62, 0x00, 0x64, 0xad, 0x90, 0x0f,
|
|
|
|
0x5e, 0x6a, 0x0f, 0x47, 0xd5, 0xe9, 0xfc, 0x77, 0xe7, 0xfd, 0xa3, 0x81, 0xf2, 0xb9, 0x32, 0x29,
|
|
|
|
0x7c, 0x9f, 0xf3, 0x37, 0x1b, 0x15, 0xe5, 0xf2, 0xc5, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa1,
|
|
|
|
0x64, 0x18, 0x84, 0x9c, 0x06, 0x00, 0x00,
|
2019-03-21 13:24:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
// OrdersClient is the client API for Orders service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type OrdersClient interface {
|
|
|
|
Settlement(ctx context.Context, opts ...grpc.CallOption) (Orders_SettlementClient, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ordersClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewOrdersClient(cc *grpc.ClientConn) OrdersClient {
|
|
|
|
return &ordersClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *ordersClient) Settlement(ctx context.Context, opts ...grpc.CallOption) (Orders_SettlementClient, error) {
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Orders_serviceDesc.Streams[0], "/orders.Orders/Settlement", opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
x := &ordersSettlementClient{stream}
|
|
|
|
return x, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type Orders_SettlementClient interface {
|
|
|
|
Send(*SettlementRequest) error
|
|
|
|
Recv() (*SettlementResponse, error)
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type ordersSettlementClient struct {
|
|
|
|
grpc.ClientStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ordersSettlementClient) Send(m *SettlementRequest) error {
|
|
|
|
return x.ClientStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ordersSettlementClient) Recv() (*SettlementResponse, error) {
|
|
|
|
m := new(SettlementResponse)
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// OrdersServer is the server API for Orders service.
|
|
|
|
type OrdersServer interface {
|
|
|
|
Settlement(Orders_SettlementServer) error
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterOrdersServer(s *grpc.Server, srv OrdersServer) {
|
|
|
|
s.RegisterService(&_Orders_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Orders_Settlement_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
return srv.(OrdersServer).Settlement(&ordersSettlementServer{stream})
|
|
|
|
}
|
|
|
|
|
|
|
|
type Orders_SettlementServer interface {
|
|
|
|
Send(*SettlementResponse) error
|
|
|
|
Recv() (*SettlementRequest, error)
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
type ordersSettlementServer struct {
|
|
|
|
grpc.ServerStream
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ordersSettlementServer) Send(m *SettlementResponse) error {
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ordersSettlementServer) Recv() (*SettlementRequest, error) {
|
|
|
|
m := new(SettlementRequest)
|
|
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return m, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Orders_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "orders.Orders",
|
|
|
|
HandlerType: (*OrdersServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{},
|
|
|
|
Streams: []grpc.StreamDesc{
|
|
|
|
{
|
|
|
|
StreamName: "Settlement",
|
|
|
|
Handler: _Orders_Settlement_Handler,
|
|
|
|
ServerStreams: true,
|
|
|
|
ClientStreams: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Metadata: "orders.proto",
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|