Files
triggerssmith/api/acl_admin/roles_models.go
2025-12-21 00:00:03 +02:00

49 lines
1.3 KiB
Go

package api_acladmin
/*******************************************************************/
// used in getRoles()
type getRolesResponse []struct {
ID uint `json:"id" example:"1"`
Name string `json:"name" example:"admin"`
}
var _ getRolesResponse
/*******************************************************************/
// used in getRole()
type getRoleResponse struct {
ID uint `json:"id" example:"1"`
Name string `json:"name" example:"admin"`
}
/*******************************************************************/
// used in getRoleUsers()
type getRoleUser struct {
ID uint `json:"id" example:"1"`
Name string `json:"username" example:"admin"`
Email string `json:"email" example:"admin@triggerssmith.com"`
}
type getRoleUsersResponse []getRoleUser
/*******************************************************************/
// used in createRole()
type createRoleRequest struct {
Name string `json:"name" example:"admin"`
}
type createRoleResponse struct {
ID uint `json:"id" example:"1"`
Name string `json:"name" example:"admin"`
}
/*******************************************************************/
// used in updateRole()
type updateRoleRequest struct {
Name string `json:"name" example:"admin"`
}
type updateRoleResponse struct {
ID uint `json:"id" example:"1"`
Name string `json:"name" example:"admin"`
}