Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadRequestError ¶
type BadRequestError struct {
Message string
}
BadRequestError represents a general bad request error with custom message
func (BadRequestError) Error ¶
func (e BadRequestError) Error() string
type ForbiddenError ¶
ForbiddenError represents an error when authorized user tries to access resources that he has no access to
func (ForbiddenError) Error ¶
func (e ForbiddenError) Error() string
type NotFoundError ¶
NotFoundError represents an error when user tries to access resources that does not exist
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type SettingsPayload ¶
type TokenSessionResponse ¶
type TokenSessionResponse struct {
Token string `json:"token"`
}
type UnauthorizedError ¶
type UnauthorizedError struct { }
UnauthorizedError represents an error when user tries to access guarded resources without autohrization information
func (UnauthorizedError) Error ¶
func (e UnauthorizedError) Error() string
type UserResponse ¶
type UserResponse struct { ID bson.ObjectId `json:"id"` Address string `json:"address"` Alias string `json:"alias"` Rating float32 `json:"rating,omitempty"` }
func NewUserResponseFromModel ¶
func NewUserResponseFromModel(m models.User) UserResponse
NewUserResponseFromModel creates json response object
type WrongRequestParametersError ¶
type WrongRequestParametersError struct { }
WrongRequestParametersError represents an error when user provides wrong parameters in a request
func (WrongRequestParametersError) Error ¶
func (e WrongRequestParametersError) Error() string
Click to show internal directories.
Click to hide internal directories.