Discover Packages
github.com/BentCoder/golibrary
pkg
response
package
Version:
v0.0.13
Opens a new window with list of versions in this module.
Published: Apr 24, 2020
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Error struct {
Operation string `json:"operation,omitempty"`
Message string `json:"message,omitempty"`
Errors map[string ]string `json:"errors,omitempty"`
}
NewError returns `*Error` instance.
Write calls `write` function to write error response.
type Success struct {
Operation string `json:"operation,omitempty"`
Data interface{} `json:"data,omitempty"`
Meta interface{} `json:"meta,omitempty"`
}
NewSuccess returns `*Success` instance.
Write calls `write` function to write success response.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.