started_service_grpc.pb.go 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. package daemon
  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. emptypb "google.golang.org/protobuf/types/known/emptypb"
  8. )
  9. // This is a compile-time assertion to ensure that this generated file
  10. // is compatible with the grpc package it is being compiled against.
  11. // Requires gRPC-Go v1.64.0 or later.
  12. const _ = grpc.SupportPackageIsVersion9
  13. const (
  14. StartedService_StopService_FullMethodName = "/daemon.StartedService/StopService"
  15. StartedService_ReloadService_FullMethodName = "/daemon.StartedService/ReloadService"
  16. StartedService_SubscribeServiceStatus_FullMethodName = "/daemon.StartedService/SubscribeServiceStatus"
  17. StartedService_SubscribeLog_FullMethodName = "/daemon.StartedService/SubscribeLog"
  18. StartedService_GetDefaultLogLevel_FullMethodName = "/daemon.StartedService/GetDefaultLogLevel"
  19. StartedService_ClearLogs_FullMethodName = "/daemon.StartedService/ClearLogs"
  20. StartedService_SubscribeStatus_FullMethodName = "/daemon.StartedService/SubscribeStatus"
  21. StartedService_SubscribeGroups_FullMethodName = "/daemon.StartedService/SubscribeGroups"
  22. StartedService_GetClashModeStatus_FullMethodName = "/daemon.StartedService/GetClashModeStatus"
  23. StartedService_SubscribeClashMode_FullMethodName = "/daemon.StartedService/SubscribeClashMode"
  24. StartedService_SetClashMode_FullMethodName = "/daemon.StartedService/SetClashMode"
  25. StartedService_URLTest_FullMethodName = "/daemon.StartedService/URLTest"
  26. StartedService_SelectOutbound_FullMethodName = "/daemon.StartedService/SelectOutbound"
  27. StartedService_SetGroupExpand_FullMethodName = "/daemon.StartedService/SetGroupExpand"
  28. StartedService_GetSystemProxyStatus_FullMethodName = "/daemon.StartedService/GetSystemProxyStatus"
  29. StartedService_SetSystemProxyEnabled_FullMethodName = "/daemon.StartedService/SetSystemProxyEnabled"
  30. StartedService_SubscribeConnections_FullMethodName = "/daemon.StartedService/SubscribeConnections"
  31. StartedService_CloseConnection_FullMethodName = "/daemon.StartedService/CloseConnection"
  32. StartedService_CloseAllConnections_FullMethodName = "/daemon.StartedService/CloseAllConnections"
  33. StartedService_GetDeprecatedWarnings_FullMethodName = "/daemon.StartedService/GetDeprecatedWarnings"
  34. StartedService_SubscribeHelperEvents_FullMethodName = "/daemon.StartedService/SubscribeHelperEvents"
  35. StartedService_SendHelperResponse_FullMethodName = "/daemon.StartedService/SendHelperResponse"
  36. )
  37. // StartedServiceClient is the client API for StartedService service.
  38. //
  39. // 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.
  40. type StartedServiceClient interface {
  41. StopService(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
  42. ReloadService(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
  43. SubscribeServiceStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ServiceStatus], error)
  44. SubscribeLog(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Log], error)
  45. GetDefaultLogLevel(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DefaultLogLevel, error)
  46. ClearLogs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
  47. SubscribeStatus(ctx context.Context, in *SubscribeStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Status], error)
  48. SubscribeGroups(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Groups], error)
  49. GetClashModeStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClashModeStatus, error)
  50. SubscribeClashMode(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ClashMode], error)
  51. SetClashMode(ctx context.Context, in *ClashMode, opts ...grpc.CallOption) (*emptypb.Empty, error)
  52. URLTest(ctx context.Context, in *URLTestRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  53. SelectOutbound(ctx context.Context, in *SelectOutboundRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  54. SetGroupExpand(ctx context.Context, in *SetGroupExpandRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  55. GetSystemProxyStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SystemProxyStatus, error)
  56. SetSystemProxyEnabled(ctx context.Context, in *SetSystemProxyEnabledRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  57. SubscribeConnections(ctx context.Context, in *SubscribeConnectionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Connections], error)
  58. CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  59. CloseAllConnections(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
  60. GetDeprecatedWarnings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DeprecatedWarnings, error)
  61. SubscribeHelperEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[HelperRequest], error)
  62. SendHelperResponse(ctx context.Context, in *HelperResponse, opts ...grpc.CallOption) (*emptypb.Empty, error)
  63. }
  64. type startedServiceClient struct {
  65. cc grpc.ClientConnInterface
  66. }
  67. func NewStartedServiceClient(cc grpc.ClientConnInterface) StartedServiceClient {
  68. return &startedServiceClient{cc}
  69. }
  70. func (c *startedServiceClient) StopService(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  71. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  72. out := new(emptypb.Empty)
  73. err := c.cc.Invoke(ctx, StartedService_StopService_FullMethodName, in, out, cOpts...)
  74. if err != nil {
  75. return nil, err
  76. }
  77. return out, nil
  78. }
  79. func (c *startedServiceClient) ReloadService(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  80. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  81. out := new(emptypb.Empty)
  82. err := c.cc.Invoke(ctx, StartedService_ReloadService_FullMethodName, in, out, cOpts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. return out, nil
  87. }
  88. func (c *startedServiceClient) SubscribeServiceStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ServiceStatus], error) {
  89. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  90. stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[0], StartedService_SubscribeServiceStatus_FullMethodName, cOpts...)
  91. if err != nil {
  92. return nil, err
  93. }
  94. x := &grpc.GenericClientStream[emptypb.Empty, ServiceStatus]{ClientStream: stream}
  95. if err := x.ClientStream.SendMsg(in); err != nil {
  96. return nil, err
  97. }
  98. if err := x.ClientStream.CloseSend(); err != nil {
  99. return nil, err
  100. }
  101. return x, nil
  102. }
  103. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  104. type StartedService_SubscribeServiceStatusClient = grpc.ServerStreamingClient[ServiceStatus]
  105. func (c *startedServiceClient) SubscribeLog(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Log], error) {
  106. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  107. stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[1], StartedService_SubscribeLog_FullMethodName, cOpts...)
  108. if err != nil {
  109. return nil, err
  110. }
  111. x := &grpc.GenericClientStream[emptypb.Empty, Log]{ClientStream: stream}
  112. if err := x.ClientStream.SendMsg(in); err != nil {
  113. return nil, err
  114. }
  115. if err := x.ClientStream.CloseSend(); err != nil {
  116. return nil, err
  117. }
  118. return x, nil
  119. }
  120. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  121. type StartedService_SubscribeLogClient = grpc.ServerStreamingClient[Log]
  122. func (c *startedServiceClient) GetDefaultLogLevel(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DefaultLogLevel, error) {
  123. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  124. out := new(DefaultLogLevel)
  125. err := c.cc.Invoke(ctx, StartedService_GetDefaultLogLevel_FullMethodName, in, out, cOpts...)
  126. if err != nil {
  127. return nil, err
  128. }
  129. return out, nil
  130. }
  131. func (c *startedServiceClient) ClearLogs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  132. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  133. out := new(emptypb.Empty)
  134. err := c.cc.Invoke(ctx, StartedService_ClearLogs_FullMethodName, in, out, cOpts...)
  135. if err != nil {
  136. return nil, err
  137. }
  138. return out, nil
  139. }
  140. func (c *startedServiceClient) SubscribeStatus(ctx context.Context, in *SubscribeStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Status], error) {
  141. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  142. stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[2], StartedService_SubscribeStatus_FullMethodName, cOpts...)
  143. if err != nil {
  144. return nil, err
  145. }
  146. x := &grpc.GenericClientStream[SubscribeStatusRequest, Status]{ClientStream: stream}
  147. if err := x.ClientStream.SendMsg(in); err != nil {
  148. return nil, err
  149. }
  150. if err := x.ClientStream.CloseSend(); err != nil {
  151. return nil, err
  152. }
  153. return x, nil
  154. }
  155. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  156. type StartedService_SubscribeStatusClient = grpc.ServerStreamingClient[Status]
  157. func (c *startedServiceClient) SubscribeGroups(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Groups], error) {
  158. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  159. stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[3], StartedService_SubscribeGroups_FullMethodName, cOpts...)
  160. if err != nil {
  161. return nil, err
  162. }
  163. x := &grpc.GenericClientStream[emptypb.Empty, Groups]{ClientStream: stream}
  164. if err := x.ClientStream.SendMsg(in); err != nil {
  165. return nil, err
  166. }
  167. if err := x.ClientStream.CloseSend(); err != nil {
  168. return nil, err
  169. }
  170. return x, nil
  171. }
  172. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  173. type StartedService_SubscribeGroupsClient = grpc.ServerStreamingClient[Groups]
  174. func (c *startedServiceClient) GetClashModeStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClashModeStatus, error) {
  175. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  176. out := new(ClashModeStatus)
  177. err := c.cc.Invoke(ctx, StartedService_GetClashModeStatus_FullMethodName, in, out, cOpts...)
  178. if err != nil {
  179. return nil, err
  180. }
  181. return out, nil
  182. }
  183. func (c *startedServiceClient) SubscribeClashMode(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ClashMode], error) {
  184. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  185. stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[4], StartedService_SubscribeClashMode_FullMethodName, cOpts...)
  186. if err != nil {
  187. return nil, err
  188. }
  189. x := &grpc.GenericClientStream[emptypb.Empty, ClashMode]{ClientStream: stream}
  190. if err := x.ClientStream.SendMsg(in); err != nil {
  191. return nil, err
  192. }
  193. if err := x.ClientStream.CloseSend(); err != nil {
  194. return nil, err
  195. }
  196. return x, nil
  197. }
  198. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  199. type StartedService_SubscribeClashModeClient = grpc.ServerStreamingClient[ClashMode]
  200. func (c *startedServiceClient) SetClashMode(ctx context.Context, in *ClashMode, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  201. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  202. out := new(emptypb.Empty)
  203. err := c.cc.Invoke(ctx, StartedService_SetClashMode_FullMethodName, in, out, cOpts...)
  204. if err != nil {
  205. return nil, err
  206. }
  207. return out, nil
  208. }
  209. func (c *startedServiceClient) URLTest(ctx context.Context, in *URLTestRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  210. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  211. out := new(emptypb.Empty)
  212. err := c.cc.Invoke(ctx, StartedService_URLTest_FullMethodName, in, out, cOpts...)
  213. if err != nil {
  214. return nil, err
  215. }
  216. return out, nil
  217. }
  218. func (c *startedServiceClient) SelectOutbound(ctx context.Context, in *SelectOutboundRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  219. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  220. out := new(emptypb.Empty)
  221. err := c.cc.Invoke(ctx, StartedService_SelectOutbound_FullMethodName, in, out, cOpts...)
  222. if err != nil {
  223. return nil, err
  224. }
  225. return out, nil
  226. }
  227. func (c *startedServiceClient) SetGroupExpand(ctx context.Context, in *SetGroupExpandRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  228. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  229. out := new(emptypb.Empty)
  230. err := c.cc.Invoke(ctx, StartedService_SetGroupExpand_FullMethodName, in, out, cOpts...)
  231. if err != nil {
  232. return nil, err
  233. }
  234. return out, nil
  235. }
  236. func (c *startedServiceClient) GetSystemProxyStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SystemProxyStatus, error) {
  237. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  238. out := new(SystemProxyStatus)
  239. err := c.cc.Invoke(ctx, StartedService_GetSystemProxyStatus_FullMethodName, in, out, cOpts...)
  240. if err != nil {
  241. return nil, err
  242. }
  243. return out, nil
  244. }
  245. func (c *startedServiceClient) SetSystemProxyEnabled(ctx context.Context, in *SetSystemProxyEnabledRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  246. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  247. out := new(emptypb.Empty)
  248. err := c.cc.Invoke(ctx, StartedService_SetSystemProxyEnabled_FullMethodName, in, out, cOpts...)
  249. if err != nil {
  250. return nil, err
  251. }
  252. return out, nil
  253. }
  254. func (c *startedServiceClient) SubscribeConnections(ctx context.Context, in *SubscribeConnectionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Connections], error) {
  255. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  256. stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[5], StartedService_SubscribeConnections_FullMethodName, cOpts...)
  257. if err != nil {
  258. return nil, err
  259. }
  260. x := &grpc.GenericClientStream[SubscribeConnectionsRequest, Connections]{ClientStream: stream}
  261. if err := x.ClientStream.SendMsg(in); err != nil {
  262. return nil, err
  263. }
  264. if err := x.ClientStream.CloseSend(); err != nil {
  265. return nil, err
  266. }
  267. return x, nil
  268. }
  269. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  270. type StartedService_SubscribeConnectionsClient = grpc.ServerStreamingClient[Connections]
  271. func (c *startedServiceClient) CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  272. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  273. out := new(emptypb.Empty)
  274. err := c.cc.Invoke(ctx, StartedService_CloseConnection_FullMethodName, in, out, cOpts...)
  275. if err != nil {
  276. return nil, err
  277. }
  278. return out, nil
  279. }
  280. func (c *startedServiceClient) CloseAllConnections(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  281. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  282. out := new(emptypb.Empty)
  283. err := c.cc.Invoke(ctx, StartedService_CloseAllConnections_FullMethodName, in, out, cOpts...)
  284. if err != nil {
  285. return nil, err
  286. }
  287. return out, nil
  288. }
  289. func (c *startedServiceClient) GetDeprecatedWarnings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DeprecatedWarnings, error) {
  290. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  291. out := new(DeprecatedWarnings)
  292. err := c.cc.Invoke(ctx, StartedService_GetDeprecatedWarnings_FullMethodName, in, out, cOpts...)
  293. if err != nil {
  294. return nil, err
  295. }
  296. return out, nil
  297. }
  298. func (c *startedServiceClient) SubscribeHelperEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[HelperRequest], error) {
  299. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  300. stream, err := c.cc.NewStream(ctx, &StartedService_ServiceDesc.Streams[6], StartedService_SubscribeHelperEvents_FullMethodName, cOpts...)
  301. if err != nil {
  302. return nil, err
  303. }
  304. x := &grpc.GenericClientStream[emptypb.Empty, HelperRequest]{ClientStream: stream}
  305. if err := x.ClientStream.SendMsg(in); err != nil {
  306. return nil, err
  307. }
  308. if err := x.ClientStream.CloseSend(); err != nil {
  309. return nil, err
  310. }
  311. return x, nil
  312. }
  313. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  314. type StartedService_SubscribeHelperEventsClient = grpc.ServerStreamingClient[HelperRequest]
  315. func (c *startedServiceClient) SendHelperResponse(ctx context.Context, in *HelperResponse, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  316. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  317. out := new(emptypb.Empty)
  318. err := c.cc.Invoke(ctx, StartedService_SendHelperResponse_FullMethodName, in, out, cOpts...)
  319. if err != nil {
  320. return nil, err
  321. }
  322. return out, nil
  323. }
  324. // StartedServiceServer is the server API for StartedService service.
  325. // All implementations must embed UnimplementedStartedServiceServer
  326. // for forward compatibility.
  327. type StartedServiceServer interface {
  328. StopService(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
  329. ReloadService(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
  330. SubscribeServiceStatus(*emptypb.Empty, grpc.ServerStreamingServer[ServiceStatus]) error
  331. SubscribeLog(*emptypb.Empty, grpc.ServerStreamingServer[Log]) error
  332. GetDefaultLogLevel(context.Context, *emptypb.Empty) (*DefaultLogLevel, error)
  333. ClearLogs(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
  334. SubscribeStatus(*SubscribeStatusRequest, grpc.ServerStreamingServer[Status]) error
  335. SubscribeGroups(*emptypb.Empty, grpc.ServerStreamingServer[Groups]) error
  336. GetClashModeStatus(context.Context, *emptypb.Empty) (*ClashModeStatus, error)
  337. SubscribeClashMode(*emptypb.Empty, grpc.ServerStreamingServer[ClashMode]) error
  338. SetClashMode(context.Context, *ClashMode) (*emptypb.Empty, error)
  339. URLTest(context.Context, *URLTestRequest) (*emptypb.Empty, error)
  340. SelectOutbound(context.Context, *SelectOutboundRequest) (*emptypb.Empty, error)
  341. SetGroupExpand(context.Context, *SetGroupExpandRequest) (*emptypb.Empty, error)
  342. GetSystemProxyStatus(context.Context, *emptypb.Empty) (*SystemProxyStatus, error)
  343. SetSystemProxyEnabled(context.Context, *SetSystemProxyEnabledRequest) (*emptypb.Empty, error)
  344. SubscribeConnections(*SubscribeConnectionsRequest, grpc.ServerStreamingServer[Connections]) error
  345. CloseConnection(context.Context, *CloseConnectionRequest) (*emptypb.Empty, error)
  346. CloseAllConnections(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
  347. GetDeprecatedWarnings(context.Context, *emptypb.Empty) (*DeprecatedWarnings, error)
  348. SubscribeHelperEvents(*emptypb.Empty, grpc.ServerStreamingServer[HelperRequest]) error
  349. SendHelperResponse(context.Context, *HelperResponse) (*emptypb.Empty, error)
  350. mustEmbedUnimplementedStartedServiceServer()
  351. }
  352. // UnimplementedStartedServiceServer must be embedded to have
  353. // forward compatible implementations.
  354. //
  355. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  356. // pointer dereference when methods are called.
  357. type UnimplementedStartedServiceServer struct{}
  358. func (UnimplementedStartedServiceServer) StopService(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
  359. return nil, status.Errorf(codes.Unimplemented, "method StopService not implemented")
  360. }
  361. func (UnimplementedStartedServiceServer) ReloadService(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
  362. return nil, status.Errorf(codes.Unimplemented, "method ReloadService not implemented")
  363. }
  364. func (UnimplementedStartedServiceServer) SubscribeServiceStatus(*emptypb.Empty, grpc.ServerStreamingServer[ServiceStatus]) error {
  365. return status.Errorf(codes.Unimplemented, "method SubscribeServiceStatus not implemented")
  366. }
  367. func (UnimplementedStartedServiceServer) SubscribeLog(*emptypb.Empty, grpc.ServerStreamingServer[Log]) error {
  368. return status.Errorf(codes.Unimplemented, "method SubscribeLog not implemented")
  369. }
  370. func (UnimplementedStartedServiceServer) GetDefaultLogLevel(context.Context, *emptypb.Empty) (*DefaultLogLevel, error) {
  371. return nil, status.Errorf(codes.Unimplemented, "method GetDefaultLogLevel not implemented")
  372. }
  373. func (UnimplementedStartedServiceServer) ClearLogs(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
  374. return nil, status.Errorf(codes.Unimplemented, "method ClearLogs not implemented")
  375. }
  376. func (UnimplementedStartedServiceServer) SubscribeStatus(*SubscribeStatusRequest, grpc.ServerStreamingServer[Status]) error {
  377. return status.Errorf(codes.Unimplemented, "method SubscribeStatus not implemented")
  378. }
  379. func (UnimplementedStartedServiceServer) SubscribeGroups(*emptypb.Empty, grpc.ServerStreamingServer[Groups]) error {
  380. return status.Errorf(codes.Unimplemented, "method SubscribeGroups not implemented")
  381. }
  382. func (UnimplementedStartedServiceServer) GetClashModeStatus(context.Context, *emptypb.Empty) (*ClashModeStatus, error) {
  383. return nil, status.Errorf(codes.Unimplemented, "method GetClashModeStatus not implemented")
  384. }
  385. func (UnimplementedStartedServiceServer) SubscribeClashMode(*emptypb.Empty, grpc.ServerStreamingServer[ClashMode]) error {
  386. return status.Errorf(codes.Unimplemented, "method SubscribeClashMode not implemented")
  387. }
  388. func (UnimplementedStartedServiceServer) SetClashMode(context.Context, *ClashMode) (*emptypb.Empty, error) {
  389. return nil, status.Errorf(codes.Unimplemented, "method SetClashMode not implemented")
  390. }
  391. func (UnimplementedStartedServiceServer) URLTest(context.Context, *URLTestRequest) (*emptypb.Empty, error) {
  392. return nil, status.Errorf(codes.Unimplemented, "method URLTest not implemented")
  393. }
  394. func (UnimplementedStartedServiceServer) SelectOutbound(context.Context, *SelectOutboundRequest) (*emptypb.Empty, error) {
  395. return nil, status.Errorf(codes.Unimplemented, "method SelectOutbound not implemented")
  396. }
  397. func (UnimplementedStartedServiceServer) SetGroupExpand(context.Context, *SetGroupExpandRequest) (*emptypb.Empty, error) {
  398. return nil, status.Errorf(codes.Unimplemented, "method SetGroupExpand not implemented")
  399. }
  400. func (UnimplementedStartedServiceServer) GetSystemProxyStatus(context.Context, *emptypb.Empty) (*SystemProxyStatus, error) {
  401. return nil, status.Errorf(codes.Unimplemented, "method GetSystemProxyStatus not implemented")
  402. }
  403. func (UnimplementedStartedServiceServer) SetSystemProxyEnabled(context.Context, *SetSystemProxyEnabledRequest) (*emptypb.Empty, error) {
  404. return nil, status.Errorf(codes.Unimplemented, "method SetSystemProxyEnabled not implemented")
  405. }
  406. func (UnimplementedStartedServiceServer) SubscribeConnections(*SubscribeConnectionsRequest, grpc.ServerStreamingServer[Connections]) error {
  407. return status.Errorf(codes.Unimplemented, "method SubscribeConnections not implemented")
  408. }
  409. func (UnimplementedStartedServiceServer) CloseConnection(context.Context, *CloseConnectionRequest) (*emptypb.Empty, error) {
  410. return nil, status.Errorf(codes.Unimplemented, "method CloseConnection not implemented")
  411. }
  412. func (UnimplementedStartedServiceServer) CloseAllConnections(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
  413. return nil, status.Errorf(codes.Unimplemented, "method CloseAllConnections not implemented")
  414. }
  415. func (UnimplementedStartedServiceServer) GetDeprecatedWarnings(context.Context, *emptypb.Empty) (*DeprecatedWarnings, error) {
  416. return nil, status.Errorf(codes.Unimplemented, "method GetDeprecatedWarnings not implemented")
  417. }
  418. func (UnimplementedStartedServiceServer) SubscribeHelperEvents(*emptypb.Empty, grpc.ServerStreamingServer[HelperRequest]) error {
  419. return status.Errorf(codes.Unimplemented, "method SubscribeHelperEvents not implemented")
  420. }
  421. func (UnimplementedStartedServiceServer) SendHelperResponse(context.Context, *HelperResponse) (*emptypb.Empty, error) {
  422. return nil, status.Errorf(codes.Unimplemented, "method SendHelperResponse not implemented")
  423. }
  424. func (UnimplementedStartedServiceServer) mustEmbedUnimplementedStartedServiceServer() {}
  425. func (UnimplementedStartedServiceServer) testEmbeddedByValue() {}
  426. // UnsafeStartedServiceServer may be embedded to opt out of forward compatibility for this service.
  427. // Use of this interface is not recommended, as added methods to StartedServiceServer will
  428. // result in compilation errors.
  429. type UnsafeStartedServiceServer interface {
  430. mustEmbedUnimplementedStartedServiceServer()
  431. }
  432. func RegisterStartedServiceServer(s grpc.ServiceRegistrar, srv StartedServiceServer) {
  433. // If the following call pancis, it indicates UnimplementedStartedServiceServer was
  434. // embedded by pointer and is nil. This will cause panics if an
  435. // unimplemented method is ever invoked, so we test this at initialization
  436. // time to prevent it from happening at runtime later due to I/O.
  437. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  438. t.testEmbeddedByValue()
  439. }
  440. s.RegisterService(&StartedService_ServiceDesc, srv)
  441. }
  442. func _StartedService_StopService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  443. in := new(emptypb.Empty)
  444. if err := dec(in); err != nil {
  445. return nil, err
  446. }
  447. if interceptor == nil {
  448. return srv.(StartedServiceServer).StopService(ctx, in)
  449. }
  450. info := &grpc.UnaryServerInfo{
  451. Server: srv,
  452. FullMethod: StartedService_StopService_FullMethodName,
  453. }
  454. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  455. return srv.(StartedServiceServer).StopService(ctx, req.(*emptypb.Empty))
  456. }
  457. return interceptor(ctx, in, info, handler)
  458. }
  459. func _StartedService_ReloadService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  460. in := new(emptypb.Empty)
  461. if err := dec(in); err != nil {
  462. return nil, err
  463. }
  464. if interceptor == nil {
  465. return srv.(StartedServiceServer).ReloadService(ctx, in)
  466. }
  467. info := &grpc.UnaryServerInfo{
  468. Server: srv,
  469. FullMethod: StartedService_ReloadService_FullMethodName,
  470. }
  471. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  472. return srv.(StartedServiceServer).ReloadService(ctx, req.(*emptypb.Empty))
  473. }
  474. return interceptor(ctx, in, info, handler)
  475. }
  476. func _StartedService_SubscribeServiceStatus_Handler(srv interface{}, stream grpc.ServerStream) error {
  477. m := new(emptypb.Empty)
  478. if err := stream.RecvMsg(m); err != nil {
  479. return err
  480. }
  481. return srv.(StartedServiceServer).SubscribeServiceStatus(m, &grpc.GenericServerStream[emptypb.Empty, ServiceStatus]{ServerStream: stream})
  482. }
  483. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  484. type StartedService_SubscribeServiceStatusServer = grpc.ServerStreamingServer[ServiceStatus]
  485. func _StartedService_SubscribeLog_Handler(srv interface{}, stream grpc.ServerStream) error {
  486. m := new(emptypb.Empty)
  487. if err := stream.RecvMsg(m); err != nil {
  488. return err
  489. }
  490. return srv.(StartedServiceServer).SubscribeLog(m, &grpc.GenericServerStream[emptypb.Empty, Log]{ServerStream: stream})
  491. }
  492. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  493. type StartedService_SubscribeLogServer = grpc.ServerStreamingServer[Log]
  494. func _StartedService_GetDefaultLogLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  495. in := new(emptypb.Empty)
  496. if err := dec(in); err != nil {
  497. return nil, err
  498. }
  499. if interceptor == nil {
  500. return srv.(StartedServiceServer).GetDefaultLogLevel(ctx, in)
  501. }
  502. info := &grpc.UnaryServerInfo{
  503. Server: srv,
  504. FullMethod: StartedService_GetDefaultLogLevel_FullMethodName,
  505. }
  506. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  507. return srv.(StartedServiceServer).GetDefaultLogLevel(ctx, req.(*emptypb.Empty))
  508. }
  509. return interceptor(ctx, in, info, handler)
  510. }
  511. func _StartedService_ClearLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  512. in := new(emptypb.Empty)
  513. if err := dec(in); err != nil {
  514. return nil, err
  515. }
  516. if interceptor == nil {
  517. return srv.(StartedServiceServer).ClearLogs(ctx, in)
  518. }
  519. info := &grpc.UnaryServerInfo{
  520. Server: srv,
  521. FullMethod: StartedService_ClearLogs_FullMethodName,
  522. }
  523. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  524. return srv.(StartedServiceServer).ClearLogs(ctx, req.(*emptypb.Empty))
  525. }
  526. return interceptor(ctx, in, info, handler)
  527. }
  528. func _StartedService_SubscribeStatus_Handler(srv interface{}, stream grpc.ServerStream) error {
  529. m := new(SubscribeStatusRequest)
  530. if err := stream.RecvMsg(m); err != nil {
  531. return err
  532. }
  533. return srv.(StartedServiceServer).SubscribeStatus(m, &grpc.GenericServerStream[SubscribeStatusRequest, Status]{ServerStream: stream})
  534. }
  535. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  536. type StartedService_SubscribeStatusServer = grpc.ServerStreamingServer[Status]
  537. func _StartedService_SubscribeGroups_Handler(srv interface{}, stream grpc.ServerStream) error {
  538. m := new(emptypb.Empty)
  539. if err := stream.RecvMsg(m); err != nil {
  540. return err
  541. }
  542. return srv.(StartedServiceServer).SubscribeGroups(m, &grpc.GenericServerStream[emptypb.Empty, Groups]{ServerStream: stream})
  543. }
  544. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  545. type StartedService_SubscribeGroupsServer = grpc.ServerStreamingServer[Groups]
  546. func _StartedService_GetClashModeStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  547. in := new(emptypb.Empty)
  548. if err := dec(in); err != nil {
  549. return nil, err
  550. }
  551. if interceptor == nil {
  552. return srv.(StartedServiceServer).GetClashModeStatus(ctx, in)
  553. }
  554. info := &grpc.UnaryServerInfo{
  555. Server: srv,
  556. FullMethod: StartedService_GetClashModeStatus_FullMethodName,
  557. }
  558. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  559. return srv.(StartedServiceServer).GetClashModeStatus(ctx, req.(*emptypb.Empty))
  560. }
  561. return interceptor(ctx, in, info, handler)
  562. }
  563. func _StartedService_SubscribeClashMode_Handler(srv interface{}, stream grpc.ServerStream) error {
  564. m := new(emptypb.Empty)
  565. if err := stream.RecvMsg(m); err != nil {
  566. return err
  567. }
  568. return srv.(StartedServiceServer).SubscribeClashMode(m, &grpc.GenericServerStream[emptypb.Empty, ClashMode]{ServerStream: stream})
  569. }
  570. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  571. type StartedService_SubscribeClashModeServer = grpc.ServerStreamingServer[ClashMode]
  572. func _StartedService_SetClashMode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  573. in := new(ClashMode)
  574. if err := dec(in); err != nil {
  575. return nil, err
  576. }
  577. if interceptor == nil {
  578. return srv.(StartedServiceServer).SetClashMode(ctx, in)
  579. }
  580. info := &grpc.UnaryServerInfo{
  581. Server: srv,
  582. FullMethod: StartedService_SetClashMode_FullMethodName,
  583. }
  584. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  585. return srv.(StartedServiceServer).SetClashMode(ctx, req.(*ClashMode))
  586. }
  587. return interceptor(ctx, in, info, handler)
  588. }
  589. func _StartedService_URLTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  590. in := new(URLTestRequest)
  591. if err := dec(in); err != nil {
  592. return nil, err
  593. }
  594. if interceptor == nil {
  595. return srv.(StartedServiceServer).URLTest(ctx, in)
  596. }
  597. info := &grpc.UnaryServerInfo{
  598. Server: srv,
  599. FullMethod: StartedService_URLTest_FullMethodName,
  600. }
  601. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  602. return srv.(StartedServiceServer).URLTest(ctx, req.(*URLTestRequest))
  603. }
  604. return interceptor(ctx, in, info, handler)
  605. }
  606. func _StartedService_SelectOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  607. in := new(SelectOutboundRequest)
  608. if err := dec(in); err != nil {
  609. return nil, err
  610. }
  611. if interceptor == nil {
  612. return srv.(StartedServiceServer).SelectOutbound(ctx, in)
  613. }
  614. info := &grpc.UnaryServerInfo{
  615. Server: srv,
  616. FullMethod: StartedService_SelectOutbound_FullMethodName,
  617. }
  618. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  619. return srv.(StartedServiceServer).SelectOutbound(ctx, req.(*SelectOutboundRequest))
  620. }
  621. return interceptor(ctx, in, info, handler)
  622. }
  623. func _StartedService_SetGroupExpand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  624. in := new(SetGroupExpandRequest)
  625. if err := dec(in); err != nil {
  626. return nil, err
  627. }
  628. if interceptor == nil {
  629. return srv.(StartedServiceServer).SetGroupExpand(ctx, in)
  630. }
  631. info := &grpc.UnaryServerInfo{
  632. Server: srv,
  633. FullMethod: StartedService_SetGroupExpand_FullMethodName,
  634. }
  635. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  636. return srv.(StartedServiceServer).SetGroupExpand(ctx, req.(*SetGroupExpandRequest))
  637. }
  638. return interceptor(ctx, in, info, handler)
  639. }
  640. func _StartedService_GetSystemProxyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  641. in := new(emptypb.Empty)
  642. if err := dec(in); err != nil {
  643. return nil, err
  644. }
  645. if interceptor == nil {
  646. return srv.(StartedServiceServer).GetSystemProxyStatus(ctx, in)
  647. }
  648. info := &grpc.UnaryServerInfo{
  649. Server: srv,
  650. FullMethod: StartedService_GetSystemProxyStatus_FullMethodName,
  651. }
  652. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  653. return srv.(StartedServiceServer).GetSystemProxyStatus(ctx, req.(*emptypb.Empty))
  654. }
  655. return interceptor(ctx, in, info, handler)
  656. }
  657. func _StartedService_SetSystemProxyEnabled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  658. in := new(SetSystemProxyEnabledRequest)
  659. if err := dec(in); err != nil {
  660. return nil, err
  661. }
  662. if interceptor == nil {
  663. return srv.(StartedServiceServer).SetSystemProxyEnabled(ctx, in)
  664. }
  665. info := &grpc.UnaryServerInfo{
  666. Server: srv,
  667. FullMethod: StartedService_SetSystemProxyEnabled_FullMethodName,
  668. }
  669. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  670. return srv.(StartedServiceServer).SetSystemProxyEnabled(ctx, req.(*SetSystemProxyEnabledRequest))
  671. }
  672. return interceptor(ctx, in, info, handler)
  673. }
  674. func _StartedService_SubscribeConnections_Handler(srv interface{}, stream grpc.ServerStream) error {
  675. m := new(SubscribeConnectionsRequest)
  676. if err := stream.RecvMsg(m); err != nil {
  677. return err
  678. }
  679. return srv.(StartedServiceServer).SubscribeConnections(m, &grpc.GenericServerStream[SubscribeConnectionsRequest, Connections]{ServerStream: stream})
  680. }
  681. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  682. type StartedService_SubscribeConnectionsServer = grpc.ServerStreamingServer[Connections]
  683. func _StartedService_CloseConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  684. in := new(CloseConnectionRequest)
  685. if err := dec(in); err != nil {
  686. return nil, err
  687. }
  688. if interceptor == nil {
  689. return srv.(StartedServiceServer).CloseConnection(ctx, in)
  690. }
  691. info := &grpc.UnaryServerInfo{
  692. Server: srv,
  693. FullMethod: StartedService_CloseConnection_FullMethodName,
  694. }
  695. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  696. return srv.(StartedServiceServer).CloseConnection(ctx, req.(*CloseConnectionRequest))
  697. }
  698. return interceptor(ctx, in, info, handler)
  699. }
  700. func _StartedService_CloseAllConnections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  701. in := new(emptypb.Empty)
  702. if err := dec(in); err != nil {
  703. return nil, err
  704. }
  705. if interceptor == nil {
  706. return srv.(StartedServiceServer).CloseAllConnections(ctx, in)
  707. }
  708. info := &grpc.UnaryServerInfo{
  709. Server: srv,
  710. FullMethod: StartedService_CloseAllConnections_FullMethodName,
  711. }
  712. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  713. return srv.(StartedServiceServer).CloseAllConnections(ctx, req.(*emptypb.Empty))
  714. }
  715. return interceptor(ctx, in, info, handler)
  716. }
  717. func _StartedService_GetDeprecatedWarnings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  718. in := new(emptypb.Empty)
  719. if err := dec(in); err != nil {
  720. return nil, err
  721. }
  722. if interceptor == nil {
  723. return srv.(StartedServiceServer).GetDeprecatedWarnings(ctx, in)
  724. }
  725. info := &grpc.UnaryServerInfo{
  726. Server: srv,
  727. FullMethod: StartedService_GetDeprecatedWarnings_FullMethodName,
  728. }
  729. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  730. return srv.(StartedServiceServer).GetDeprecatedWarnings(ctx, req.(*emptypb.Empty))
  731. }
  732. return interceptor(ctx, in, info, handler)
  733. }
  734. func _StartedService_SubscribeHelperEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
  735. m := new(emptypb.Empty)
  736. if err := stream.RecvMsg(m); err != nil {
  737. return err
  738. }
  739. return srv.(StartedServiceServer).SubscribeHelperEvents(m, &grpc.GenericServerStream[emptypb.Empty, HelperRequest]{ServerStream: stream})
  740. }
  741. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  742. type StartedService_SubscribeHelperEventsServer = grpc.ServerStreamingServer[HelperRequest]
  743. func _StartedService_SendHelperResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  744. in := new(HelperResponse)
  745. if err := dec(in); err != nil {
  746. return nil, err
  747. }
  748. if interceptor == nil {
  749. return srv.(StartedServiceServer).SendHelperResponse(ctx, in)
  750. }
  751. info := &grpc.UnaryServerInfo{
  752. Server: srv,
  753. FullMethod: StartedService_SendHelperResponse_FullMethodName,
  754. }
  755. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  756. return srv.(StartedServiceServer).SendHelperResponse(ctx, req.(*HelperResponse))
  757. }
  758. return interceptor(ctx, in, info, handler)
  759. }
  760. // StartedService_ServiceDesc is the grpc.ServiceDesc for StartedService service.
  761. // It's only intended for direct use with grpc.RegisterService,
  762. // and not to be introspected or modified (even as a copy)
  763. var StartedService_ServiceDesc = grpc.ServiceDesc{
  764. ServiceName: "daemon.StartedService",
  765. HandlerType: (*StartedServiceServer)(nil),
  766. Methods: []grpc.MethodDesc{
  767. {
  768. MethodName: "StopService",
  769. Handler: _StartedService_StopService_Handler,
  770. },
  771. {
  772. MethodName: "ReloadService",
  773. Handler: _StartedService_ReloadService_Handler,
  774. },
  775. {
  776. MethodName: "GetDefaultLogLevel",
  777. Handler: _StartedService_GetDefaultLogLevel_Handler,
  778. },
  779. {
  780. MethodName: "ClearLogs",
  781. Handler: _StartedService_ClearLogs_Handler,
  782. },
  783. {
  784. MethodName: "GetClashModeStatus",
  785. Handler: _StartedService_GetClashModeStatus_Handler,
  786. },
  787. {
  788. MethodName: "SetClashMode",
  789. Handler: _StartedService_SetClashMode_Handler,
  790. },
  791. {
  792. MethodName: "URLTest",
  793. Handler: _StartedService_URLTest_Handler,
  794. },
  795. {
  796. MethodName: "SelectOutbound",
  797. Handler: _StartedService_SelectOutbound_Handler,
  798. },
  799. {
  800. MethodName: "SetGroupExpand",
  801. Handler: _StartedService_SetGroupExpand_Handler,
  802. },
  803. {
  804. MethodName: "GetSystemProxyStatus",
  805. Handler: _StartedService_GetSystemProxyStatus_Handler,
  806. },
  807. {
  808. MethodName: "SetSystemProxyEnabled",
  809. Handler: _StartedService_SetSystemProxyEnabled_Handler,
  810. },
  811. {
  812. MethodName: "CloseConnection",
  813. Handler: _StartedService_CloseConnection_Handler,
  814. },
  815. {
  816. MethodName: "CloseAllConnections",
  817. Handler: _StartedService_CloseAllConnections_Handler,
  818. },
  819. {
  820. MethodName: "GetDeprecatedWarnings",
  821. Handler: _StartedService_GetDeprecatedWarnings_Handler,
  822. },
  823. {
  824. MethodName: "SendHelperResponse",
  825. Handler: _StartedService_SendHelperResponse_Handler,
  826. },
  827. },
  828. Streams: []grpc.StreamDesc{
  829. {
  830. StreamName: "SubscribeServiceStatus",
  831. Handler: _StartedService_SubscribeServiceStatus_Handler,
  832. ServerStreams: true,
  833. },
  834. {
  835. StreamName: "SubscribeLog",
  836. Handler: _StartedService_SubscribeLog_Handler,
  837. ServerStreams: true,
  838. },
  839. {
  840. StreamName: "SubscribeStatus",
  841. Handler: _StartedService_SubscribeStatus_Handler,
  842. ServerStreams: true,
  843. },
  844. {
  845. StreamName: "SubscribeGroups",
  846. Handler: _StartedService_SubscribeGroups_Handler,
  847. ServerStreams: true,
  848. },
  849. {
  850. StreamName: "SubscribeClashMode",
  851. Handler: _StartedService_SubscribeClashMode_Handler,
  852. ServerStreams: true,
  853. },
  854. {
  855. StreamName: "SubscribeConnections",
  856. Handler: _StartedService_SubscribeConnections_Handler,
  857. ServerStreams: true,
  858. },
  859. {
  860. StreamName: "SubscribeHelperEvents",
  861. Handler: _StartedService_SubscribeHelperEvents_Handler,
  862. ServerStreams: true,
  863. },
  864. },
  865. Metadata: "daemon/started_service.proto",
  866. }