Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupTestDB ¶
func CleanupTestDB()
Types ¶
type JSONMap ¶
type JSONMap map[string]interface{}
JSONMap is a custom type that implements driver.Valuer and sql.Scanner. testutils cannot import internal/models (models tests import testutils), so it carries its own minimal copy.
type UserRole ¶
type UserRole struct {
ID uint `json:"id"`
Name string `json:"name"` // Role name (e.g., admin, editor, viewer)
Description string `json:"description"` // Role description
Permissions JSONMap `json:"permissions" gorm:"type:jsonb;default:'[]';not null"` // Use 'jsonb' for PostgreSQL // Permissions associated with the role
}
Click to show internal directories.
Click to hide internal directories.