Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
0c813ebe
Commit
0c813ebe
authored
Dec 14, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run "go fmt" for Kamil
parent
b912293a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
helpers.go
helpers.go
+1
-1
upstream.go
upstream.go
+10
-10
No files found.
helpers.go
View file @
0c813ebe
...
@@ -11,8 +11,8 @@ import (
...
@@ -11,8 +11,8 @@ import (
"net/http"
"net/http"
"os"
"os"
"os/exec"
"os/exec"
"syscall"
"path"
"path"
"syscall"
)
)
func
fail500
(
w
http
.
ResponseWriter
,
err
error
)
{
func
fail500
(
w
http
.
ResponseWriter
,
err
error
)
{
...
...
upstream.go
View file @
0c813ebe
...
@@ -7,12 +7,12 @@ In this file we handle request routing and interaction with the authBackend.
...
@@ -7,12 +7,12 @@ In this file we handle request routing and interaction with the authBackend.
package
main
package
main
import
(
import
(
"fmt"
"log"
"log"
"net/http"
"net/http"
"net/http/httputil"
"net/http/httputil"
"net/url"
"net/url"
"strings"
"strings"
"fmt"
)
)
type
serviceHandleFunc
func
(
w
http
.
ResponseWriter
,
r
*
gitRequest
)
type
serviceHandleFunc
func
(
w
http
.
ResponseWriter
,
r
*
gitRequest
)
...
@@ -27,29 +27,29 @@ type upstream struct {
...
@@ -27,29 +27,29 @@ type upstream struct {
type
authorizationResponse
struct
{
type
authorizationResponse
struct
{
// GL_ID is an environment variable used by gitlab-shell hooks during 'git
// GL_ID is an environment variable used by gitlab-shell hooks during 'git
// push' and 'git pull'
// push' and 'git pull'
GL_ID
string
GL_ID
string
// RepoPath is the full path on disk to the Git repository the request is
// RepoPath is the full path on disk to the Git repository the request is
// about
// about
RepoPath
string
RepoPath
string
// ArchivePath is the full path where we should find/create a cached copy
// ArchivePath is the full path where we should find/create a cached copy
// of a requested archive
// of a requested archive
ArchivePath
string
ArchivePath
string
// ArchivePrefix is used to put extracted archive contents in a
// ArchivePrefix is used to put extracted archive contents in a
// subdirectory
// subdirectory
ArchivePrefix
string
ArchivePrefix
string
// CommitId is used do prevent race conditions between the 'time of check'
// CommitId is used do prevent race conditions between the 'time of check'
// in the GitLab Rails app and the 'time of use' in gitlab-workhorse.
// in the GitLab Rails app and the 'time of use' in gitlab-workhorse.
CommitId
string
CommitId
string
// StoreLFSPath is provided by the GitLab Rails application
// StoreLFSPath is provided by the GitLab Rails application
// to mark where the tmp file should be placed
// to mark where the tmp file should be placed
StoreLFSPath
string
StoreLFSPath
string
// LFS object id
// LFS object id
LfsOid
string
LfsOid
string
// LFS object size
// LFS object size
LfsSize
int64
LfsSize
int64
// TmpPath is the path where we should store temporary files
// TmpPath is the path where we should store temporary files
// This is set by authorization middleware
// This is set by authorization middleware
TempPath
string
TempPath
string
}
}
// A gitRequest is an *http.Request decorated with attributes returned by the
// A gitRequest is an *http.Request decorated with attributes returned by the
...
@@ -57,7 +57,7 @@ type authorizationResponse struct {
...
@@ -57,7 +57,7 @@ type authorizationResponse struct {
type
gitRequest
struct
{
type
gitRequest
struct
{
*
http
.
Request
*
http
.
Request
authorizationResponse
authorizationResponse
u
*
upstream
u
*
upstream
// This field contains the URL.Path stripped from RelativeUrlRoot
// This field contains the URL.Path stripped from RelativeUrlRoot
relativeURIPath
string
relativeURIPath
string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment