Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(apiRouterGroup *gin.RouterGroup) error
Init initializes the webapi and makes it ready to be used.
func RespondWithError ¶ added in v0.4.0
func RespondWithError(g *gin.Context, error ErrorResponse)
RespondWithError responds to a request with the passed error. Any further processing will be aborted!
func Router ¶
func Router() *gin.RouterGroup
Router returns the root gin.RouterGroup that should be used to register new router groups and routes.
This function should be used by components to create API endpoints.
Types ¶
type ErrorResponse ¶ added in v0.4.0
type ErrorResponse struct { Status int `json:"status"` Error string `json:"error"` Message string `json:"message"` Timestamp time.Time `json:"timestamp"` } //@Name Error
ErrorResponse is an error that can be thrown on the web api.
@Description Error holds information about an error that occurred.
Click to show internal directories.
Click to hide internal directories.