Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Search ¶
@tags admin-http-api @accept json @produce json @param Authorization header string true "bearer token" @param "query string" query httpapi.HttpApiSearchRequest true "search http apis" @success 200 {object} response.Response{data=httpapi.HttpApiSearchData} @failure 400 {object} response.ErrorResponse "code: 400-001(Bad Request), 400-002(request validation failed)" @failure 401 {object} response.ErrorResponse "code: 401-001(Unauthorized)" @failure 403 {object} response.ErrorResponse "code: 403-001(Forbidden)" @failure 500 {object} response.ErrorResponse "code: 500-001(Internal Server Error)" @router /api/admin/http-api [get]
Types ¶
type HttpApiData ¶
type HttpApiData struct {
Id uint `json:"id" mapstructure:"id" validate:"required"`
Method string `json:"method" mapstructure:"method" validate:"required"`
Path string `json:"path" mapstructure:"path" validate:"required"`
CreatedAt time.Time `json:"created_at" mapstructure:"created_at" validate:"required" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" mapstructure:"updated_at" validate:"required" format:"date-time"`
}
func (*HttpApiData) Fill ¶
func (data *HttpApiData) Fill(m *model.HttpApi)
type HttpApiSearchData ¶
type HttpApiSearchData struct {
HttpApis []HttpApiData `json:"http_apis" mapstructure:"http_apis" validate:"required"`
pagination.PaginationResponse `mapstructure:",squash"`
}
type HttpApiSearchRequest ¶
type HttpApiSearchRequest struct {
Method string `form:"method" schema:"method,omitempty" structs:"method,omitempty"`
Path string `form:"path" schema:"path,omitempty" structs:"path,omitempty"`
pagination.PaginationRequest
}
Click to show internal directories.
Click to hide internal directories.