Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultPayLoadName = "payload"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetailError ¶
type Error ¶
type Error struct { Action string `json:"action,omitempty"` Message string `json:"message,omitempty"` Errors []DetailError `json:"errs,omitempty"` // contains filtered or unexported fields }
func NewError ¶
func NewError(w http.ResponseWriter, r *http.Request) *Error
///////////////////////////////////////////////////////////////////////////////////////////////// Error response /////////////////////////////////////////////////////////////////////////////////////////////////
func (*Error) AddValidatorDetail ¶
type ServiceError ¶
func New ¶
func New() *ServiceError
func (*ServiceError) DecodeHttpCode ¶
func (se *ServiceError) DecodeHttpCode(statusCode int, message string)
func (*ServiceError) Error ¶
func (se *ServiceError) Error() string
type Success ¶
type Success struct { Action string `json:"action,omitempty"` PayloadName string `json:"-"` Data interface{} `json:"data"` Meta interface{} `json:"meta"` // contains filtered or unexported fields }
func NewSuccess ¶
func NewSuccess(w http.ResponseWriter, r *http.Request) *Success
///////////////////////////////////////////////////////////////////////////////////////////////// Success Response /////////////////////////////////////////////////////////////////////////////////////////////////
Click to show internal directories.
Click to hide internal directories.