127 lines
4.3 KiB
Go
127 lines
4.3 KiB
Go
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
|
// source: building.proto
|
||
|
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
fmt "fmt"
|
||
|
proto "github.com/golang/protobuf/proto"
|
||
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||
|
grpc "google.golang.org/grpc"
|
||
|
codes "google.golang.org/grpc/codes"
|
||
|
status "google.golang.org/grpc/status"
|
||
|
math "math"
|
||
|
)
|
||
|
|
||
|
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterFile("building.proto", fileDescriptor_05bb3d959b9f4d76)
|
||
|
}
|
||
|
|
||
|
var fileDescriptor_05bb3d959b9f4d76 = []byte{
|
||
|
// 152 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0x2a, 0xcd, 0xcc,
|
||
|
0x49, 0xc9, 0xcc, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc,
|
||
|
0x93, 0xe2, 0x4a, 0x4a, 0x2c, 0x4e, 0x85, 0x88, 0x48, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4,
|
||
|
0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, 0x15,
|
||
|
0x43, 0x64, 0x8d, 0x7c, 0xb8, 0x38, 0x9c, 0xa0, 0x26, 0x08, 0x39, 0x70, 0xb1, 0xf8, 0x25, 0xe6,
|
||
|
0xa6, 0x0a, 0xf1, 0xea, 0x81, 0x0c, 0xd1, 0x0b, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x91, 0xe2,
|
||
|
0x86, 0x71, 0x0b, 0x72, 0x2a, 0x95, 0x64, 0x9a, 0x2e, 0x3f, 0x99, 0xcc, 0x24, 0xa6, 0x24, 0xa8,
|
||
|
0x5f, 0x66, 0xa8, 0x0f, 0xb3, 0x5b, 0x3f, 0x2f, 0x31, 0x37, 0xd5, 0x8a, 0x51, 0xcb, 0x89, 0x23,
|
||
|
0x8a, 0x4d, 0xcf, 0x1a, 0xa4, 0x3a, 0x89, 0x0d, 0x6c, 0xbc, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff,
|
||
|
0xb2, 0x4d, 0xb2, 0x8a, 0xa0, 0x00, 0x00, 0x00,
|
||
|
}
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ context.Context
|
||
|
var _ grpc.ClientConnInterface
|
||
|
|
||
|
// 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.SupportPackageIsVersion6
|
||
|
|
||
|
// BuildingClient is the client API for Building service.
|
||
|
//
|
||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||
|
type BuildingClient interface {
|
||
|
// Sends a greeting
|
||
|
Name(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
|
||
|
}
|
||
|
|
||
|
type buildingClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewBuildingClient(cc grpc.ClientConnInterface) BuildingClient {
|
||
|
return &buildingClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *buildingClient) Name(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) {
|
||
|
out := new(Reply)
|
||
|
err := c.cc.Invoke(ctx, "/main.Building/Name", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// BuildingServer is the server API for Building service.
|
||
|
type BuildingServer interface {
|
||
|
// Sends a greeting
|
||
|
Name(context.Context, *Request) (*Reply, error)
|
||
|
}
|
||
|
|
||
|
// UnimplementedBuildingServer can be embedded to have forward compatible implementations.
|
||
|
type UnimplementedBuildingServer struct {
|
||
|
}
|
||
|
|
||
|
func (*UnimplementedBuildingServer) Name(ctx context.Context, req *Request) (*Reply, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Name not implemented")
|
||
|
}
|
||
|
|
||
|
func RegisterBuildingServer(s *grpc.Server, srv BuildingServer) {
|
||
|
s.RegisterService(&_Building_serviceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _Building_Name_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(Request)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(BuildingServer).Name(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/main.Building/Name",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(BuildingServer).Name(ctx, req.(*Request))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
var _Building_serviceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "main.Building",
|
||
|
HandlerType: (*BuildingServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Name",
|
||
|
Handler: _Building_Name_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "building.proto",
|
||
|
}
|