auth_service.pb.gw.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
  2. // source: api/v1/auth_service.proto
  3. /*
  4. Package apiv1 is a reverse proxy.
  5. It translates gRPC into RESTful JSON APIs.
  6. */
  7. package apiv1
  8. import (
  9. "context"
  10. "errors"
  11. "io"
  12. "net/http"
  13. "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
  14. "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
  15. "google.golang.org/grpc"
  16. "google.golang.org/grpc/codes"
  17. "google.golang.org/grpc/grpclog"
  18. "google.golang.org/grpc/metadata"
  19. "google.golang.org/grpc/status"
  20. "google.golang.org/protobuf/proto"
  21. )
  22. // Suppress "imported and not used" errors
  23. var (
  24. _ codes.Code
  25. _ io.Reader
  26. _ status.Status
  27. _ = errors.New
  28. _ = runtime.String
  29. _ = utilities.NewDoubleArray
  30. _ = metadata.Join
  31. )
  32. func request_AuthService_GetAuthStatus_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  33. var (
  34. protoReq GetAuthStatusRequest
  35. metadata runtime.ServerMetadata
  36. )
  37. msg, err := client.GetAuthStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
  38. return msg, metadata, err
  39. }
  40. func local_request_AuthService_GetAuthStatus_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  41. var (
  42. protoReq GetAuthStatusRequest
  43. metadata runtime.ServerMetadata
  44. )
  45. msg, err := server.GetAuthStatus(ctx, &protoReq)
  46. return msg, metadata, err
  47. }
  48. var filter_AuthService_SignIn_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
  49. func request_AuthService_SignIn_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  50. var (
  51. protoReq SignInRequest
  52. metadata runtime.ServerMetadata
  53. )
  54. if err := req.ParseForm(); err != nil {
  55. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  56. }
  57. if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_SignIn_0); err != nil {
  58. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  59. }
  60. msg, err := client.SignIn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
  61. return msg, metadata, err
  62. }
  63. func local_request_AuthService_SignIn_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  64. var (
  65. protoReq SignInRequest
  66. metadata runtime.ServerMetadata
  67. )
  68. if err := req.ParseForm(); err != nil {
  69. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  70. }
  71. if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_SignIn_0); err != nil {
  72. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  73. }
  74. msg, err := server.SignIn(ctx, &protoReq)
  75. return msg, metadata, err
  76. }
  77. var filter_AuthService_SignInWithSSO_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
  78. func request_AuthService_SignInWithSSO_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  79. var (
  80. protoReq SignInWithSSORequest
  81. metadata runtime.ServerMetadata
  82. )
  83. if err := req.ParseForm(); err != nil {
  84. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  85. }
  86. if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_SignInWithSSO_0); err != nil {
  87. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  88. }
  89. msg, err := client.SignInWithSSO(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
  90. return msg, metadata, err
  91. }
  92. func local_request_AuthService_SignInWithSSO_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  93. var (
  94. protoReq SignInWithSSORequest
  95. metadata runtime.ServerMetadata
  96. )
  97. if err := req.ParseForm(); err != nil {
  98. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  99. }
  100. if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_SignInWithSSO_0); err != nil {
  101. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  102. }
  103. msg, err := server.SignInWithSSO(ctx, &protoReq)
  104. return msg, metadata, err
  105. }
  106. var filter_AuthService_SignUp_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
  107. func request_AuthService_SignUp_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  108. var (
  109. protoReq SignUpRequest
  110. metadata runtime.ServerMetadata
  111. )
  112. if err := req.ParseForm(); err != nil {
  113. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  114. }
  115. if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_SignUp_0); err != nil {
  116. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  117. }
  118. msg, err := client.SignUp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
  119. return msg, metadata, err
  120. }
  121. func local_request_AuthService_SignUp_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  122. var (
  123. protoReq SignUpRequest
  124. metadata runtime.ServerMetadata
  125. )
  126. if err := req.ParseForm(); err != nil {
  127. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  128. }
  129. if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_SignUp_0); err != nil {
  130. return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
  131. }
  132. msg, err := server.SignUp(ctx, &protoReq)
  133. return msg, metadata, err
  134. }
  135. func request_AuthService_SignOut_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  136. var (
  137. protoReq SignOutRequest
  138. metadata runtime.ServerMetadata
  139. )
  140. msg, err := client.SignOut(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
  141. return msg, metadata, err
  142. }
  143. func local_request_AuthService_SignOut_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
  144. var (
  145. protoReq SignOutRequest
  146. metadata runtime.ServerMetadata
  147. )
  148. msg, err := server.SignOut(ctx, &protoReq)
  149. return msg, metadata, err
  150. }
  151. // RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux".
  152. // UnaryRPC :call AuthServiceServer directly.
  153. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
  154. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.
  155. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
  156. func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error {
  157. mux.Handle(http.MethodPost, pattern_AuthService_GetAuthStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  158. ctx, cancel := context.WithCancel(req.Context())
  159. defer cancel()
  160. var stream runtime.ServerTransportStream
  161. ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
  162. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  163. annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/GetAuthStatus", runtime.WithHTTPPathPattern("/api/v1/auth/status"))
  164. if err != nil {
  165. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  166. return
  167. }
  168. resp, md, err := local_request_AuthService_GetAuthStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams)
  169. md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
  170. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  171. if err != nil {
  172. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  173. return
  174. }
  175. forward_AuthService_GetAuthStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  176. })
  177. mux.Handle(http.MethodPost, pattern_AuthService_SignIn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  178. ctx, cancel := context.WithCancel(req.Context())
  179. defer cancel()
  180. var stream runtime.ServerTransportStream
  181. ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
  182. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  183. annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignIn", runtime.WithHTTPPathPattern("/api/v1/auth/signin"))
  184. if err != nil {
  185. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  186. return
  187. }
  188. resp, md, err := local_request_AuthService_SignIn_0(annotatedContext, inboundMarshaler, server, req, pathParams)
  189. md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
  190. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  191. if err != nil {
  192. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  193. return
  194. }
  195. forward_AuthService_SignIn_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  196. })
  197. mux.Handle(http.MethodPost, pattern_AuthService_SignInWithSSO_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  198. ctx, cancel := context.WithCancel(req.Context())
  199. defer cancel()
  200. var stream runtime.ServerTransportStream
  201. ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
  202. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  203. annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignInWithSSO", runtime.WithHTTPPathPattern("/api/v1/auth/signin/sso"))
  204. if err != nil {
  205. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  206. return
  207. }
  208. resp, md, err := local_request_AuthService_SignInWithSSO_0(annotatedContext, inboundMarshaler, server, req, pathParams)
  209. md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
  210. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  211. if err != nil {
  212. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  213. return
  214. }
  215. forward_AuthService_SignInWithSSO_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  216. })
  217. mux.Handle(http.MethodPost, pattern_AuthService_SignUp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  218. ctx, cancel := context.WithCancel(req.Context())
  219. defer cancel()
  220. var stream runtime.ServerTransportStream
  221. ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
  222. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  223. annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignUp", runtime.WithHTTPPathPattern("/api/v1/auth/signup"))
  224. if err != nil {
  225. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  226. return
  227. }
  228. resp, md, err := local_request_AuthService_SignUp_0(annotatedContext, inboundMarshaler, server, req, pathParams)
  229. md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
  230. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  231. if err != nil {
  232. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  233. return
  234. }
  235. forward_AuthService_SignUp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  236. })
  237. mux.Handle(http.MethodPost, pattern_AuthService_SignOut_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  238. ctx, cancel := context.WithCancel(req.Context())
  239. defer cancel()
  240. var stream runtime.ServerTransportStream
  241. ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
  242. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  243. annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.AuthService/SignOut", runtime.WithHTTPPathPattern("/api/v1/auth/signout"))
  244. if err != nil {
  245. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  246. return
  247. }
  248. resp, md, err := local_request_AuthService_SignOut_0(annotatedContext, inboundMarshaler, server, req, pathParams)
  249. md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
  250. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  251. if err != nil {
  252. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  253. return
  254. }
  255. forward_AuthService_SignOut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  256. })
  257. return nil
  258. }
  259. // RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but
  260. // automatically dials to "endpoint" and closes the connection when "ctx" gets done.
  261. func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
  262. conn, err := grpc.NewClient(endpoint, opts...)
  263. if err != nil {
  264. return err
  265. }
  266. defer func() {
  267. if err != nil {
  268. if cerr := conn.Close(); cerr != nil {
  269. grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
  270. }
  271. return
  272. }
  273. go func() {
  274. <-ctx.Done()
  275. if cerr := conn.Close(); cerr != nil {
  276. grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
  277. }
  278. }()
  279. }()
  280. return RegisterAuthServiceHandler(ctx, mux, conn)
  281. }
  282. // RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux".
  283. // The handlers forward requests to the grpc endpoint over "conn".
  284. func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
  285. return RegisterAuthServiceHandlerClient(ctx, mux, NewAuthServiceClient(conn))
  286. }
  287. // RegisterAuthServiceHandlerClient registers the http handlers for service AuthService
  288. // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient".
  289. // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient"
  290. // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
  291. // "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
  292. func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error {
  293. mux.Handle(http.MethodPost, pattern_AuthService_GetAuthStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  294. ctx, cancel := context.WithCancel(req.Context())
  295. defer cancel()
  296. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  297. annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/GetAuthStatus", runtime.WithHTTPPathPattern("/api/v1/auth/status"))
  298. if err != nil {
  299. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  300. return
  301. }
  302. resp, md, err := request_AuthService_GetAuthStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams)
  303. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  304. if err != nil {
  305. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  306. return
  307. }
  308. forward_AuthService_GetAuthStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  309. })
  310. mux.Handle(http.MethodPost, pattern_AuthService_SignIn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  311. ctx, cancel := context.WithCancel(req.Context())
  312. defer cancel()
  313. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  314. annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignIn", runtime.WithHTTPPathPattern("/api/v1/auth/signin"))
  315. if err != nil {
  316. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  317. return
  318. }
  319. resp, md, err := request_AuthService_SignIn_0(annotatedContext, inboundMarshaler, client, req, pathParams)
  320. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  321. if err != nil {
  322. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  323. return
  324. }
  325. forward_AuthService_SignIn_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  326. })
  327. mux.Handle(http.MethodPost, pattern_AuthService_SignInWithSSO_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  328. ctx, cancel := context.WithCancel(req.Context())
  329. defer cancel()
  330. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  331. annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignInWithSSO", runtime.WithHTTPPathPattern("/api/v1/auth/signin/sso"))
  332. if err != nil {
  333. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  334. return
  335. }
  336. resp, md, err := request_AuthService_SignInWithSSO_0(annotatedContext, inboundMarshaler, client, req, pathParams)
  337. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  338. if err != nil {
  339. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  340. return
  341. }
  342. forward_AuthService_SignInWithSSO_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  343. })
  344. mux.Handle(http.MethodPost, pattern_AuthService_SignUp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  345. ctx, cancel := context.WithCancel(req.Context())
  346. defer cancel()
  347. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  348. annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignUp", runtime.WithHTTPPathPattern("/api/v1/auth/signup"))
  349. if err != nil {
  350. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  351. return
  352. }
  353. resp, md, err := request_AuthService_SignUp_0(annotatedContext, inboundMarshaler, client, req, pathParams)
  354. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  355. if err != nil {
  356. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  357. return
  358. }
  359. forward_AuthService_SignUp_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  360. })
  361. mux.Handle(http.MethodPost, pattern_AuthService_SignOut_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
  362. ctx, cancel := context.WithCancel(req.Context())
  363. defer cancel()
  364. inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
  365. annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.AuthService/SignOut", runtime.WithHTTPPathPattern("/api/v1/auth/signout"))
  366. if err != nil {
  367. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
  368. return
  369. }
  370. resp, md, err := request_AuthService_SignOut_0(annotatedContext, inboundMarshaler, client, req, pathParams)
  371. annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
  372. if err != nil {
  373. runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
  374. return
  375. }
  376. forward_AuthService_SignOut_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
  377. })
  378. return nil
  379. }
  380. var (
  381. pattern_AuthService_GetAuthStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "status"}, ""))
  382. pattern_AuthService_SignIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "signin"}, ""))
  383. pattern_AuthService_SignInWithSSO_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "auth", "signin", "sso"}, ""))
  384. pattern_AuthService_SignUp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "signup"}, ""))
  385. pattern_AuthService_SignOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "auth", "signout"}, ""))
  386. )
  387. var (
  388. forward_AuthService_GetAuthStatus_0 = runtime.ForwardResponseMessage
  389. forward_AuthService_SignIn_0 = runtime.ForwardResponseMessage
  390. forward_AuthService_SignInWithSSO_0 = runtime.ForwardResponseMessage
  391. forward_AuthService_SignUp_0 = runtime.ForwardResponseMessage
  392. forward_AuthService_SignOut_0 = runtime.ForwardResponseMessage
  393. )