Documentation
¶
Index ¶
- func ErrorJSON(w http.ResponseWriter, status int, code ErrorCode, message string)
- func JSON(w http.ResponseWriter, status int, v any)
- func RawJSON(w http.ResponseWriter, status int, body []byte)
- func WriteError(w http.ResponseWriter, spec ErrorSpec, message string)
- type Error
- type ErrorCode
- type ErrorResponse
- type ErrorSpec
- type Organization
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, spec ErrorSpec, message string)
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
type Organization ¶ added in v0.1.24
type Organization struct {
ID string `json:"id"`
Name string `json:"name"`
Role domain.OrganizationRole `json:"role"`
}
type User ¶
type User struct {
ID string `json:"id"`
Email string `json:"email"`
Username string `json:"username"`
Disabled bool `json:"disabled"`
CreatedAt time.Time `json:"created_at"`
Roles []roles.Role `json:"roles"`
Organization *Organization `json:"organization,omitempty"`
}
func UserWithRolesAndOrganization ¶ added in v0.1.24
func UserWithRolesAndOrganization(u domain.User, roles []roles.Role, org domain.Organization, orgRole domain.OrganizationRole) User
Click to show internal directories.
Click to hide internal directories.