Documentation ¶
Index ¶
- Constants
- func DownloadQueryParamsFromRequest(request *restful.Request) (bool, error)
- func QueryParamsFromRequest(request *restful.Request) (qp api.QueryParams, err error)
- func ReadEntityFromRequest(request *restful.Request, entityPointer interface{}) error
- func RecordCountQueryParamsFromRequest(request *restful.Request) (recentCount, recentSuccessCount, recentFailedCount int, err error)
- func ResponseWithError(response *restful.Response, err error)
- func ResponseWithList(list interface{}, total int) api.ListResponse
Constants ¶
View Source
const (
// HeaderUser represents the the key of user in request header.
HeaderUser = "X-User"
)
Variables ¶
This section is empty.
Functions ¶
func DownloadQueryParamsFromRequest ¶ added in v0.3.0
DownloadQueryParamsFromRequest reads the query param whether download pipeline record logs from request.
func QueryParamsFromRequest ¶
func QueryParamsFromRequest(request *restful.Request) (qp api.QueryParams, err error)
QueryParamsFromRequest reads the query params from request.
func ReadEntityFromRequest ¶
func ReadEntityFromRequest(request *restful.Request, entityPointer interface{}) error
ReadEntityFromRequest reads the entity from request body.
func RecordCountQueryParamsFromRequest ¶
func RecordCountQueryParamsFromRequest(request *restful.Request) (recentCount, recentSuccessCount, recentFailedCount int, err error)
RecordCountQueryParamsFromRequest reads the query params of pipeline record count from request.
func ResponseWithError ¶
func ResponseWithError(response *restful.Response, err error)
ResponseWithError responses the request with error.
func ResponseWithList ¶
func ResponseWithList(list interface{}, total int) api.ListResponse
ResponseWithList responses list with metadata.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.