init:搭建了整个项目的框架,初步写好了用户系统
This commit is contained in:
43
internal/api/user.go
Normal file
43
internal/api/user.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package api
|
||||
|
||||
type CreateUserRequest struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type CreateUserResponse struct {
|
||||
}
|
||||
|
||||
type RenameByIDRequest struct {
|
||||
ID uint `json:"id"`
|
||||
NewUsername string `json:"new_username"`
|
||||
}
|
||||
|
||||
type RenameByIDResponse struct {
|
||||
}
|
||||
|
||||
type FindByIDRequest struct {
|
||||
ID uint `json:"id"`
|
||||
}
|
||||
|
||||
type FindByIDResponse struct {
|
||||
ID uint `json:"id"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type FindByUsernameRequest struct {
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type FindByUsernameResponse struct {
|
||||
ID uint `json:"id"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type ChangePasswordRequest struct {
|
||||
ID uint `json:"id"`
|
||||
NewPassword string `json:"new_password"`
|
||||
}
|
||||
|
||||
type ChangePasswordResponse struct {
|
||||
}
|
||||
Reference in New Issue
Block a user