response

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unauthorized = "Unauthorized user"
)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL