@ -35,22 +35,24 @@ var (
_ = metadata . Join
_ = metadata . Join
)
)
func request_AuthService_Get AuthStatus _0( ctx context . Context , marshaler runtime . Marshaler , client AuthServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
func request_AuthService_Get CurrentSession _0( ctx context . Context , marshaler runtime . Marshaler , client AuthServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var (
var (
protoReq Get AuthStatus Request
protoReq Get CurrentSession Request
metadata runtime . ServerMetadata
metadata runtime . ServerMetadata
)
)
io . Copy ( io . Discard , req . Body )
if req . Body != nil {
msg , err := client . GetAuthStatus ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
_ , _ = io . Copy ( io . Discard , req . Body )
}
msg , err := client . GetCurrentSession ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
return msg , metadata , err
return msg , metadata , err
}
}
func local_request_AuthService_Get AuthStatus _0( ctx context . Context , marshaler runtime . Marshaler , server AuthServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
func local_request_AuthService_Get CurrentSession _0( ctx context . Context , marshaler runtime . Marshaler , server AuthServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var (
var (
protoReq Get AuthStatus Request
protoReq Get CurrentSession Request
metadata runtime . ServerMetadata
metadata runtime . ServerMetadata
)
)
msg , err := server . Get AuthStatus ( ctx , & protoReq )
msg , err := server . Get CurrentSession ( ctx , & protoReq )
return msg , metadata , err
return msg , metadata , err
}
}
@ -62,6 +64,9 @@ func request_AuthService_CreateSession_0(ctx context.Context, marshaler runtime.
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && ! errors . Is ( err , io . EOF ) {
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && ! errors . Is ( err , io . EOF ) {
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
}
if req . Body != nil {
_ , _ = io . Copy ( io . Discard , req . Body )
}
msg , err := client . CreateSession ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
msg , err := client . CreateSession ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
return msg , metadata , err
return msg , metadata , err
}
}
@ -78,46 +83,51 @@ func local_request_AuthService_CreateSession_0(ctx context.Context, marshaler ru
return msg , metadata , err
return msg , metadata , err
}
}
func request_AuthService_ RegisterUser _0( ctx context . Context , marshaler runtime . Marshaler , client AuthServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
func request_AuthService_ DeleteSession _0( ctx context . Context , marshaler runtime . Marshaler , client AuthServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var (
var (
protoReq RegisterUser Request
protoReq DeleteSession Request
metadata runtime . ServerMetadata
metadata runtime . ServerMetadata
)
)
if err := marshaler . NewDecoder ( req. Body ) . Decode ( & protoReq ) ; err != nil && ! errors . Is ( err , io . EOF ) {
if req. Body != nil {
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
_ , _ = io . Copy ( io . Discard , req . Body )
}
}
msg , err := client . RegisterUser ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
msg , err := client . DeleteSession ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
return msg , metadata , err
return msg , metadata , err
}
}
func local_request_AuthService_ RegisterUser _0( ctx context . Context , marshaler runtime . Marshaler , server AuthServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
func local_request_AuthService_ DeleteSession _0( ctx context . Context , marshaler runtime . Marshaler , server AuthServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
var (
var (
protoReq RegisterUser Request
protoReq DeleteSession Request
metadata runtime . ServerMetadata
metadata runtime . ServerMetadata
)
)
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && ! errors . Is ( err , io . EOF ) {
msg , err := server . DeleteSession ( ctx , & protoReq )
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
msg , err := server . RegisterUser ( ctx , & protoReq )
return msg , metadata , err
return msg , metadata , err
}
}
func request_AuthService_ DeleteSession _0( ctx context . Context , marshaler runtime . Marshaler , client AuthServiceClient , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
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 ) {
var (
var (
protoReq DeleteSession Request
protoReq SignUp Request
metadata runtime . ServerMetadata
metadata runtime . ServerMetadata
)
)
io . Copy ( io . Discard , req . Body )
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && ! errors . Is ( err , io . EOF ) {
msg , err := client . DeleteSession ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
if req . Body != nil {
_ , _ = io . Copy ( io . Discard , req . Body )
}
msg , err := client . SignUp ( ctx , & protoReq , grpc . Header ( & metadata . HeaderMD ) , grpc . Trailer ( & metadata . TrailerMD ) )
return msg , metadata , err
return msg , metadata , err
}
}
func local_request_AuthService_DeleteSession_0 ( ctx context . Context , marshaler runtime . Marshaler , server AuthServiceServer , req * http . Request , pathParams map [ string ] string ) ( proto . Message , runtime . ServerMetadata , error ) {
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 ) {
var (
var (
protoReq DeleteSession Request
protoReq SignUp Request
metadata runtime . ServerMetadata
metadata runtime . ServerMetadata
)
)
msg , err := server . DeleteSession ( ctx , & protoReq )
if err := marshaler . NewDecoder ( req . Body ) . Decode ( & protoReq ) ; err != nil && ! errors . Is ( err , io . EOF ) {
return nil , metadata , status . Errorf ( codes . InvalidArgument , "%v" , err )
}
msg , err := server . SignUp ( ctx , & protoReq )
return msg , metadata , err
return msg , metadata , err
}
}
@ -127,25 +137,25 @@ func local_request_AuthService_DeleteSession_0(ctx context.Context, marshaler ru
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.
// 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.
// 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.
func RegisterAuthServiceHandlerServer ( ctx context . Context , mux * runtime . ServeMux , server AuthServiceServer ) error {
func RegisterAuthServiceHandlerServer ( ctx context . Context , mux * runtime . ServeMux , server AuthServiceServer ) error {
mux . Handle ( http . MethodGet , pattern_AuthService_Get AuthStatus _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . MethodGet , pattern_AuthService_Get CurrentSession _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
defer cancel ( )
var stream runtime . ServerTransportStream
var stream runtime . ServerTransportStream
ctx = grpc . NewContextWithServerTransportStream ( ctx , & stream )
ctx = grpc . NewContextWithServerTransportStream ( ctx , & stream )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
annotatedContext , err := runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.AuthService/Get AuthStatus ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s tatus ") )
annotatedContext , err := runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.AuthService/Get CurrentSession ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s essions/current ") )
if err != nil {
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
return
}
}
resp , md , err := local_request_AuthService_Get AuthStatus _0( annotatedContext , inboundMarshaler , server , req , pathParams )
resp , md , err := local_request_AuthService_Get CurrentSession _0( annotatedContext , inboundMarshaler , server , req , pathParams )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
return
}
}
forward_AuthService_Get AuthStatus _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_Get CurrentSession _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
mux . Handle ( http . MethodPost , pattern_AuthService_CreateSession_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . MethodPost , pattern_AuthService_CreateSession_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
@ -167,45 +177,45 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
}
}
forward_AuthService_CreateSession_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_CreateSession_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
mux . Handle ( http . Method Post, pattern_AuthService_RegisterUser _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . Method Delete, pattern_AuthService_DeleteSession _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
defer cancel ( )
var stream runtime . ServerTransportStream
var stream runtime . ServerTransportStream
ctx = grpc . NewContextWithServerTransportStream ( ctx , & stream )
ctx = grpc . NewContextWithServerTransportStream ( ctx , & stream )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
annotatedContext , err := runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.AuthService/ RegisterUser", runtime . WithHTTPPathPattern ( "/api/v1/auth/users ") )
annotatedContext , err := runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.AuthService/ DeleteSession", runtime . WithHTTPPathPattern ( "/api/v1/auth/sessions/current ") )
if err != nil {
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
return
}
}
resp , md , err := local_request_AuthService_ RegisterUser _0( annotatedContext , inboundMarshaler , server , req , pathParams )
resp , md , err := local_request_AuthService_ DeleteSession _0( annotatedContext , inboundMarshaler , server , req , pathParams )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
return
}
}
forward_AuthService_ RegisterUser _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_ DeleteSession _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
mux . Handle ( http . Method Delete, pattern_AuthService_DeleteSession _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . Method Post, pattern_AuthService_SignUp _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
defer cancel ( )
var stream runtime . ServerTransportStream
var stream runtime . ServerTransportStream
ctx = grpc . NewContextWithServerTransportStream ( ctx , & stream )
ctx = grpc . NewContextWithServerTransportStream ( ctx , & stream )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
annotatedContext , err := runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.AuthService/ DeleteSession ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s essions/current ") )
annotatedContext , err := runtime . AnnotateIncomingContext ( ctx , mux , req , "/memos.api.v1.AuthService/ SignUp ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s ignup ") )
if err != nil {
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
return
}
}
resp , md , err := local_request_AuthService_ DeleteSession _0( annotatedContext , inboundMarshaler , server , req , pathParams )
resp , md , err := local_request_AuthService_ SignUp _0( annotatedContext , inboundMarshaler , server , req , pathParams )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
md . HeaderMD , md . TrailerMD = metadata . Join ( md . HeaderMD , stream . Header ( ) ) , metadata . Join ( md . TrailerMD , stream . Trailer ( ) )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
return
}
}
forward_AuthService_ DeleteSession _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_ SignUp _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
return nil
return nil
@ -247,22 +257,22 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
// "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAuthServiceHandlerClient ( ctx context . Context , mux * runtime . ServeMux , client AuthServiceClient ) error {
func RegisterAuthServiceHandlerClient ( ctx context . Context , mux * runtime . ServeMux , client AuthServiceClient ) error {
mux . Handle ( http . MethodGet , pattern_AuthService_Get AuthStatus _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . MethodGet , pattern_AuthService_Get CurrentSession _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
defer cancel ( )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
annotatedContext , err := runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.AuthService/Get AuthStatus ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s tatus ") )
annotatedContext , err := runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.AuthService/Get CurrentSession ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s essions/current ") )
if err != nil {
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
return
}
}
resp , md , err := request_AuthService_Get AuthStatus _0( annotatedContext , inboundMarshaler , client , req , pathParams )
resp , md , err := request_AuthService_Get CurrentSession _0( annotatedContext , inboundMarshaler , client , req , pathParams )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
return
}
}
forward_AuthService_Get AuthStatus _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_Get CurrentSession _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
mux . Handle ( http . MethodPost , pattern_AuthService_CreateSession_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . MethodPost , pattern_AuthService_CreateSession_0 , func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
@ -281,53 +291,53 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
}
}
forward_AuthService_CreateSession_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_CreateSession_0 ( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
mux . Handle ( http . Method Post, pattern_AuthService_RegisterUser _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . Method Delete, pattern_AuthService_DeleteSession _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
defer cancel ( )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
annotatedContext , err := runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.AuthService/ RegisterUser", runtime . WithHTTPPathPattern ( "/api/v1/auth/users ") )
annotatedContext , err := runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.AuthService/ DeleteSession", runtime . WithHTTPPathPattern ( "/api/v1/auth/sessions/current ") )
if err != nil {
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
return
}
}
resp , md , err := request_AuthService_ RegisterUser _0( annotatedContext , inboundMarshaler , client , req , pathParams )
resp , md , err := request_AuthService_ DeleteSession _0( annotatedContext , inboundMarshaler , client , req , pathParams )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
return
}
}
forward_AuthService_ RegisterUser _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_ DeleteSession _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
mux . Handle ( http . Method Delete, pattern_AuthService_DeleteSession _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
mux . Handle ( http . Method Post, pattern_AuthService_SignUp _0, func ( w http . ResponseWriter , req * http . Request , pathParams map [ string ] string ) {
ctx , cancel := context . WithCancel ( req . Context ( ) )
ctx , cancel := context . WithCancel ( req . Context ( ) )
defer cancel ( )
defer cancel ( )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
inboundMarshaler , outboundMarshaler := runtime . MarshalerForRequest ( mux , req )
annotatedContext , err := runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.AuthService/ DeleteSession ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s essions/current ") )
annotatedContext , err := runtime . AnnotateContext ( ctx , mux , req , "/memos.api.v1.AuthService/ SignUp ", runtime . WithHTTPPathPattern ( "/api/v1/auth/s ignup ") )
if err != nil {
if err != nil {
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( ctx , mux , outboundMarshaler , w , req , err )
return
return
}
}
resp , md , err := request_AuthService_ DeleteSession _0( annotatedContext , inboundMarshaler , client , req , pathParams )
resp , md , err := request_AuthService_ SignUp _0( annotatedContext , inboundMarshaler , client , req , pathParams )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
annotatedContext = runtime . NewServerMetadataContext ( annotatedContext , md )
if err != nil {
if err != nil {
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
runtime . HTTPError ( annotatedContext , mux , outboundMarshaler , w , req , err )
return
return
}
}
forward_AuthService_ DeleteSession _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
forward_AuthService_ SignUp _0( annotatedContext , mux , outboundMarshaler , w , req , resp , mux . GetForwardResponseOptions ( ) ... )
} )
} )
return nil
return nil
}
}
var (
var (
pattern_AuthService_Get AuthStatus _0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 }, [ ] string { "api" , "v1" , "auth" , "s tatus "} , "" ) )
pattern_AuthService_Get CurrentSession _0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 , 2 , 4 }, [ ] string { "api" , "v1" , "auth" , "s essions", "current "} , "" ) )
pattern_AuthService_CreateSession_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 } , [ ] string { "api" , "v1" , "auth" , "sessions" } , "" ) )
pattern_AuthService_CreateSession_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 } , [ ] string { "api" , "v1" , "auth" , "sessions" } , "" ) )
pattern_AuthService_ RegisterUser_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 }, [ ] string { "api" , "v1" , "auth" , " users "} , "" ) )
pattern_AuthService_ DeleteSession_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 , 2 , 4 }, [ ] string { "api" , "v1" , "auth" , " sessions", "current "} , "" ) )
pattern_AuthService_ DeleteSession_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 , 2 , 4 }, [ ] string { "api" , "v1" , "auth" , "s essions", "current "} , "" ) )
pattern_AuthService_ SignUp_0 = runtime . MustPattern ( runtime . NewPattern ( 1 , [ ] int { 2 , 0 , 2 , 1 , 2 , 2 , 2 , 3 }, [ ] string { "api" , "v1" , "auth" , "s ignup "} , "" ) )
)
)
var (
var (
forward_AuthService_Get AuthStatus _0 = runtime . ForwardResponseMessage
forward_AuthService_Get CurrentSession _0 = runtime . ForwardResponseMessage
forward_AuthService_CreateSession_0 = runtime . ForwardResponseMessage
forward_AuthService_CreateSession_0 = runtime . ForwardResponseMessage
forward_AuthService_ RegisterUser_0 = runtime . ForwardResponseMessage
forward_AuthService_ DeleteSession_0 = runtime . ForwardResponseMessage
forward_AuthService_ DeleteSession_0 = runtime . ForwardResponseMessage
forward_AuthService_ SignUp_0 = runtime . ForwardResponseMessage
)
)