command_grpc.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. package command
  2. import (
  3. context "context"
  4. grpc "google.golang.org/grpc"
  5. codes "google.golang.org/grpc/codes"
  6. status "google.golang.org/grpc/status"
  7. )
  8. // This is a compile-time assertion to ensure that this generated file
  9. // is compatible with the grpc package it is being compiled against.
  10. // Requires gRPC-Go v1.64.0 or later.
  11. const _ = grpc.SupportPackageIsVersion9
  12. const (
  13. SubscriptionManagerService_ListTrackedSubscription_FullMethodName = "/v2ray.core.app.subscription.subscriptionmanager.command.SubscriptionManagerService/ListTrackedSubscription"
  14. SubscriptionManagerService_AddTrackedSubscription_FullMethodName = "/v2ray.core.app.subscription.subscriptionmanager.command.SubscriptionManagerService/AddTrackedSubscription"
  15. SubscriptionManagerService_RemoveTrackedSubscription_FullMethodName = "/v2ray.core.app.subscription.subscriptionmanager.command.SubscriptionManagerService/RemoveTrackedSubscription"
  16. SubscriptionManagerService_GetTrackedSubscriptionStatus_FullMethodName = "/v2ray.core.app.subscription.subscriptionmanager.command.SubscriptionManagerService/GetTrackedSubscriptionStatus"
  17. SubscriptionManagerService_UpdateTrackedSubscription_FullMethodName = "/v2ray.core.app.subscription.subscriptionmanager.command.SubscriptionManagerService/UpdateTrackedSubscription"
  18. )
  19. // SubscriptionManagerServiceClient is the client API for SubscriptionManagerService service.
  20. //
  21. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  22. type SubscriptionManagerServiceClient interface {
  23. ListTrackedSubscription(ctx context.Context, in *ListTrackedSubscriptionRequest, opts ...grpc.CallOption) (*ListTrackedSubscriptionResponse, error)
  24. AddTrackedSubscription(ctx context.Context, in *AddTrackedSubscriptionRequest, opts ...grpc.CallOption) (*AddTrackedSubscriptionResponse, error)
  25. RemoveTrackedSubscription(ctx context.Context, in *RemoveTrackedSubscriptionRequest, opts ...grpc.CallOption) (*RemoveTrackedSubscriptionResponse, error)
  26. GetTrackedSubscriptionStatus(ctx context.Context, in *GetTrackedSubscriptionStatusRequest, opts ...grpc.CallOption) (*GetTrackedSubscriptionStatusResponse, error)
  27. UpdateTrackedSubscription(ctx context.Context, in *UpdateTrackedSubscriptionRequest, opts ...grpc.CallOption) (*UpdateTrackedSubscriptionResponse, error)
  28. }
  29. type subscriptionManagerServiceClient struct {
  30. cc grpc.ClientConnInterface
  31. }
  32. func NewSubscriptionManagerServiceClient(cc grpc.ClientConnInterface) SubscriptionManagerServiceClient {
  33. return &subscriptionManagerServiceClient{cc}
  34. }
  35. func (c *subscriptionManagerServiceClient) ListTrackedSubscription(ctx context.Context, in *ListTrackedSubscriptionRequest, opts ...grpc.CallOption) (*ListTrackedSubscriptionResponse, error) {
  36. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  37. out := new(ListTrackedSubscriptionResponse)
  38. err := c.cc.Invoke(ctx, SubscriptionManagerService_ListTrackedSubscription_FullMethodName, in, out, cOpts...)
  39. if err != nil {
  40. return nil, err
  41. }
  42. return out, nil
  43. }
  44. func (c *subscriptionManagerServiceClient) AddTrackedSubscription(ctx context.Context, in *AddTrackedSubscriptionRequest, opts ...grpc.CallOption) (*AddTrackedSubscriptionResponse, error) {
  45. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  46. out := new(AddTrackedSubscriptionResponse)
  47. err := c.cc.Invoke(ctx, SubscriptionManagerService_AddTrackedSubscription_FullMethodName, in, out, cOpts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *subscriptionManagerServiceClient) RemoveTrackedSubscription(ctx context.Context, in *RemoveTrackedSubscriptionRequest, opts ...grpc.CallOption) (*RemoveTrackedSubscriptionResponse, error) {
  54. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  55. out := new(RemoveTrackedSubscriptionResponse)
  56. err := c.cc.Invoke(ctx, SubscriptionManagerService_RemoveTrackedSubscription_FullMethodName, in, out, cOpts...)
  57. if err != nil {
  58. return nil, err
  59. }
  60. return out, nil
  61. }
  62. func (c *subscriptionManagerServiceClient) GetTrackedSubscriptionStatus(ctx context.Context, in *GetTrackedSubscriptionStatusRequest, opts ...grpc.CallOption) (*GetTrackedSubscriptionStatusResponse, error) {
  63. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  64. out := new(GetTrackedSubscriptionStatusResponse)
  65. err := c.cc.Invoke(ctx, SubscriptionManagerService_GetTrackedSubscriptionStatus_FullMethodName, in, out, cOpts...)
  66. if err != nil {
  67. return nil, err
  68. }
  69. return out, nil
  70. }
  71. func (c *subscriptionManagerServiceClient) UpdateTrackedSubscription(ctx context.Context, in *UpdateTrackedSubscriptionRequest, opts ...grpc.CallOption) (*UpdateTrackedSubscriptionResponse, error) {
  72. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  73. out := new(UpdateTrackedSubscriptionResponse)
  74. err := c.cc.Invoke(ctx, SubscriptionManagerService_UpdateTrackedSubscription_FullMethodName, in, out, cOpts...)
  75. if err != nil {
  76. return nil, err
  77. }
  78. return out, nil
  79. }
  80. // SubscriptionManagerServiceServer is the server API for SubscriptionManagerService service.
  81. // All implementations must embed UnimplementedSubscriptionManagerServiceServer
  82. // for forward compatibility.
  83. type SubscriptionManagerServiceServer interface {
  84. ListTrackedSubscription(context.Context, *ListTrackedSubscriptionRequest) (*ListTrackedSubscriptionResponse, error)
  85. AddTrackedSubscription(context.Context, *AddTrackedSubscriptionRequest) (*AddTrackedSubscriptionResponse, error)
  86. RemoveTrackedSubscription(context.Context, *RemoveTrackedSubscriptionRequest) (*RemoveTrackedSubscriptionResponse, error)
  87. GetTrackedSubscriptionStatus(context.Context, *GetTrackedSubscriptionStatusRequest) (*GetTrackedSubscriptionStatusResponse, error)
  88. UpdateTrackedSubscription(context.Context, *UpdateTrackedSubscriptionRequest) (*UpdateTrackedSubscriptionResponse, error)
  89. mustEmbedUnimplementedSubscriptionManagerServiceServer()
  90. }
  91. // UnimplementedSubscriptionManagerServiceServer must be embedded to have
  92. // forward compatible implementations.
  93. //
  94. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  95. // pointer dereference when methods are called.
  96. type UnimplementedSubscriptionManagerServiceServer struct{}
  97. func (UnimplementedSubscriptionManagerServiceServer) ListTrackedSubscription(context.Context, *ListTrackedSubscriptionRequest) (*ListTrackedSubscriptionResponse, error) {
  98. return nil, status.Errorf(codes.Unimplemented, "method ListTrackedSubscription not implemented")
  99. }
  100. func (UnimplementedSubscriptionManagerServiceServer) AddTrackedSubscription(context.Context, *AddTrackedSubscriptionRequest) (*AddTrackedSubscriptionResponse, error) {
  101. return nil, status.Errorf(codes.Unimplemented, "method AddTrackedSubscription not implemented")
  102. }
  103. func (UnimplementedSubscriptionManagerServiceServer) RemoveTrackedSubscription(context.Context, *RemoveTrackedSubscriptionRequest) (*RemoveTrackedSubscriptionResponse, error) {
  104. return nil, status.Errorf(codes.Unimplemented, "method RemoveTrackedSubscription not implemented")
  105. }
  106. func (UnimplementedSubscriptionManagerServiceServer) GetTrackedSubscriptionStatus(context.Context, *GetTrackedSubscriptionStatusRequest) (*GetTrackedSubscriptionStatusResponse, error) {
  107. return nil, status.Errorf(codes.Unimplemented, "method GetTrackedSubscriptionStatus not implemented")
  108. }
  109. func (UnimplementedSubscriptionManagerServiceServer) UpdateTrackedSubscription(context.Context, *UpdateTrackedSubscriptionRequest) (*UpdateTrackedSubscriptionResponse, error) {
  110. return nil, status.Errorf(codes.Unimplemented, "method UpdateTrackedSubscription not implemented")
  111. }
  112. func (UnimplementedSubscriptionManagerServiceServer) mustEmbedUnimplementedSubscriptionManagerServiceServer() {
  113. }
  114. func (UnimplementedSubscriptionManagerServiceServer) testEmbeddedByValue() {}
  115. // UnsafeSubscriptionManagerServiceServer may be embedded to opt out of forward compatibility for this service.
  116. // Use of this interface is not recommended, as added methods to SubscriptionManagerServiceServer will
  117. // result in compilation errors.
  118. type UnsafeSubscriptionManagerServiceServer interface {
  119. mustEmbedUnimplementedSubscriptionManagerServiceServer()
  120. }
  121. func RegisterSubscriptionManagerServiceServer(s grpc.ServiceRegistrar, srv SubscriptionManagerServiceServer) {
  122. // If the following call pancis, it indicates UnimplementedSubscriptionManagerServiceServer was
  123. // embedded by pointer and is nil. This will cause panics if an
  124. // unimplemented method is ever invoked, so we test this at initialization
  125. // time to prevent it from happening at runtime later due to I/O.
  126. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  127. t.testEmbeddedByValue()
  128. }
  129. s.RegisterService(&SubscriptionManagerService_ServiceDesc, srv)
  130. }
  131. func _SubscriptionManagerService_ListTrackedSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  132. in := new(ListTrackedSubscriptionRequest)
  133. if err := dec(in); err != nil {
  134. return nil, err
  135. }
  136. if interceptor == nil {
  137. return srv.(SubscriptionManagerServiceServer).ListTrackedSubscription(ctx, in)
  138. }
  139. info := &grpc.UnaryServerInfo{
  140. Server: srv,
  141. FullMethod: SubscriptionManagerService_ListTrackedSubscription_FullMethodName,
  142. }
  143. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  144. return srv.(SubscriptionManagerServiceServer).ListTrackedSubscription(ctx, req.(*ListTrackedSubscriptionRequest))
  145. }
  146. return interceptor(ctx, in, info, handler)
  147. }
  148. func _SubscriptionManagerService_AddTrackedSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  149. in := new(AddTrackedSubscriptionRequest)
  150. if err := dec(in); err != nil {
  151. return nil, err
  152. }
  153. if interceptor == nil {
  154. return srv.(SubscriptionManagerServiceServer).AddTrackedSubscription(ctx, in)
  155. }
  156. info := &grpc.UnaryServerInfo{
  157. Server: srv,
  158. FullMethod: SubscriptionManagerService_AddTrackedSubscription_FullMethodName,
  159. }
  160. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  161. return srv.(SubscriptionManagerServiceServer).AddTrackedSubscription(ctx, req.(*AddTrackedSubscriptionRequest))
  162. }
  163. return interceptor(ctx, in, info, handler)
  164. }
  165. func _SubscriptionManagerService_RemoveTrackedSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  166. in := new(RemoveTrackedSubscriptionRequest)
  167. if err := dec(in); err != nil {
  168. return nil, err
  169. }
  170. if interceptor == nil {
  171. return srv.(SubscriptionManagerServiceServer).RemoveTrackedSubscription(ctx, in)
  172. }
  173. info := &grpc.UnaryServerInfo{
  174. Server: srv,
  175. FullMethod: SubscriptionManagerService_RemoveTrackedSubscription_FullMethodName,
  176. }
  177. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  178. return srv.(SubscriptionManagerServiceServer).RemoveTrackedSubscription(ctx, req.(*RemoveTrackedSubscriptionRequest))
  179. }
  180. return interceptor(ctx, in, info, handler)
  181. }
  182. func _SubscriptionManagerService_GetTrackedSubscriptionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  183. in := new(GetTrackedSubscriptionStatusRequest)
  184. if err := dec(in); err != nil {
  185. return nil, err
  186. }
  187. if interceptor == nil {
  188. return srv.(SubscriptionManagerServiceServer).GetTrackedSubscriptionStatus(ctx, in)
  189. }
  190. info := &grpc.UnaryServerInfo{
  191. Server: srv,
  192. FullMethod: SubscriptionManagerService_GetTrackedSubscriptionStatus_FullMethodName,
  193. }
  194. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  195. return srv.(SubscriptionManagerServiceServer).GetTrackedSubscriptionStatus(ctx, req.(*GetTrackedSubscriptionStatusRequest))
  196. }
  197. return interceptor(ctx, in, info, handler)
  198. }
  199. func _SubscriptionManagerService_UpdateTrackedSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  200. in := new(UpdateTrackedSubscriptionRequest)
  201. if err := dec(in); err != nil {
  202. return nil, err
  203. }
  204. if interceptor == nil {
  205. return srv.(SubscriptionManagerServiceServer).UpdateTrackedSubscription(ctx, in)
  206. }
  207. info := &grpc.UnaryServerInfo{
  208. Server: srv,
  209. FullMethod: SubscriptionManagerService_UpdateTrackedSubscription_FullMethodName,
  210. }
  211. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  212. return srv.(SubscriptionManagerServiceServer).UpdateTrackedSubscription(ctx, req.(*UpdateTrackedSubscriptionRequest))
  213. }
  214. return interceptor(ctx, in, info, handler)
  215. }
  216. // SubscriptionManagerService_ServiceDesc is the grpc.ServiceDesc for SubscriptionManagerService service.
  217. // It's only intended for direct use with grpc.RegisterService,
  218. // and not to be introspected or modified (even as a copy)
  219. var SubscriptionManagerService_ServiceDesc = grpc.ServiceDesc{
  220. ServiceName: "v2ray.core.app.subscription.subscriptionmanager.command.SubscriptionManagerService",
  221. HandlerType: (*SubscriptionManagerServiceServer)(nil),
  222. Methods: []grpc.MethodDesc{
  223. {
  224. MethodName: "ListTrackedSubscription",
  225. Handler: _SubscriptionManagerService_ListTrackedSubscription_Handler,
  226. },
  227. {
  228. MethodName: "AddTrackedSubscription",
  229. Handler: _SubscriptionManagerService_AddTrackedSubscription_Handler,
  230. },
  231. {
  232. MethodName: "RemoveTrackedSubscription",
  233. Handler: _SubscriptionManagerService_RemoveTrackedSubscription_Handler,
  234. },
  235. {
  236. MethodName: "GetTrackedSubscriptionStatus",
  237. Handler: _SubscriptionManagerService_GetTrackedSubscriptionStatus_Handler,
  238. },
  239. {
  240. MethodName: "UpdateTrackedSubscription",
  241. Handler: _SubscriptionManagerService_UpdateTrackedSubscription_Handler,
  242. },
  243. },
  244. Streams: []grpc.StreamDesc{},
  245. Metadata: "app/subscription/subscriptionmanager/command/command.proto",
  246. }