Documentation ¶
Index ¶
- Variables
- func ErrConflict(err error) render.Renderer
- func ErrInvalidRequest(err error) render.Renderer
- func ErrRender(err error) render.Renderer
- func GetActionLogCtx(r *http.Request) *models.ActionLogEntry
- func GetDisciplinaryLogCtx(r *http.Request) *models.DisciplinaryLogEntry
- func GetDocumentCtx(r *http.Request) *models.Document
- func GetFAQCtx(r *http.Request) *models.FAQ
- func GetFacilityCtx(r *http.Request) (*models.Facility, error)
- func GetFacilityLogCtx(r *http.Request) *models.FacilityLogEntry
- func GetFeedbackCtx(r *http.Request) *models.Feedback
- func GetNewsCtx(r *http.Request) *models.News
- func GetNotificationCtx(r *http.Request) *models.Notification
- func GetRatingChangeCtx(r *http.Request) *models.RatingChange
- func GetRosterCtx(r *http.Request) *models.Roster
- func GetRosterRequestCtx(r *http.Request) *models.RosterRequest
- func GetUserCtx(r *http.Request) *models.User
- func GetUserFlagCtx(r *http.Request) *models.UserFlag
- func GetUserRoleCtx(r *http.Request) *models.UserRole
- func Render(w http.ResponseWriter, r *http.Request, renderer render.Renderer)
- type AleKey
- type DleKey
- type DocumentKey
- type ErrResponse
- type FAQKey
- type FacilityLogKey
- type FeedbackKey
- type NewsKey
- type NotificationKey
- type RatingChangeKey
- type RosterKey
- type RosterRequestKey
- type UserFlagKey
- type UserKey
- type UserRoleKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = &ErrResponse{HTTPStatusCode: 404, StatusText: "Resource not found."} ErrBadRequest = &ErrResponse{HTTPStatusCode: 400, StatusText: "Bad request"} ErrInternalServer = &ErrResponse{HTTPStatusCode: 500, StatusText: "Internal Server Error"} ErrInvalidFacility = &ErrResponse{HTTPStatusCode: 400, StatusText: "Invalid facility"} ErrInvalidRole = &ErrResponse{HTTPStatusCode: 400, StatusText: "Invalid role"} ErrInvalidCID = &ErrResponse{HTTPStatusCode: 400, StatusText: "Invalid CID"} )
Functions ¶
func ErrConflict ¶
func ErrInvalidRequest ¶
func GetActionLogCtx ¶
func GetActionLogCtx(r *http.Request) *models.ActionLogEntry
func GetDisciplinaryLogCtx ¶
func GetDisciplinaryLogCtx(r *http.Request) *models.DisciplinaryLogEntry
func GetFacilityLogCtx ¶
func GetFacilityLogCtx(r *http.Request) *models.FacilityLogEntry
func GetNotificationCtx ¶
func GetNotificationCtx(r *http.Request) *models.Notification
func GetRatingChangeCtx ¶
func GetRatingChangeCtx(r *http.Request) *models.RatingChange
func GetRosterRequestCtx ¶
func GetRosterRequestCtx(r *http.Request) *models.RosterRequest
Types ¶
type DocumentKey ¶
type DocumentKey struct{}
type ErrResponse ¶
type ErrResponse struct { Err error `json:"-"` // low-level runtime error HTTPStatusCode int `json:"-"` // http response status code StatusText string `json:"status"` // user-level status message AppCode int64 `json:"code,omitempty"` // application-specific error code ErrorText string `json:"error,omitempty"` // application-level error message, for debugging }
func (*ErrResponse) Render ¶
func (e *ErrResponse) Render(w http.ResponseWriter, r *http.Request) error
type FacilityLogKey ¶
type FacilityLogKey struct{}
type FeedbackKey ¶
type FeedbackKey struct{}
type NotificationKey ¶
type NotificationKey struct{}
type RatingChangeKey ¶
type RatingChangeKey struct{}
type RosterRequestKey ¶
type RosterRequestKey struct{}
type UserFlagKey ¶
type UserFlagKey struct{}
type UserRoleKey ¶
type UserRoleKey struct{}
Click to show internal directories.
Click to hide internal directories.