|
|
@ -35,100 +35,44 @@ var (
|
|
|
|
_ = metadata.Join
|
|
|
|
_ = metadata.Join
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var filter_UserService_ListUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq ListUsersRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
|
|
|
|
msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq ListUsersRequest
|
|
|
|
protoReq ListUsersRequest
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
)
|
|
|
|
)
|
|
|
|
msg, err := server.ListUsers(ctx, &protoReq)
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq GetUserRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
err error
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
|
|
|
|
if !ok {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq GetUserRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
err error
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
|
|
|
|
if !ok {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := server.GetUser(ctx, &protoReq)
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_GetUserByUsername_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_GetUserByUsername_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq GetUserByUsernameRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserByUsername_0); err != nil {
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListUsers_0); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := client.GetUserByUsername(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func local_request_UserService_GetUserByUsername_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq GetUserByUsernameRequest
|
|
|
|
protoReq ListUsersRequest
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserByUsername_0); err != nil {
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListUsers_0); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := server.GetUserByUsername(ctx, &protoReq)
|
|
|
|
msg, err := server.ListUsers(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_GetUserAvatarBinary_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
|
|
var filter_UserService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_GetUserAvatarBinary_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq GetUserAvatarBinaryRequest
|
|
|
|
protoReq GetUserRequest
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
err error
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -144,16 +88,16 @@ func request_UserService_GetUserAvatarBinary_0(ctx context.Context, marshaler ru
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserAvatarBinary_0); err != nil {
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := client.GetUserAvatarBinary(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func local_request_UserService_GetUserAvatarBinary_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq GetUserAvatarBinaryRequest
|
|
|
|
protoReq GetUserRequest
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
err error
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -168,13 +112,15 @@ func local_request_UserService_GetUserAvatarBinary_0(ctx context.Context, marsha
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserAvatarBinary_0); err != nil {
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUser_0); err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := server.GetUserAvatarBinary(ctx, &protoReq)
|
|
|
|
msg, err := server.GetUser(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_CreateUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func request_UserService_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq CreateUserRequest
|
|
|
|
protoReq CreateUserRequest
|
|
|
@ -183,6 +129,12 @@ func request_UserService_CreateUser_0(ctx context.Context, marshaler runtime.Mar
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.User); err != nil && !errors.Is(err, io.EOF) {
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.User); 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 err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_CreateUser_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
msg, err := client.CreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.CreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -195,6 +147,12 @@ func local_request_UserService_CreateUser_0(ctx context.Context, marshaler runti
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.User); err != nil && !errors.Is(err, io.EOF) {
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.User); 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 err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_CreateUser_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
msg, err := server.CreateUser(ctx, &protoReq)
|
|
|
|
msg, err := server.CreateUser(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -277,6 +235,8 @@ func local_request_UserService_UpdateUser_0(ctx context.Context, marshaler runti
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_DeleteUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func request_UserService_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq DeleteUserRequest
|
|
|
|
protoReq DeleteUserRequest
|
|
|
@ -292,6 +252,12 @@ func request_UserService_DeleteUser_0(ctx context.Context, marshaler runtime.Mar
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUser_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
msg, err := client.DeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.DeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -310,16 +276,100 @@ func local_request_UserService_DeleteUser_0(ctx context.Context, marshaler runti
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_DeleteUser_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
msg, err := server.DeleteUser(ctx, &protoReq)
|
|
|
|
msg, err := server.DeleteUser(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_SearchUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_SearchUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq SearchUsersRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_SearchUsers_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := client.SearchUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func local_request_UserService_SearchUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq SearchUsersRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_SearchUsers_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := server.SearchUsers(ctx, &protoReq)
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_GetUserAvatar_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq GetUserAvatarRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
err error
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
|
|
|
|
if !ok {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := client.GetUserAvatar(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func local_request_UserService_GetUserAvatar_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
protoReq GetUserAvatarRequest
|
|
|
|
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
|
|
|
|
err error
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
|
|
|
|
if !ok {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := server.GetUserAvatar(ctx, &protoReq)
|
|
|
|
|
|
|
|
return msg, metadata, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_ListAllUserStats_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_ListAllUserStats_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func request_UserService_ListAllUserStats_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq ListAllUserStatsRequest
|
|
|
|
protoReq ListAllUserStatsRequest
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
)
|
|
|
|
)
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListAllUserStats_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
msg, err := client.ListAllUserStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.ListAllUserStats(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -329,6 +379,12 @@ func local_request_UserService_ListAllUserStats_0(ctx context.Context, marshaler
|
|
|
|
protoReq ListAllUserStatsRequest
|
|
|
|
protoReq ListAllUserStatsRequest
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListAllUserStats_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
msg, err := server.ListAllUserStats(ctx, &protoReq)
|
|
|
|
msg, err := server.ListAllUserStats(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -485,6 +541,8 @@ func local_request_UserService_UpdateUserSetting_0(ctx context.Context, marshale
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_ListUserAccessTokens_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_ListUserAccessTokens_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func request_UserService_ListUserAccessTokens_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq ListUserAccessTokensRequest
|
|
|
|
protoReq ListUserAccessTokensRequest
|
|
|
@ -492,13 +550,19 @@ func request_UserService_ListUserAccessTokens_0(ctx context.Context, marshaler r
|
|
|
|
err error
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
)
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
io.Copy(io.Discard, req.Body)
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
val, ok := pathParams["parent"]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
protoReq.Parent, err = runtime.String(val)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListUserAccessTokens_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := client.ListUserAccessTokens(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.ListUserAccessTokens(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
@ -510,34 +574,48 @@ func local_request_UserService_ListUserAccessTokens_0(ctx context.Context, marsh
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
err error
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
)
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
val, ok := pathParams["parent"]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
protoReq.Parent, err = runtime.String(val)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_ListUserAccessTokens_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := server.ListUserAccessTokens(ctx, &protoReq)
|
|
|
|
msg, err := server.ListUserAccessTokens(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter_UserService_CreateUserAccessToken_0 = &utilities.DoubleArray{Encoding: map[string]int{"access_token": 0, "parent": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
|
|
|
|
|
|
|
|
|
|
|
|
func request_UserService_CreateUserAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
func request_UserService_CreateUserAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
protoReq CreateUserAccessTokenRequest
|
|
|
|
protoReq CreateUserAccessTokenRequest
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
err error
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.AccessToken); 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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
val, ok := pathParams["parent"]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
protoReq.Parent, err = runtime.String(val)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_CreateUserAccessToken_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := client.CreateUserAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.CreateUserAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
@ -549,16 +627,22 @@ func local_request_UserService_CreateUserAccessToken_0(ctx context.Context, mars
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
metadata runtime.ServerMetadata
|
|
|
|
err error
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.AccessToken); 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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val, ok := pathParams["name"]
|
|
|
|
val, ok := pathParams["parent"]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
protoReq.Name, err = runtime.String(val)
|
|
|
|
protoReq.Parent, err = runtime.String(val)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := req.ParseForm(); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_CreateUserAccessToken_0); err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
msg, err := server.CreateUserAccessToken(ctx, &protoReq)
|
|
|
|
msg, err := server.CreateUserAccessToken(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
@ -579,14 +663,6 @@ func request_UserService_DeleteUserAccessToken_0(ctx context.Context, marshaler
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val, ok = pathParams["access_token"]
|
|
|
|
|
|
|
|
if !ok {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "access_token")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protoReq.AccessToken, err = runtime.String(val)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "access_token", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := client.DeleteUserAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
msg, err := client.DeleteUserAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -605,14 +681,6 @@ func local_request_UserService_DeleteUserAccessToken_0(ctx context.Context, mars
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val, ok = pathParams["access_token"]
|
|
|
|
|
|
|
|
if !ok {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "access_token")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protoReq.AccessToken, err = runtime.String(val)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "access_token", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := server.DeleteUserAccessToken(ctx, &protoReq)
|
|
|
|
msg, err := server.DeleteUserAccessToken(ctx, &protoReq)
|
|
|
|
return msg, metadata, err
|
|
|
|
return msg, metadata, err
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -663,113 +731,113 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
}
|
|
|
|
}
|
|
|
|
forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_GetUserByUsername_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodPost, pattern_UserService_CreateUser_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.UserService/GetUserByUsername", runtime.WithHTTPPathPattern("/api/v1/users:username"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/users"))
|
|
|
|
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_UserService_GetUserByUsername_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
|
|
resp, md, err := local_request_UserService_CreateUser_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_UserService_GetUserByUsername_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_GetUserAvatarBinary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodPatch, pattern_UserService_UpdateUser_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.UserService/GetUserAvatarBinary", runtime.WithHTTPPathPattern("/file/{name=users/*}/avatar"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v1/{user.name=users/*}"))
|
|
|
|
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_UserService_GetUserAvatarBinary_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
|
|
resp, md, err := local_request_UserService_UpdateUser_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_UserService_GetUserAvatarBinary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodPost, pattern_UserService_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodDelete, pattern_UserService_DeleteUser_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.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/users"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
|
|
|
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_UserService_CreateUser_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
|
|
resp, md, err := local_request_UserService_DeleteUser_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_UserService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodPatch, pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_SearchUsers_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.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v1/{user.name=users/*}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v1/users:search"))
|
|
|
|
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_UserService_UpdateUser_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
|
|
resp, md, err := local_request_UserService_SearchUsers_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_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_SearchUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodDelete, pattern_UserService_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_GetUserAvatar_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.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserAvatar", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/avatar"))
|
|
|
|
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_UserService_DeleteUser_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
|
|
|
resp, md, err := local_request_UserService_GetUserAvatar_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_UserService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_GetUserAvatar_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodPost, pattern_UserService_ListAllUserStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_ListAllUserStats_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.UserService/ListAllUserStats", runtime.WithHTTPPathPattern("/api/v1/users/-/stats"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/ListAllUserStats", runtime.WithHTTPPathPattern("/api/v1/users:stats"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -789,7 +857,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/GetUserStats", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/stats"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserStats", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}:getStats"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -809,7 +877,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/setting"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}:getSetting"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -829,7 +897,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v1/{setting.name=users/*/setting}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v1/{setting.name=users/*}:updateSetting"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -849,7 +917,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/accessTokens"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -869,7 +937,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/accessTokens"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -889,7 +957,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens/{access_token}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*/accessTokens/*}"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -977,96 +1045,96 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
}
|
|
|
|
}
|
|
|
|
forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_GetUserByUsername_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodPost, pattern_UserService_CreateUser_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.UserService/GetUserByUsername", runtime.WithHTTPPathPattern("/api/v1/users:username"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/users"))
|
|
|
|
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_UserService_GetUserByUsername_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
|
|
resp, md, err := request_UserService_CreateUser_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_UserService_GetUserByUsername_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_GetUserAvatarBinary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodPatch, pattern_UserService_UpdateUser_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.UserService/GetUserAvatarBinary", runtime.WithHTTPPathPattern("/file/{name=users/*}/avatar"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v1/{user.name=users/*}"))
|
|
|
|
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_UserService_GetUserAvatarBinary_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
|
|
resp, md, err := request_UserService_UpdateUser_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_UserService_GetUserAvatarBinary_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodPost, pattern_UserService_CreateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodDelete, pattern_UserService_DeleteUser_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.UserService/CreateUser", runtime.WithHTTPPathPattern("/api/v1/users"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
|
|
|
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_UserService_CreateUser_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
|
|
resp, md, err := request_UserService_DeleteUser_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_UserService_CreateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodPatch, pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_SearchUsers_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.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v1/{user.name=users/*}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v1/users:search"))
|
|
|
|
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_UserService_UpdateUser_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
|
|
resp, md, err := request_UserService_SearchUsers_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_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_SearchUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodDelete, pattern_UserService_DeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_GetUserAvatar_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.UserService/DeleteUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserAvatar", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/avatar"))
|
|
|
|
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_UserService_DeleteUser_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
|
|
|
resp, md, err := request_UserService_GetUserAvatar_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_UserService_DeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
forward_UserService_GetUserAvatar_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
mux.Handle(http.MethodPost, pattern_UserService_ListAllUserStats_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
|
|
|
mux.Handle(http.MethodGet, pattern_UserService_ListAllUserStats_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.UserService/ListAllUserStats", runtime.WithHTTPPathPattern("/api/v1/users/-/stats"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/ListAllUserStats", runtime.WithHTTPPathPattern("/api/v1/users:stats"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1083,7 +1151,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/GetUserStats", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/stats"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserStats", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}:getStats"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1100,7 +1168,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/setting"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserSetting", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}:getSetting"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1117,7 +1185,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v1/{setting.name=users/*/setting}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/UpdateUserSetting", runtime.WithHTTPPathPattern("/api/v1/{setting.name=users/*}:updateSetting"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1134,7 +1202,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/ListUserAccessTokens", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/accessTokens"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1151,7 +1219,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/CreateUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/accessTokens"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1168,7 +1236,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
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.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}/access_tokens/{access_token}"))
|
|
|
|
annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/DeleteUserAccessToken", runtime.WithHTTPPathPattern("/api/v1/{name=users/*/accessTokens/*}"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1187,28 +1255,28 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
pattern_UserService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, ""))
|
|
|
|
pattern_UserService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, ""))
|
|
|
|
pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, ""))
|
|
|
|
pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, ""))
|
|
|
|
pattern_UserService_GetUserByUsername_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "username"))
|
|
|
|
|
|
|
|
pattern_UserService_GetUserAvatarBinary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"file", "users", "name", "avatar"}, ""))
|
|
|
|
|
|
|
|
pattern_UserService_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, ""))
|
|
|
|
pattern_UserService_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, ""))
|
|
|
|
pattern_UserService_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "user.name"}, ""))
|
|
|
|
pattern_UserService_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "user.name"}, ""))
|
|
|
|
pattern_UserService_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, ""))
|
|
|
|
pattern_UserService_DeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, ""))
|
|
|
|
pattern_UserService_ListAllUserStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "users", "-", "stats"}, ""))
|
|
|
|
pattern_UserService_SearchUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "search"))
|
|
|
|
pattern_UserService_GetUserStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "stats"}, ""))
|
|
|
|
pattern_UserService_GetUserAvatar_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "avatar"}, ""))
|
|
|
|
pattern_UserService_GetUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "setting"}, ""))
|
|
|
|
pattern_UserService_ListAllUserStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "stats"))
|
|
|
|
pattern_UserService_UpdateUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 4, 3, 5, 4}, []string{"api", "v1", "users", "setting", "setting.name"}, ""))
|
|
|
|
pattern_UserService_GetUserStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, "getStats"))
|
|
|
|
pattern_UserService_ListUserAccessTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "access_tokens"}, ""))
|
|
|
|
pattern_UserService_GetUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, "getSetting"))
|
|
|
|
pattern_UserService_CreateUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "name", "access_tokens"}, ""))
|
|
|
|
pattern_UserService_UpdateUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "setting.name"}, "updateSetting"))
|
|
|
|
pattern_UserService_DeleteUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "users", "name", "access_tokens", "access_token"}, ""))
|
|
|
|
pattern_UserService_ListUserAccessTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "parent", "accessTokens"}, ""))
|
|
|
|
|
|
|
|
pattern_UserService_CreateUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "parent", "accessTokens"}, ""))
|
|
|
|
|
|
|
|
pattern_UserService_DeleteUserAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 1, 0, 4, 4, 5, 4}, []string{"api", "v1", "users", "accessTokens", "name"}, ""))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
forward_UserService_ListUsers_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_ListUsers_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_GetUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_GetUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_GetUserByUsername_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
forward_UserService_GetUserAvatarBinary_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
forward_UserService_CreateUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_CreateUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_UpdateUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_UpdateUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_DeleteUser_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_DeleteUser_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
forward_UserService_SearchUsers_0 = runtime.ForwardResponseMessage
|
|
|
|
|
|
|
|
forward_UserService_GetUserAvatar_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_ListAllUserStats_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_ListAllUserStats_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_GetUserStats_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_GetUserStats_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_GetUserSetting_0 = runtime.ForwardResponseMessage
|
|
|
|
forward_UserService_GetUserSetting_0 = runtime.ForwardResponseMessage
|
|
|
|