started_service_grpc.pb.go 43 KB

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