Documentation ¶
Index ¶
- Constants
- type BaseResponse
- func NewBadRequestError(message string) *BaseResponse
- func NewCreatedResponse(message string, data interface{}) *BaseResponse
- func NewInternalServerError(message string) *BaseResponse
- func NewNotFoundError(message string) *BaseResponse
- func NewOkResponse(message string, data interface{}) *BaseResponse
- func NewUnAuthorizedError() *BaseResponse
Constants ¶
View Source
const (
)Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
type BaseResponse struct { Success bool `json:"success"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` Status int `json:"-"` }
func NewBadRequestError ¶
func NewBadRequestError(message string) *BaseResponse
func NewCreatedResponse ¶
func NewCreatedResponse(message string, data interface{}) *BaseResponse
func NewInternalServerError ¶
func NewInternalServerError(message string) *BaseResponse
func NewNotFoundError ¶
func NewNotFoundError(message string) *BaseResponse
func NewOkResponse ¶
func NewOkResponse(message string, data interface{}) *BaseResponse
func NewUnAuthorizedError ¶
func NewUnAuthorizedError() *BaseResponse
Click to show internal directories.
Click to hide internal directories.