http

package
v0.7.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// APIVersion is the version of API.
	APIVersion = "/api/v1"

	// ProjectPathParameterName represents the name of the path parameter for project.
	ProjectPathParameterName = "project"

	// PipelinePathParameterName represents the name of the path parameter for pipeline.
	PipelinePathParameterName = "pipeline"

	// PipelineIDPathParameterName represents the name of the path parameter for pipeline id.
	PipelineIDPathParameterName = "pipelineid"

	// PipelineRecordPathParameterName represents the name of the path parameter for pipeline record.
	PipelineRecordPathParameterName = "recordid"

	// FileNamePathParameterName represents the name of the path parameter for file name.
	FileNamePathParameterName = "filename"

	// PipelineRecordStagePathParameterName represents the name of the query parameter for pipeline record stage.
	PipelineRecordStageQueryParameterName = "stage"

	// PipelineRecordTaskQueryParameterName represents the name of the query parameter for pipeline record task.
	PipelineRecordTaskQueryParameterName = "task"

	// PipelineRecordDownloadQueryParameter represents a download flag of the query parameter for pipeline record task.
	PipelineRecordDownloadQueryParameter = "download"

	// EventPathParameterName represents the name of the path parameter for event.
	EventPathParameterName = "eventid"

	// CloudPathParameterName represents the name of the path parameter for cloud.
	CloudPathParameterName = "cloud"

	// NamespaceQueryParameterName represents the k8s cluster namespce of the query parameter for cloud.
	NamespaceQueryParameter = "namespace"

	// RepoQueryParameterName represents the repo name of the query parameter.
	RepoQueryParameter = "repo"

	// StartTimeQueryParameter represents the query param start time.
	StartTimeQueryParameter string = "startTime"

	// EndTimeQueryParameter represents the query param end time.
	EndTimeQueryParameter string = "endTime"

	// HeaderUser represents the the key of user in request header.
	HeaderUser = "X-User"

	HEADER_ContentType = "Content-Type"
)

Variables

This section is empty.

Functions

func GetHttpRequest added in v0.7.1

func GetHttpRequest(ctx context.Context) *http.Request

GetHttpRequest gets request from context.

func QueryParamsFromContext added in v0.7.1

func QueryParamsFromContext(ctx context.Context) (qp api.QueryParams, err error)

QueryParamsFromContext reads the query params from context.

func ResponseWithList

func ResponseWithList(list interface{}, total int) api.ListResponse

ResponseWithList responses list with metadata.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL