Documentation
¶
Index ¶
Constants ¶
View Source
const RequestHeader = "Gitlab-Workhorse-Api-Request"
View Source
const ResponseContentType = "application/vnd.gitlab-workhorse+json"
Custom content type for API responses, to catch routing / programming mistakes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
func NewAPI ¶
func NewAPI(myURL *url.URL, version, secretPath string, roundTripper *badgateway.RoundTripper) *API
func (*API) PreAuthorizeHandler ¶
func (api *API) PreAuthorizeHandler(h HandleFunc, suffix string) http.Handler
type HandleFunc ¶
type HandleFunc func(http.ResponseWriter, *http.Request, *Response)
type Response ¶
type Response struct {
// GL_ID is an environment variable used by gitlab-shell hooks during 'git
// push' and 'git pull'
GL_ID string
// RepoPath is the full path on disk to the Git repository the request is
// about
RepoPath string
// StoreLFSPath is provided by the GitLab Rails application
// to mark where the tmp file should be placed
StoreLFSPath string
// LFS object id
LfsOid string
// LFS object size
LfsSize int64
// TmpPath is the path where we should store temporary files
// This is set by authorization middleware
TempPath string
// Archive is the path where the artifacts archive is stored
Archive string `json:"archive"`
// Entry is a filename inside the archive point to file that needs to be extracted
Entry string `json:"entry"`
}
Click to show internal directories.
Click to hide internal directories.