Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResult ¶
type ErrorResult struct {
Error ErrorItem `json:"error"`
}
type ListResult ¶
type ListResult struct { List interface{} `json:"list"` Pagination *PaginationResponse `json:"pagination,omitempty"` }
type PaginationParam ¶
type PaginationParam struct { Current int `query:"current,default=1"` PageSize int `query:"page_size,default=10"` }
func (*PaginationParam) GetCurrent ¶
func (a *PaginationParam) GetCurrent() int
func (*PaginationParam) GetPageSize ¶
func (a *PaginationParam) GetPageSize() int
type PaginationResponse ¶
type PaginationResponse struct { Total int `json:"total"` Current int `json:"current"` PageSize int `json:"page_size"` }
func (*PaginationResponse) NewPaginationResponse ¶
func (r *PaginationResponse) NewPaginationResponse(total int, current int, pageSize int) PaginationResponse
type StatusResult ¶
type StatusResult struct {
Status StatusText `json:"status"`
}
type StatusText ¶
type StatusText string
const ( OKStatus StatusText = "success" ErrorStatus StatusText = "Error" FailStatus StatusText = "Fail" )
func (StatusText) String ¶
func (t StatusText) String() string
type ThreatsPage ¶
type ThreatsPage struct { List []*ent.Threat `json:"list"` Pagination *PaginationResponse `json:"pagnition"` }
type ThreatsResponse ¶
type ThreatsResponse struct { Code int `json:"code"` Message string `json:"message"` StatusCode int `json:"status_code"` Data ThreatsPage `json:"data"` }
Click to show internal directories.
Click to hide internal directories.