123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: adm_data.proto
- // package声明符,用来防止不同的消息类型有命名冲突
- package pb
- import (
- v1 "adm-data/pb/v1"
- context "context"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- 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("adm_data.proto", fileDescriptor_6b31a6a84b848144)
- }
- var fileDescriptor_6b31a6a84b848144 = []byte{
- // 121 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0x4c, 0xc9, 0x8d,
- 0x4f, 0x49, 0x2c, 0x49, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2a, 0x48, 0xd2, 0x2b,
- 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0x95, 0xe2, 0x2d, 0x33, 0xd4, 0x47, 0x48, 0x19, 0x99, 0x71,
- 0xb1, 0xb8, 0x24, 0x96, 0x24, 0x0a, 0xe9, 0x71, 0xb1, 0x06, 0x96, 0xa6, 0x16, 0x55, 0x0a, 0x09,
- 0xe8, 0x95, 0x19, 0xea, 0x81, 0x99, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x52, 0x82, 0x48,
- 0x22, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x4a, 0x0c, 0x4e, 0xbc, 0x51, 0xdc, 0x89, 0x29, 0xb9,
- 0xba, 0x20, 0x93, 0xf4, 0x0b, 0x92, 0x92, 0xd8, 0xc0, 0xa6, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff,
- 0xff, 0x24, 0x83, 0x68, 0x4f, 0x7a, 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
- // DataClient is the client API for Data service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type DataClient interface {
- // 通用接口查询
- Query(ctx context.Context, in *v1.QueryRequest, opts ...grpc.CallOption) (*v1.QueryResponse, error)
- }
- type dataClient struct {
- cc grpc.ClientConnInterface
- }
- func NewDataClient(cc grpc.ClientConnInterface) DataClient {
- return &dataClient{cc}
- }
- func (c *dataClient) Query(ctx context.Context, in *v1.QueryRequest, opts ...grpc.CallOption) (*v1.QueryResponse, error) {
- out := new(v1.QueryResponse)
- err := c.cc.Invoke(ctx, "/pb.service.Data/Query", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // DataServer is the server API for Data service.
- type DataServer interface {
- // 通用接口查询
- Query(context.Context, *v1.QueryRequest) (*v1.QueryResponse, error)
- }
- // UnimplementedDataServer can be embedded to have forward compatible implementations.
- type UnimplementedDataServer struct {
- }
- func (*UnimplementedDataServer) Query(ctx context.Context, req *v1.QueryRequest) (*v1.QueryResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
- }
- func RegisterDataServer(s *grpc.Server, srv DataServer) {
- s.RegisterService(&_Data_serviceDesc, srv)
- }
- func _Data_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.QueryRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DataServer).Query(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Data/Query",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DataServer).Query(ctx, req.(*v1.QueryRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _Data_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.service.Data",
- HandlerType: (*DataServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "Query",
- Handler: _Data_Query_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "adm_data.proto",
- }
|