package service import ( "context" "net/http" "git.chuangxin1.com/csacred/toolkit/binding" "git.chuangxin1.com/csacred/toolkit/example/cuser/define" ) // DecodeGetUserProfileRequest 用户基本信息请求处理 func DecodeGetUserProfileRequest(_ context.Context, r *http.Request) (interface{}, error) { var request define.FormID if err := binding.Bind(r, &request); err != nil { return nil, err } return request, nil } // DecodeGetUserListRequest 用户列表信息请求处理 func DecodeGetUserListRequest(_ context.Context, r *http.Request) (interface{}, error) { var request define.FormUser if err := binding.Bind(r, &request); err != nil { return nil, err } return request, nil } // DecodePostUserSignInRequest 用户登录 func DecodePostUserSignInRequest(ctx context.Context, r *http.Request) (interface{}, error) { var request define.FormUserSignIn if err := binding.Bind(r, &request); err != nil { return nil, err } return request, nil } // DecodePostUserChangePwdRequest 用户修改密码 func DecodePostUserChangePwdRequest(ctx context.Context, r *http.Request) (interface{}, error) { var request define.FormUserChangePwd if err := binding.Bind(r, &request); err != nil { return nil, err } return request, nil }