storj/pkg/pb/contact.pb.go

499 lines
16 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: contact.proto
package pb
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
grpc "google.golang.org/grpc"
math "math"
drpc "storj.io/drpc"
)
// 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
type CheckInRequest struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Capacity *NodeCapacity `protobuf:"bytes,3,opt,name=capacity,proto3" json:"capacity,omitempty"`
Operator *NodeOperator `protobuf:"bytes,4,opt,name=operator,proto3" json:"operator,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CheckInRequest) Reset() { *m = CheckInRequest{} }
func (m *CheckInRequest) String() string { return proto.CompactTextString(m) }
func (*CheckInRequest) ProtoMessage() {}
func (*CheckInRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{0}
}
func (m *CheckInRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CheckInRequest.Unmarshal(m, b)
}
func (m *CheckInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CheckInRequest.Marshal(b, m, deterministic)
}
func (m *CheckInRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckInRequest.Merge(m, src)
}
func (m *CheckInRequest) XXX_Size() int {
return xxx_messageInfo_CheckInRequest.Size(m)
}
func (m *CheckInRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CheckInRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CheckInRequest proto.InternalMessageInfo
func (m *CheckInRequest) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *CheckInRequest) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *CheckInRequest) GetCapacity() *NodeCapacity {
if m != nil {
return m.Capacity
}
return nil
}
func (m *CheckInRequest) GetOperator() *NodeOperator {
if m != nil {
return m.Operator
}
return nil
}
type CheckInResponse struct {
PingNodeSuccess bool `protobuf:"varint,1,opt,name=ping_node_success,json=pingNodeSuccess,proto3" json:"ping_node_success,omitempty"`
PingErrorMessage string `protobuf:"bytes,2,opt,name=ping_error_message,json=pingErrorMessage,proto3" json:"ping_error_message,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CheckInResponse) Reset() { *m = CheckInResponse{} }
func (m *CheckInResponse) String() string { return proto.CompactTextString(m) }
func (*CheckInResponse) ProtoMessage() {}
func (*CheckInResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{1}
}
func (m *CheckInResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CheckInResponse.Unmarshal(m, b)
}
func (m *CheckInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CheckInResponse.Marshal(b, m, deterministic)
}
func (m *CheckInResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckInResponse.Merge(m, src)
}
func (m *CheckInResponse) XXX_Size() int {
return xxx_messageInfo_CheckInResponse.Size(m)
}
func (m *CheckInResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CheckInResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CheckInResponse proto.InternalMessageInfo
func (m *CheckInResponse) GetPingNodeSuccess() bool {
if m != nil {
return m.PingNodeSuccess
}
return false
}
func (m *CheckInResponse) GetPingErrorMessage() string {
if m != nil {
return m.PingErrorMessage
}
return ""
}
type ContactPingRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ContactPingRequest) Reset() { *m = ContactPingRequest{} }
func (m *ContactPingRequest) String() string { return proto.CompactTextString(m) }
func (*ContactPingRequest) ProtoMessage() {}
func (*ContactPingRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{2}
}
func (m *ContactPingRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContactPingRequest.Unmarshal(m, b)
}
func (m *ContactPingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContactPingRequest.Marshal(b, m, deterministic)
}
func (m *ContactPingRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContactPingRequest.Merge(m, src)
}
func (m *ContactPingRequest) XXX_Size() int {
return xxx_messageInfo_ContactPingRequest.Size(m)
}
func (m *ContactPingRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ContactPingRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ContactPingRequest proto.InternalMessageInfo
type ContactPingResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ContactPingResponse) Reset() { *m = ContactPingResponse{} }
func (m *ContactPingResponse) String() string { return proto.CompactTextString(m) }
func (*ContactPingResponse) ProtoMessage() {}
func (*ContactPingResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{3}
}
func (m *ContactPingResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContactPingResponse.Unmarshal(m, b)
}
func (m *ContactPingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContactPingResponse.Marshal(b, m, deterministic)
}
func (m *ContactPingResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContactPingResponse.Merge(m, src)
}
func (m *ContactPingResponse) XXX_Size() int {
return xxx_messageInfo_ContactPingResponse.Size(m)
}
func (m *ContactPingResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ContactPingResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ContactPingResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*CheckInRequest)(nil), "contact.CheckInRequest")
proto.RegisterType((*CheckInResponse)(nil), "contact.CheckInResponse")
proto.RegisterType((*ContactPingRequest)(nil), "contact.ContactPingRequest")
proto.RegisterType((*ContactPingResponse)(nil), "contact.ContactPingResponse")
}
func init() { proto.RegisterFile("contact.proto", fileDescriptor_a5036fff2565fb15) }
var fileDescriptor_a5036fff2565fb15 = []byte{
// 296 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x3f, 0x4f, 0xc3, 0x30,
0x10, 0xc5, 0x95, 0x52, 0x91, 0x72, 0x08, 0x0a, 0x06, 0x84, 0x55, 0x18, 0xaa, 0x4c, 0x15, 0x42,
0x19, 0xca, 0xca, 0x44, 0xe8, 0xc0, 0x00, 0x44, 0x61, 0x63, 0x89, 0x5c, 0xe7, 0x14, 0xa2, 0x0a,
0xdb, 0xd8, 0x2e, 0x12, 0xdf, 0x87, 0x0f, 0x8a, 0x1c, 0x3b, 0x41, 0xa5, 0x8c, 0xf7, 0x7e, 0xcf,
0xcf, 0xf7, 0x07, 0x0e, 0xb8, 0x14, 0x96, 0x71, 0x9b, 0x2a, 0x2d, 0xad, 0x24, 0x71, 0x28, 0x27,
0x20, 0x64, 0x85, 0x5e, 0x4c, 0xbe, 0x23, 0x38, 0xcc, 0xde, 0x90, 0xaf, 0x1e, 0x44, 0x81, 0x1f,
0x6b, 0x34, 0x96, 0x50, 0x88, 0x59, 0x55, 0x69, 0x34, 0x86, 0x46, 0xd3, 0x68, 0xb6, 0x57, 0x74,
0xa5, 0x23, 0x9f, 0xa8, 0x4d, 0x23, 0x05, 0x1d, 0x78, 0x12, 0x4a, 0x92, 0xc2, 0x88, 0x33, 0xc5,
0x78, 0x63, 0xbf, 0xe8, 0xce, 0x34, 0x9a, 0xed, 0xcf, 0x49, 0xda, 0xfe, 0xf2, 0x24, 0x2b, 0xcc,
0x02, 0x29, 0x7a, 0x8f, 0xf3, 0x4b, 0x85, 0x9a, 0x59, 0xa9, 0xe9, 0xf0, 0xaf, 0xff, 0x39, 0x90,
0xa2, 0xf7, 0x24, 0x2b, 0x18, 0xf7, 0x5d, 0x1a, 0x25, 0x85, 0x41, 0x72, 0x05, 0xc7, 0xaa, 0x11,
0x75, 0xe9, 0x9e, 0x95, 0x66, 0xcd, 0x79, 0xd7, 0xf0, 0xa8, 0x18, 0x3b, 0xe0, 0x92, 0x5e, 0xbc,
0x4c, 0xae, 0x81, 0xb4, 0x5e, 0xd4, 0x5a, 0xea, 0xf2, 0x1d, 0x8d, 0x61, 0x35, 0x86, 0x19, 0x8e,
0x1c, 0x59, 0x38, 0xf0, 0xe8, 0xf5, 0xe4, 0x14, 0x48, 0xe6, 0x57, 0x95, 0x37, 0xa2, 0x0e, 0x6b,
0x49, 0xce, 0xe0, 0x64, 0x43, 0xf5, 0x6d, 0xcc, 0x73, 0x88, 0x83, 0x4c, 0x16, 0x30, 0xca, 0xc3,
0xc7, 0xe4, 0x22, 0xed, 0x96, 0xbf, 0x1d, 0x35, 0xb9, 0xfc, 0x1f, 0x86, 0xc4, 0x7b, 0x18, 0xb6,
0x11, 0xb7, 0x10, 0x87, 0x99, 0xc9, 0xf9, 0xef, 0x83, 0x8d, 0x5b, 0x4d, 0xe8, 0x36, 0xf0, 0x29,
0x77, 0xc3, 0xd7, 0x81, 0x5a, 0x2e, 0x77, 0xdb, 0x2b, 0xdf, 0xfc, 0x04, 0x00, 0x00, 0xff, 0xff,
0xbf, 0x07, 0xc0, 0x67, 0x0b, 0x02, 0x00, 0x00,
}
type DRPCContactClient interface {
DRPCConn() drpc.Conn
PingNode(ctx context.Context, in *ContactPingRequest) (*ContactPingResponse, error)
}
type drpcContactClient struct {
cc drpc.Conn
}
func NewDRPCContactClient(cc drpc.Conn) DRPCContactClient {
return &drpcContactClient{cc}
}
func (c *drpcContactClient) DRPCConn() drpc.Conn { return c.cc }
func (c *drpcContactClient) PingNode(ctx context.Context, in *ContactPingRequest) (*ContactPingResponse, error) {
out := new(ContactPingResponse)
err := c.cc.Invoke(ctx, "/contact.Contact/PingNode", in, out)
if err != nil {
return nil, err
}
return out, nil
}
type DRPCContactServer interface {
PingNode(context.Context, *ContactPingRequest) (*ContactPingResponse, error)
}
type DRPCContactDescription struct{}
func (DRPCContactDescription) NumMethods() int { return 1 }
func (DRPCContactDescription) Method(n int) (string, drpc.Handler, interface{}, bool) {
switch n {
case 0:
return "/contact.Contact/PingNode",
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCContactServer).
PingNode(
ctx,
in1.(*ContactPingRequest),
)
}, DRPCContactServer.PingNode, true
default:
return "", nil, nil, false
}
}
func DRPCRegisterContact(srv drpc.Server, impl DRPCContactServer) {
srv.Register(impl, DRPCContactDescription{})
}
type DRPCContact_PingNodeStream interface {
drpc.Stream
SendAndClose(*ContactPingResponse) error
}
type drpcContactPingNodeStream struct {
drpc.Stream
}
func (x *drpcContactPingNodeStream) SendAndClose(m *ContactPingResponse) error {
if err := x.MsgSend(m); err != nil {
return err
}
return x.CloseSend()
}
type DRPCNodeClient interface {
DRPCConn() drpc.Conn
CheckIn(ctx context.Context, in *CheckInRequest) (*CheckInResponse, error)
}
type drpcNodeClient struct {
cc drpc.Conn
}
func NewDRPCNodeClient(cc drpc.Conn) DRPCNodeClient {
return &drpcNodeClient{cc}
}
func (c *drpcNodeClient) DRPCConn() drpc.Conn { return c.cc }
func (c *drpcNodeClient) CheckIn(ctx context.Context, in *CheckInRequest) (*CheckInResponse, error) {
out := new(CheckInResponse)
err := c.cc.Invoke(ctx, "/contact.Node/CheckIn", in, out)
if err != nil {
return nil, err
}
return out, nil
}
type DRPCNodeServer interface {
CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error)
}
type DRPCNodeDescription struct{}
func (DRPCNodeDescription) NumMethods() int { return 1 }
func (DRPCNodeDescription) Method(n int) (string, drpc.Handler, interface{}, bool) {
switch n {
case 0:
return "/contact.Node/CheckIn",
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCNodeServer).
CheckIn(
ctx,
in1.(*CheckInRequest),
)
}, DRPCNodeServer.CheckIn, true
default:
return "", nil, nil, false
}
}
func DRPCRegisterNode(srv drpc.Server, impl DRPCNodeServer) {
srv.Register(impl, DRPCNodeDescription{})
}
type DRPCNode_CheckInStream interface {
drpc.Stream
SendAndClose(*CheckInResponse) error
}
type drpcNodeCheckInStream struct {
drpc.Stream
}
func (x *drpcNodeCheckInStream) SendAndClose(m *CheckInResponse) error {
if err := x.MsgSend(m); err != nil {
return err
}
return x.CloseSend()
}
// 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
// ContactClient is the client API for Contact service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ContactClient interface {
PingNode(ctx context.Context, in *ContactPingRequest, opts ...grpc.CallOption) (*ContactPingResponse, error)
}
type contactClient struct {
cc *grpc.ClientConn
}
func NewContactClient(cc *grpc.ClientConn) ContactClient {
return &contactClient{cc}
}
func (c *contactClient) PingNode(ctx context.Context, in *ContactPingRequest, opts ...grpc.CallOption) (*ContactPingResponse, error) {
out := new(ContactPingResponse)
err := c.cc.Invoke(ctx, "/contact.Contact/PingNode", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ContactServer is the server API for Contact service.
type ContactServer interface {
PingNode(context.Context, *ContactPingRequest) (*ContactPingResponse, error)
}
func RegisterContactServer(s *grpc.Server, srv ContactServer) {
s.RegisterService(&_Contact_serviceDesc, srv)
}
func _Contact_PingNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ContactPingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContactServer).PingNode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/contact.Contact/PingNode",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContactServer).PingNode(ctx, req.(*ContactPingRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Contact_serviceDesc = grpc.ServiceDesc{
ServiceName: "contact.Contact",
HandlerType: (*ContactServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PingNode",
Handler: _Contact_PingNode_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "contact.proto",
}
// NodeClient is the client API for Node service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NodeClient interface {
CheckIn(ctx context.Context, in *CheckInRequest, opts ...grpc.CallOption) (*CheckInResponse, error)
}
type nodeClient struct {
cc *grpc.ClientConn
}
func NewNodeClient(cc *grpc.ClientConn) NodeClient {
return &nodeClient{cc}
}
func (c *nodeClient) CheckIn(ctx context.Context, in *CheckInRequest, opts ...grpc.CallOption) (*CheckInResponse, error) {
out := new(CheckInResponse)
err := c.cc.Invoke(ctx, "/contact.Node/CheckIn", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NodeServer is the server API for Node service.
type NodeServer interface {
CheckIn(context.Context, *CheckInRequest) (*CheckInResponse, error)
}
func RegisterNodeServer(s *grpc.Server, srv NodeServer) {
s.RegisterService(&_Node_serviceDesc, srv)
}
func _Node_CheckIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckInRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServer).CheckIn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/contact.Node/CheckIn",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServer).CheckIn(ctx, req.(*CheckInRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Node_serviceDesc = grpc.ServiceDesc{
ServiceName: "contact.Node",
HandlerType: (*NodeServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CheckIn",
Handler: _Node_CheckIn_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "contact.proto",
}