safe.pb.go 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.9.0
  5. // source: safe.proto
  6. package proto
  7. import (
  8. context "context"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  14. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  15. reflect "reflect"
  16. sync "sync"
  17. )
  18. const (
  19. // Verify that this generated code is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21. // Verify that runtime/protoimpl is sufficiently up-to-date.
  22. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23. )
  24. // This is a compile-time assertion that a sufficiently up-to-date version
  25. // of the legacy proto package is being used.
  26. const _ = proto.ProtoPackageIsVersion4
  27. // The request message containing the user's name.
  28. type SafeServiceRequest struct {
  29. state protoimpl.MessageState
  30. sizeCache protoimpl.SizeCache
  31. unknownFields protoimpl.UnknownFields
  32. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  33. }
  34. func (x *SafeServiceRequest) Reset() {
  35. *x = SafeServiceRequest{}
  36. if protoimpl.UnsafeEnabled {
  37. mi := &file_safe_proto_msgTypes[0]
  38. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  39. ms.StoreMessageInfo(mi)
  40. }
  41. }
  42. func (x *SafeServiceRequest) String() string {
  43. return protoimpl.X.MessageStringOf(x)
  44. }
  45. func (*SafeServiceRequest) ProtoMessage() {}
  46. func (x *SafeServiceRequest) ProtoReflect() protoreflect.Message {
  47. mi := &file_safe_proto_msgTypes[0]
  48. if protoimpl.UnsafeEnabled && x != nil {
  49. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  50. if ms.LoadMessageInfo() == nil {
  51. ms.StoreMessageInfo(mi)
  52. }
  53. return ms
  54. }
  55. return mi.MessageOf(x)
  56. }
  57. // Deprecated: Use SafeServiceRequest.ProtoReflect.Descriptor instead.
  58. func (*SafeServiceRequest) Descriptor() ([]byte, []int) {
  59. return file_safe_proto_rawDescGZIP(), []int{0}
  60. }
  61. func (x *SafeServiceRequest) GetId() int32 {
  62. if x != nil {
  63. return x.Id
  64. }
  65. return 0
  66. }
  67. // The response message containing the greetings
  68. type SafeServiceReply struct {
  69. state protoimpl.MessageState
  70. sizeCache protoimpl.SizeCache
  71. unknownFields protoimpl.UnknownFields
  72. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
  73. }
  74. func (x *SafeServiceReply) Reset() {
  75. *x = SafeServiceReply{}
  76. if protoimpl.UnsafeEnabled {
  77. mi := &file_safe_proto_msgTypes[1]
  78. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  79. ms.StoreMessageInfo(mi)
  80. }
  81. }
  82. func (x *SafeServiceReply) String() string {
  83. return protoimpl.X.MessageStringOf(x)
  84. }
  85. func (*SafeServiceReply) ProtoMessage() {}
  86. func (x *SafeServiceReply) ProtoReflect() protoreflect.Message {
  87. mi := &file_safe_proto_msgTypes[1]
  88. if protoimpl.UnsafeEnabled && x != nil {
  89. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  90. if ms.LoadMessageInfo() == nil {
  91. ms.StoreMessageInfo(mi)
  92. }
  93. return ms
  94. }
  95. return mi.MessageOf(x)
  96. }
  97. // Deprecated: Use SafeServiceReply.ProtoReflect.Descriptor instead.
  98. func (*SafeServiceReply) Descriptor() ([]byte, []int) {
  99. return file_safe_proto_rawDescGZIP(), []int{1}
  100. }
  101. func (x *SafeServiceReply) GetMessage() string {
  102. if x != nil {
  103. return x.Message
  104. }
  105. return ""
  106. }
  107. var File_safe_proto protoreflect.FileDescriptor
  108. var file_safe_proto_rawDesc = []byte{
  109. 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72,
  110. 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x12, 0x53, 0x61, 0x66, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
  111. 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
  112. 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x10, 0x53, 0x61, 0x66,
  113. 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a,
  114. 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
  115. 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x52, 0x0a, 0x0b, 0x53, 0x61, 0x66, 0x65, 0x53,
  116. 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x53, 0x61, 0x66,
  117. 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61,
  118. 0x66, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
  119. 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61, 0x66, 0x65, 0x53, 0x65, 0x72,
  120. 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f,
  121. 0x74, 0x6f, 0x33,
  122. }
  123. var (
  124. file_safe_proto_rawDescOnce sync.Once
  125. file_safe_proto_rawDescData = file_safe_proto_rawDesc
  126. )
  127. func file_safe_proto_rawDescGZIP() []byte {
  128. file_safe_proto_rawDescOnce.Do(func() {
  129. file_safe_proto_rawDescData = protoimpl.X.CompressGZIP(file_safe_proto_rawDescData)
  130. })
  131. return file_safe_proto_rawDescData
  132. }
  133. var file_safe_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
  134. var file_safe_proto_goTypes = []interface{}{
  135. (*SafeServiceRequest)(nil), // 0: proto.SafeServiceRequest
  136. (*SafeServiceReply)(nil), // 1: proto.SafeServiceReply
  137. }
  138. var file_safe_proto_depIdxs = []int32{
  139. 0, // 0: proto.SafeService.getSafeList:input_type -> proto.SafeServiceRequest
  140. 1, // 1: proto.SafeService.getSafeList:output_type -> proto.SafeServiceReply
  141. 1, // [1:2] is the sub-list for method output_type
  142. 0, // [0:1] is the sub-list for method input_type
  143. 0, // [0:0] is the sub-list for extension type_name
  144. 0, // [0:0] is the sub-list for extension extendee
  145. 0, // [0:0] is the sub-list for field type_name
  146. }
  147. func init() { file_safe_proto_init() }
  148. func file_safe_proto_init() {
  149. if File_safe_proto != nil {
  150. return
  151. }
  152. if !protoimpl.UnsafeEnabled {
  153. file_safe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  154. switch v := v.(*SafeServiceRequest); i {
  155. case 0:
  156. return &v.state
  157. case 1:
  158. return &v.sizeCache
  159. case 2:
  160. return &v.unknownFields
  161. default:
  162. return nil
  163. }
  164. }
  165. file_safe_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  166. switch v := v.(*SafeServiceReply); i {
  167. case 0:
  168. return &v.state
  169. case 1:
  170. return &v.sizeCache
  171. case 2:
  172. return &v.unknownFields
  173. default:
  174. return nil
  175. }
  176. }
  177. }
  178. type x struct{}
  179. out := protoimpl.TypeBuilder{
  180. File: protoimpl.DescBuilder{
  181. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  182. RawDescriptor: file_safe_proto_rawDesc,
  183. NumEnums: 0,
  184. NumMessages: 2,
  185. NumExtensions: 0,
  186. NumServices: 1,
  187. },
  188. GoTypes: file_safe_proto_goTypes,
  189. DependencyIndexes: file_safe_proto_depIdxs,
  190. MessageInfos: file_safe_proto_msgTypes,
  191. }.Build()
  192. File_safe_proto = out.File
  193. file_safe_proto_rawDesc = nil
  194. file_safe_proto_goTypes = nil
  195. file_safe_proto_depIdxs = nil
  196. }
  197. // Reference imports to suppress errors if they are not otherwise used.
  198. var _ context.Context
  199. var _ grpc.ClientConnInterface
  200. // This is a compile-time assertion to ensure that this generated file
  201. // is compatible with the grpc package it is being compiled against.
  202. const _ = grpc.SupportPackageIsVersion6
  203. // SafeServiceClient is the client API for SafeService service.
  204. //
  205. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  206. type SafeServiceClient interface {
  207. // Sends a greeting
  208. GetSafeList(ctx context.Context, in *SafeServiceRequest, opts ...grpc.CallOption) (*SafeServiceReply, error)
  209. }
  210. type safeServiceClient struct {
  211. cc grpc.ClientConnInterface
  212. }
  213. func NewSafeServiceClient(cc grpc.ClientConnInterface) SafeServiceClient {
  214. return &safeServiceClient{cc}
  215. }
  216. func (c *safeServiceClient) GetSafeList(ctx context.Context, in *SafeServiceRequest, opts ...grpc.CallOption) (*SafeServiceReply, error) {
  217. out := new(SafeServiceReply)
  218. err := c.cc.Invoke(ctx, "/proto.SafeService/getSafeList", in, out, opts...)
  219. if err != nil {
  220. return nil, err
  221. }
  222. return out, nil
  223. }
  224. // SafeServiceServer is the server API for SafeService service.
  225. type SafeServiceServer interface {
  226. // Sends a greeting
  227. GetSafeList(context.Context, *SafeServiceRequest) (*SafeServiceReply, error)
  228. }
  229. // UnimplementedSafeServiceServer can be embedded to have forward compatible implementations.
  230. type UnimplementedSafeServiceServer struct {
  231. }
  232. func (*UnimplementedSafeServiceServer) GetSafeList(context.Context, *SafeServiceRequest) (*SafeServiceReply, error) {
  233. return nil, status.Errorf(codes.Unimplemented, "method GetSafeList not implemented")
  234. }
  235. func RegisterSafeServiceServer(s *grpc.Server, srv SafeServiceServer) {
  236. s.RegisterService(&_SafeService_serviceDesc, srv)
  237. }
  238. func _SafeService_GetSafeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  239. in := new(SafeServiceRequest)
  240. if err := dec(in); err != nil {
  241. return nil, err
  242. }
  243. if interceptor == nil {
  244. return srv.(SafeServiceServer).GetSafeList(ctx, in)
  245. }
  246. info := &grpc.UnaryServerInfo{
  247. Server: srv,
  248. FullMethod: "/proto.SafeService/GetSafeList",
  249. }
  250. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  251. return srv.(SafeServiceServer).GetSafeList(ctx, req.(*SafeServiceRequest))
  252. }
  253. return interceptor(ctx, in, info, handler)
  254. }
  255. var _SafeService_serviceDesc = grpc.ServiceDesc{
  256. ServiceName: "proto.SafeService",
  257. HandlerType: (*SafeServiceServer)(nil),
  258. Methods: []grpc.MethodDesc{
  259. {
  260. MethodName: "getSafeList",
  261. Handler: _SafeService_GetSafeList_Handler,
  262. },
  263. },
  264. Streams: []grpc.StreamDesc{},
  265. Metadata: "safe.proto",
  266. }