log_service.pb.go 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: log_service.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. context "context"
  7. fmt "fmt"
  8. proto "github.com/golang/protobuf/proto"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. math "math"
  13. v1 "smart-enterprise-management-gateway/pb/v1"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  24. func init() {
  25. proto.RegisterFile("log_service.proto", fileDescriptor_c40f363b56b74b92)
  26. }
  27. var fileDescriptor_c40f363b56b74b92 = []byte{
  28. // 180 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8e, 0xb1, 0x0a, 0xc2, 0x30,
  30. 0x10, 0x40, 0xc5, 0xa1, 0x42, 0x10, 0xb4, 0x19, 0x1c, 0x3a, 0x3a, 0x88, 0x4b, 0x53, 0xaa, 0x5f,
  31. 0xa0, 0x73, 0x26, 0xbb, 0xb9, 0x94, 0xd4, 0x1e, 0x21, 0xd0, 0xe6, 0xd2, 0xe4, 0xac, 0xf4, 0xef,
  32. 0xa5, 0xad, 0x82, 0x6e, 0x77, 0xef, 0xf1, 0xb8, 0x63, 0x71, 0x83, 0xba, 0x0c, 0xe0, 0x7b, 0xf3,
  33. 0x00, 0xe1, 0x3c, 0x12, 0xf2, 0xa5, 0xab, 0x92, 0x5d, 0x9f, 0x67, 0xe8, 0xc0, 0x2b, 0x32, 0x68,
  34. 0xcb, 0x06, 0xf5, 0xec, 0x4e, 0x1d, 0x5b, 0x17, 0xad, 0xf2, 0x54, 0x18, 0x02, 0x89, 0x9a, 0x0b,
  35. 0x16, 0x49, 0xd4, 0x97, 0xba, 0xe6, 0xb1, 0xe8, 0x73, 0x31, 0xcf, 0x37, 0xe8, 0x9e, 0x10, 0x28,
  36. 0xd9, 0xfc, 0x22, 0xd7, 0x0c, 0xfb, 0x05, 0xcf, 0xd9, 0x4a, 0xa2, 0x96, 0x26, 0x10, 0xe7, 0x1f,
  37. 0x3b, 0x2e, 0xdf, 0x62, 0xfb, 0xc7, 0xa6, 0xe4, 0x7a, 0xbc, 0x1f, 0xc2, 0x78, 0x32, 0x05, 0x4b,
  38. 0xe0, 0x9d, 0x37, 0x01, 0xd2, 0x56, 0x59, 0xa5, 0xa1, 0x05, 0x4b, 0xa9, 0x56, 0x04, 0x2f, 0x35,
  39. 0x64, 0xae, 0xaa, 0xa2, 0xe9, 0xc7, 0xf3, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x8d, 0x49, 0x6f,
  40. 0xd4, 0x00, 0x00, 0x00,
  41. }
  42. // Reference imports to suppress errors if they are not otherwise used.
  43. var _ context.Context
  44. var _ grpc.ClientConnInterface
  45. // This is a compile-time assertion to ensure that this generated file
  46. // is compatible with the grpc package it is being compiled against.
  47. const _ = grpc.SupportPackageIsVersion6
  48. // SmartSiteLogClient is the client API for SmartSiteLog service.
  49. //
  50. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  51. type SmartSiteLogClient interface {
  52. LogAdd(ctx context.Context, in *v1.LogAddRequest, opts ...grpc.CallOption) (*v1.LogAddReply, error)
  53. LogList(ctx context.Context, in *v1.LogListRequest, opts ...grpc.CallOption) (*v1.LogListReply, error)
  54. }
  55. type smartSiteLogClient struct {
  56. cc grpc.ClientConnInterface
  57. }
  58. func NewSmartSiteLogClient(cc grpc.ClientConnInterface) SmartSiteLogClient {
  59. return &smartSiteLogClient{cc}
  60. }
  61. func (c *smartSiteLogClient) LogAdd(ctx context.Context, in *v1.LogAddRequest, opts ...grpc.CallOption) (*v1.LogAddReply, error) {
  62. out := new(v1.LogAddReply)
  63. err := c.cc.Invoke(ctx, "/pb.SmartSiteLog/LogAdd", in, out, opts...)
  64. if err != nil {
  65. return nil, err
  66. }
  67. return out, nil
  68. }
  69. func (c *smartSiteLogClient) LogList(ctx context.Context, in *v1.LogListRequest, opts ...grpc.CallOption) (*v1.LogListReply, error) {
  70. out := new(v1.LogListReply)
  71. err := c.cc.Invoke(ctx, "/pb.SmartSiteLog/LogList", in, out, opts...)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return out, nil
  76. }
  77. // SmartSiteLogServer is the server API for SmartSiteLog service.
  78. type SmartSiteLogServer interface {
  79. LogAdd(context.Context, *v1.LogAddRequest) (*v1.LogAddReply, error)
  80. LogList(context.Context, *v1.LogListRequest) (*v1.LogListReply, error)
  81. }
  82. // UnimplementedSmartSiteLogServer can be embedded to have forward compatible implementations.
  83. type UnimplementedSmartSiteLogServer struct {
  84. }
  85. func (*UnimplementedSmartSiteLogServer) LogAdd(ctx context.Context, req *v1.LogAddRequest) (*v1.LogAddReply, error) {
  86. return nil, status.Errorf(codes.Unimplemented, "method LogAdd not implemented")
  87. }
  88. func (*UnimplementedSmartSiteLogServer) LogList(ctx context.Context, req *v1.LogListRequest) (*v1.LogListReply, error) {
  89. return nil, status.Errorf(codes.Unimplemented, "method LogList not implemented")
  90. }
  91. func RegisterSmartSiteLogServer(s *grpc.Server, srv SmartSiteLogServer) {
  92. s.RegisterService(&_SmartSiteLog_serviceDesc, srv)
  93. }
  94. func _SmartSiteLog_LogAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  95. in := new(v1.LogAddRequest)
  96. if err := dec(in); err != nil {
  97. return nil, err
  98. }
  99. if interceptor == nil {
  100. return srv.(SmartSiteLogServer).LogAdd(ctx, in)
  101. }
  102. info := &grpc.UnaryServerInfo{
  103. Server: srv,
  104. FullMethod: "/pb.SmartSiteLog/LogAdd",
  105. }
  106. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  107. return srv.(SmartSiteLogServer).LogAdd(ctx, req.(*v1.LogAddRequest))
  108. }
  109. return interceptor(ctx, in, info, handler)
  110. }
  111. func _SmartSiteLog_LogList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  112. in := new(v1.LogListRequest)
  113. if err := dec(in); err != nil {
  114. return nil, err
  115. }
  116. if interceptor == nil {
  117. return srv.(SmartSiteLogServer).LogList(ctx, in)
  118. }
  119. info := &grpc.UnaryServerInfo{
  120. Server: srv,
  121. FullMethod: "/pb.SmartSiteLog/LogList",
  122. }
  123. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  124. return srv.(SmartSiteLogServer).LogList(ctx, req.(*v1.LogListRequest))
  125. }
  126. return interceptor(ctx, in, info, handler)
  127. }
  128. var _SmartSiteLog_serviceDesc = grpc.ServiceDesc{
  129. ServiceName: "pb.SmartSiteLog",
  130. HandlerType: (*SmartSiteLogServer)(nil),
  131. Methods: []grpc.MethodDesc{
  132. {
  133. MethodName: "LogAdd",
  134. Handler: _SmartSiteLog_LogAdd_Handler,
  135. },
  136. {
  137. MethodName: "LogList",
  138. Handler: _SmartSiteLog_LogList_Handler,
  139. },
  140. },
  141. Streams: []grpc.StreamDesc{},
  142. Metadata: "log_service.proto",
  143. }