mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
Orgs, Members, SSH and Admin page
This commit is contained in:
@@ -77,3 +77,62 @@ type PasswordResetData struct {
|
||||
Token string
|
||||
ResetURL string
|
||||
}
|
||||
|
||||
type UserListItem struct {
|
||||
ID any `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
EmailVerified bool `json:"email_verified"`
|
||||
Role string `json:"role"`
|
||||
CreatedAt any `json:"created_at"`
|
||||
UpdatedAt any `json:"updated_at"`
|
||||
}
|
||||
|
||||
type ListUsersOut struct {
|
||||
Users []UserListItem `json:"users"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type userOut struct {
|
||||
ID any `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
EmailVerified bool `json:"email_verified"`
|
||||
Role string `json:"role"`
|
||||
CreatedAt any `json:"created_at"`
|
||||
UpdatedAt any `json:"updated_at"`
|
||||
}
|
||||
|
||||
type AdminCreateUserRequest struct {
|
||||
Name string `json:"name" example:"Jane Doe"`
|
||||
Email string `json:"email" example:"jane@example.com"`
|
||||
Password string `json:"password" example:"Secret123!"`
|
||||
// Role allowed values: "user" or "admin"
|
||||
Role string `json:"role" example:"user" enums:"user,admin"`
|
||||
}
|
||||
|
||||
type AdminUpdateUserRequest struct {
|
||||
Name *string `json:"name,omitempty" example:"Jane Doe"`
|
||||
Email *string `json:"email,omitempty" example:"jane@example.com"`
|
||||
Password *string `json:"password,omitempty" example:"NewSecret123!"`
|
||||
Role *string `json:"role,omitempty" example:"admin" enums:"user,admin"`
|
||||
}
|
||||
|
||||
type AdminUserResponse struct {
|
||||
ID uuid.UUID `json:"id" example:"6aa012bc-ce8a-4cd9-9971-58f3917037f8"`
|
||||
Name string `json:"name" example:"Jane Doe"`
|
||||
Email string `json:"email" example:"jane@example.com"`
|
||||
EmailVerified bool `json:"email_verified" example:"false"`
|
||||
Role string `json:"role" example:"user"`
|
||||
CreatedAt string `json:"created_at" example:"2025-09-01T08:38:12Z"`
|
||||
UpdatedAt string `json:"updated_at" example:"2025-09-01T17:02:36Z"`
|
||||
}
|
||||
|
||||
type AdminListUsersResponse struct {
|
||||
Users []AdminUserResponse `json:"users"`
|
||||
Page int `json:"page" example:"1"`
|
||||
PageSize int `json:"page_size" example:"50"`
|
||||
Total int64 `json:"total" example:"123"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user