object store users

This commit is contained in:
chrislu
2025-07-02 00:00:23 -07:00
parent 4aec3c3fb9
commit f47c4aef5a
8 changed files with 1527 additions and 220 deletions

View File

@@ -27,14 +27,11 @@ type AdminData struct {
// Object Store Users management structures
type ObjectStoreUser struct {
Username string `json:"username"`
Email string `json:"email"`
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
LastLogin time.Time `json:"last_login"`
Permissions []string `json:"permissions"`
Username string `json:"username"`
Email string `json:"email"`
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
Permissions []string `json:"permissions"`
}
type ObjectStoreUsersData struct {
@@ -44,6 +41,36 @@ type ObjectStoreUsersData struct {
LastUpdated time.Time `json:"last_updated"`
}
// User management request structures
type CreateUserRequest struct {
Username string `json:"username" binding:"required"`
Email string `json:"email"`
Actions []string `json:"actions"`
GenerateKey bool `json:"generate_key"`
}
type UpdateUserRequest struct {
Email string `json:"email"`
Actions []string `json:"actions"`
}
type UpdateUserPoliciesRequest struct {
Actions []string `json:"actions" binding:"required"`
}
type AccessKeyInfo struct {
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
CreatedAt time.Time `json:"created_at"`
}
type UserDetails struct {
Username string `json:"username"`
Email string `json:"email"`
Actions []string `json:"actions"`
AccessKeys []AccessKeyInfo `json:"access_keys"`
}
type FilerNode struct {
Address string `json:"address"`
DataCenter string `json:"datacenter"`