2018-11-20 17:09:35 +00:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2018-10-31 18:47:25 +00:00
|
|
|
// source: bandwidth.proto
|
|
|
|
|
|
|
|
package pb
|
|
|
|
|
2018-12-14 20:17:30 +00:00
|
|
|
import (
|
2019-03-15 20:21:52 +00:00
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
2018-12-14 20:17:30 +00:00
|
|
|
grpc "google.golang.org/grpc"
|
2019-03-15 20:21:52 +00:00
|
|
|
math "math"
|
2018-12-14 20:17:30 +00:00
|
|
|
)
|
2018-10-31 18:47:25 +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.
|
2018-11-20 17:09:35 +00:00
|
|
|
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
2018-10-31 18:47:25 +00:00
|
|
|
|
2018-11-15 19:06:09 +00:00
|
|
|
type AgreementsSummary_Status int32
|
|
|
|
|
|
|
|
const (
|
2019-01-11 18:15:49 +00:00
|
|
|
AgreementsSummary_FAIL AgreementsSummary_Status = 0
|
|
|
|
AgreementsSummary_OK AgreementsSummary_Status = 1
|
|
|
|
AgreementsSummary_REJECTED AgreementsSummary_Status = 2
|
2018-11-15 19:06:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var AgreementsSummary_Status_name = map[int32]string{
|
|
|
|
0: "FAIL",
|
|
|
|
1: "OK",
|
2019-01-11 18:15:49 +00:00
|
|
|
2: "REJECTED",
|
2018-11-15 19:06:09 +00:00
|
|
|
}
|
2019-03-15 20:21:52 +00:00
|
|
|
|
2018-11-15 19:06:09 +00:00
|
|
|
var AgreementsSummary_Status_value = map[string]int32{
|
2019-01-11 18:15:49 +00:00
|
|
|
"FAIL": 0,
|
|
|
|
"OK": 1,
|
|
|
|
"REJECTED": 2,
|
2018-11-15 19:06:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x AgreementsSummary_Status) String() string {
|
|
|
|
return proto.EnumName(AgreementsSummary_Status_name, int32(x))
|
|
|
|
}
|
2019-03-15 20:21:52 +00:00
|
|
|
|
2018-11-15 19:06:09 +00:00
|
|
|
func (AgreementsSummary_Status) EnumDescriptor() ([]byte, []int) {
|
2019-03-15 20:21:52 +00:00
|
|
|
return fileDescriptor_ed768d1bfad2d961, []int{0, 0}
|
2018-11-15 19:06:09 +00:00
|
|
|
}
|
|
|
|
|
2018-10-31 18:47:25 +00:00
|
|
|
type AgreementsSummary struct {
|
2018-11-15 19:06:09 +00:00
|
|
|
Status AgreementsSummary_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bandwidth.AgreementsSummary_Status" json:"status,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-10-31 18:47:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AgreementsSummary) Reset() { *m = AgreementsSummary{} }
|
|
|
|
func (m *AgreementsSummary) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AgreementsSummary) ProtoMessage() {}
|
|
|
|
func (*AgreementsSummary) Descriptor() ([]byte, []int) {
|
2019-03-15 20:21:52 +00:00
|
|
|
return fileDescriptor_ed768d1bfad2d961, []int{0}
|
2018-10-31 18:47:25 +00:00
|
|
|
}
|
|
|
|
func (m *AgreementsSummary) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_AgreementsSummary.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *AgreementsSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_AgreementsSummary.Marshal(b, m, deterministic)
|
|
|
|
}
|
2019-03-15 20:21:52 +00:00
|
|
|
func (m *AgreementsSummary) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AgreementsSummary.Merge(m, src)
|
2018-10-31 18:47:25 +00:00
|
|
|
}
|
|
|
|
func (m *AgreementsSummary) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_AgreementsSummary.Size(m)
|
|
|
|
}
|
|
|
|
func (m *AgreementsSummary) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_AgreementsSummary.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_AgreementsSummary proto.InternalMessageInfo
|
|
|
|
|
2018-11-15 19:06:09 +00:00
|
|
|
func (m *AgreementsSummary) GetStatus() AgreementsSummary_Status {
|
|
|
|
if m != nil {
|
|
|
|
return m.Status
|
|
|
|
}
|
|
|
|
return AgreementsSummary_FAIL
|
|
|
|
}
|
|
|
|
|
2018-10-31 18:47:25 +00:00
|
|
|
func init() {
|
2018-11-15 19:06:09 +00:00
|
|
|
proto.RegisterEnum("bandwidth.AgreementsSummary_Status", AgreementsSummary_Status_name, AgreementsSummary_Status_value)
|
2019-03-15 20:21:52 +00:00
|
|
|
proto.RegisterType((*AgreementsSummary)(nil), "bandwidth.AgreementsSummary")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("bandwidth.proto", fileDescriptor_ed768d1bfad2d961) }
|
|
|
|
|
|
|
|
var fileDescriptor_ed768d1bfad2d961 = []byte{
|
|
|
|
// 210 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x4a, 0xcc, 0x4b,
|
|
|
|
0x29, 0xcf, 0x4c, 0x29, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 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, 0x00, 0xff, 0xff, 0x2a, 0x6a, 0xd9, 0xfd, 0x29, 0x01,
|
|
|
|
0x00, 0x00,
|
2018-10-31 18:47:25 +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
|
|
|
|
|
2018-12-14 20:17:30 +00:00
|
|
|
// BandwidthClient is the client API for Bandwidth service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
2018-10-31 18:47:25 +00:00
|
|
|
type BandwidthClient interface {
|
2018-11-15 19:06:09 +00:00
|
|
|
BandwidthAgreements(ctx context.Context, in *RenterBandwidthAllocation, opts ...grpc.CallOption) (*AgreementsSummary, error)
|
2018-10-31 18:47:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type bandwidthClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewBandwidthClient(cc *grpc.ClientConn) BandwidthClient {
|
|
|
|
return &bandwidthClient{cc}
|
|
|
|
}
|
|
|
|
|
2018-11-15 19:06:09 +00:00
|
|
|
func (c *bandwidthClient) BandwidthAgreements(ctx context.Context, in *RenterBandwidthAllocation, opts ...grpc.CallOption) (*AgreementsSummary, error) {
|
|
|
|
out := new(AgreementsSummary)
|
|
|
|
err := c.cc.Invoke(ctx, "/bandwidth.Bandwidth/BandwidthAgreements", in, out, opts...)
|
2018-10-31 18:47:25 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2018-11-15 19:06:09 +00:00
|
|
|
return out, nil
|
2018-10-31 18:47:25 +00:00
|
|
|
}
|
|
|
|
|
2018-12-14 20:17:30 +00:00
|
|
|
// BandwidthServer is the server API for Bandwidth service.
|
2018-10-31 18:47:25 +00:00
|
|
|
type BandwidthServer interface {
|
2018-11-15 19:06:09 +00:00
|
|
|
BandwidthAgreements(context.Context, *RenterBandwidthAllocation) (*AgreementsSummary, error)
|
2018-10-31 18:47:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterBandwidthServer(s *grpc.Server, srv BandwidthServer) {
|
|
|
|
s.RegisterService(&_Bandwidth_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
2018-11-15 19:06:09 +00:00
|
|
|
func _Bandwidth_BandwidthAgreements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(RenterBandwidthAllocation)
|
|
|
|
if err := dec(in); err != nil {
|
2018-10-31 18:47:25 +00:00
|
|
|
return nil, err
|
|
|
|
}
|
2018-11-15 19:06:09 +00:00
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(BandwidthServer).BandwidthAgreements(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/bandwidth.Bandwidth/BandwidthAgreements",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(BandwidthServer).BandwidthAgreements(ctx, req.(*RenterBandwidthAllocation))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
2018-10-31 18:47:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var _Bandwidth_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "bandwidth.Bandwidth",
|
|
|
|
HandlerType: (*BandwidthServer)(nil),
|
2018-11-15 19:06:09 +00:00
|
|
|
Methods: []grpc.MethodDesc{
|
2018-10-31 18:47:25 +00:00
|
|
|
{
|
2018-11-15 19:06:09 +00:00
|
|
|
MethodName: "BandwidthAgreements",
|
|
|
|
Handler: _Bandwidth_BandwidthAgreements_Handler,
|
2018-10-31 18:47:25 +00:00
|
|
|
},
|
|
|
|
},
|
2018-11-15 19:06:09 +00:00
|
|
|
Streams: []grpc.StreamDesc{},
|
2018-10-31 18:47:25 +00:00
|
|
|
Metadata: "bandwidth.proto",
|
|
|
|
}
|