Documentation ¶
Index ¶
Constants ¶
View Source
const ( InvalidRequestMsg = "invalid request" NotFoundMsg = "not found" InternalServerErrorMsg = "internal server error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
ErrorResponse represents http error response.
func NewErrorResponse ¶
func NewErrorResponse(msg string) *ErrorResponse
NewErrorResponse returns custom error response.
func NewInternalServerError ¶
func NewInternalServerError() *ErrorResponse
NewInternalServerError returns internal server error response.
func NewInvalidRequestError ¶
func NewInvalidRequestError() *ErrorResponse
NewInvalidRequestError returns invalid request error response.
func NewNotFoundError ¶
func NewNotFoundError() *ErrorResponse
NewNotFoundError returns not found error response.
type TweetsResponse ¶
TweetsResponse represents a tweets response.
Click to show internal directories.
Click to hide internal directories.