Documentation
¶
Index ¶
- type Context
- func (pkg *Context) Bind(obj any) error
- func (pkg *Context) ResponseData(status int, data interface{})
- func (pkg *Context) ResponseDataList(status int, data interface{}, total int64)
- func (pkg *Context) ResponseError(status int, err error)
- func (pkg *Context) ResponseErrors(status int, errors []ErrorResponse)
- func (pkg *Context) ResponseMessage(status int)
- type ErrorResponse
- type Filters
- type Headers
- type Response
- type Sessions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
func NewContext ¶
func (*Context) ResponseData ¶
func (*Context) ResponseDataList ¶
func (*Context) ResponseError ¶
func (*Context) ResponseErrors ¶
func (pkg *Context) ResponseErrors(status int, errors []ErrorResponse)
func (*Context) ResponseMessage ¶
type ErrorResponse ¶
type ErrorResponse struct {
Field interface{} `json:"field"`
Message string `json:"message"`
}
type Filters ¶
type Filters struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
Search string `json:"search"`
Conditions map[string]string `json:"conditions"`
StatusIds []int64 `json:"status_ids"`
SortBy string `json:"sort_by"`
}
func GetFilters ¶
type Headers ¶
type Headers struct {
Ip string
Company int64
Theme string
Language string
DateFormat string
NumberDigit string
CurrencyFormat string
Timezone string
}
func GetHeaders ¶
type Response ¶
type Response struct {
Status int `json:"status"`
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
Total int64 `json:"total,omitempty"`
PerPage int64 `json:"per_page,omitempty"`
CurrentPage int64 `json:"current_page,omitempty"`
LastPage int64 `json:"last_page,omitempty"`
Errors []ErrorResponse `json:"errors,omitempty"`
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.