Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope interface {
GetStatusCode() int
SetService(val int) Envelope
SetEndpoint(val int) Envelope
AddError(err Error) Envelope
}
Envelope identifies the interface of a response structured format.
func NewEnvelope ¶
func NewEnvelope(statusCode int, data interface{}, report *ListReport) Envelope
NewEnvelope instantiates a new response data envelope structure
type Error ¶
type Error interface {
SetService(val int) Error
SetEndpoint(val int) Error
SetParam(param int) Error
SetError(err int) Error
SetMessage(msg string) Error
GetCode() string
GetMessage() string
}
Error defines the interface to manipulate an error structure that hold the information of an execution error and be assigned to the response status error list.
type ListReport ¶
type ListReport struct {
Search string `json:"search" xml:"search"`
Start uint `json:"start" xml:"start"`
Count uint `json:"count" xml:"count"`
Total uint `json:"total" xml:"total"`
Prev string `json:"prev" xml:"prev"`
Next string `json:"next" xml:"next"`
}
ListReport defines the structure of a response list report containing all the request information, but also the total amount of filtering records and links for the previous and next pages
func NewListReport ¶
func NewListReport(search string, start uint, count uint, total uint) *ListReport
NewListReport instantiates a new response list report by populating the prev and next link information regarding the given filtering information
Click to show internal directories.
Click to hide internal directories.