console/internal/dto/role.go

49 lines
1.3 KiB
Go

package dto
type RolePermission struct {
Api []string `json:"api"`
Menu []Menu `json:"menu"`
}
type Menu struct {
Id string `json:"id"`
Name string `json:"name"`
Privilege string `json:"privilege"`
}
type UpdateRole struct {
Description string `json:"description" `
Platform []string `json:"platform"`
Cluster []string `json:"cluster" `
Index []string `json:"index" `
ClusterPrivilege []string `json:"cluster_privilege" `
IndexPrivilege []string `json:"index_privilege" `
}
type ElasticsearchPermission struct {
Cluster []string `json:"cluster" `
Index []string `json:"index" `
ClusterPrivilege []string `json:"cluster_privilege" `
IndexPrivilege []string `json:"index_privilege" `
}
type CreateUser struct {
Username string `json:"username"`
Password string `json:"password"`
Name string `json:"name"`
Email string `json:"email"`
Phone string `json:"phone"`
Roles []Role `json:"roles"`
Tags []string `json:"tags"`
}
type Role struct {
Id string `json:"id"`
Name string `json:"name"`
}
type UpdateUser struct {
Name string `json:"name"`
Email string `json:"email"`
Phone string `json:"phone"`
Tags []string `json:"tags"`
}
type UpdateUserRole struct {
Roles []Role `json:"roles"`
}