Documentation ¶
Index ¶
- Constants
- Variables
- func GetDatabase() *sql.DB
- func Start() error
- type CopyTrigger
- type GIT2
- func (g *GIT2) CheckGitServer(ctx context.Context, req *gitpb.CheckGitRequest) (*gitpb.CheckGitResponse, error)
- func (g *GIT2) CreateRepo(ctx context.Context, req *gitpb.CreateRepoRequest) (*gitpb.SourceRepository, error)
- func (g *GIT2) DeleteRepository(ctx context.Context, req *gitpb.ByIDRequest) (*common.Void, error)
- func (g *GIT2) Fork(ctx context.Context, req *gitpb.ForkRequest) (*gitpb.SourceRepository, error)
- func (g *GIT2) GetLatestBuild(ctx context.Context, req *gitpb.ByIDRequest) (*gitpb.Build, error)
- func (g *GIT2) GetRecentBuilds(ctx context.Context, req *gitpb.ByIDRequest) (*gitpb.BuildList, error)
- func (g *GIT2) GetRepos(ctx context.Context, req *common.Void) (*gitpb.SourceRepositoryList, error)
- func (g *GIT2) GetReposTags(ctx context.Context, req *gitpb.RepoTagRequest) (*gitpb.SourceRepositoryList, error)
- func (g *GIT2) GetReposWithFilter(ctx context.Context, req *gitpb.RepoFilter) (*gitpb.SourceRepositoryList, error)
- func (g *GIT2) RepoBuilderComplete(ctx context.Context, req *gitpb.ByIDRequest) (*common.Void, error)
- func (g *GIT2) RepoByID(ctx context.Context, req *gitpb.ByIDRequest) (*gitpb.SourceRepository, error)
- func (g *GIT2) RepoByURL(ctx context.Context, req *gitpb.ByURLRequest) (*gitpb.SourceRepository, error)
- func (g *GIT2) ResetRepository(ctx context.Context, req *gitpb.ByIDRequest) (*common.Void, error)
- func (g *GIT2) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (g *GIT2) SetRepoFlags(ctx context.Context, req *gitpb.SetRepoFlagsRequest) (*common.Void, error)
- func (g *GIT2) UpdateRepoStatus(ctx context.Context, req *gitpb.UpdateRepoStatusRequest) (*gitpb.SourceRepository, error)
- type GitURL
- type HTTPRequest
- func (h *HTTPRequest) CreateRepo()
- func (h *HTTPRequest) CreateRepoWithError(requireUser bool) (*gitpb.CreateRepoLog, error)
- func (h *HTTPRequest) Error(err error)
- func (h *HTTPRequest) ErrorCode(code int, msg string)
- func (h *HTTPRequest) GetCreateLog() (*gitpb.CreateRepoLog, error)
- func (h *HTTPRequest) GetScriptDir() string
- func (h *HTTPRequest) GitRoot() string
- func (h *HTTPRequest) InvokeGitCGI(ctx context.Context)
- func (h *HTTPRequest) Printf(format string, args ...interface{})
- func (h *HTTPRequest) RecreateRepo()
- func (g *HTTPRequest) Respond(txt string)
- func (h *HTTPRequest) ServeHTTP()
- func (g *HTTPRequest) SingleHeader(name string) string
- func (h *HTTPRequest) Username() string
- func (g *HTTPRequest) Write(b []byte)
- type Repo
Constants ¶
View Source
const ( REPO_SERVICE_ID = "3539" WEB_SERVICE_ID = "145" )
View Source
const (
REPEAT_BACK_HEADER = "X-PleaseRepeatBack"
)
Variables ¶
View Source
var ( // additional (completed) repos the repobuilder service may read. For example, "skel-go" REPOBUILDER_READ = []uint64{64} )
View Source
var ( // these repos may be 'reset' back to 'bare' at any time RESETTABLE_REPOS = []uint64{216} )
Functions ¶
func GetDatabase ¶
Types ¶
type CopyTrigger ¶
type CopyTrigger struct {
// contains filtered or unexported fields
}
func (*CopyTrigger) Copy ¶
func (ct *CopyTrigger) Copy() error
func (*CopyTrigger) Debugf ¶
func (ct *CopyTrigger) Debugf(format string, args ...interface{})
func (*CopyTrigger) Errorf ¶
func (ct *CopyTrigger) Errorf(format string, args ...interface{})
type GIT2 ¶
type GIT2 struct {
// contains filtered or unexported fields
}
func (*GIT2) CheckGitServer ¶
func (g *GIT2) CheckGitServer(ctx context.Context, req *gitpb.CheckGitRequest) (*gitpb.CheckGitResponse, error)
func (*GIT2) CreateRepo ¶
func (g *GIT2) CreateRepo(ctx context.Context, req *gitpb.CreateRepoRequest) (*gitpb.SourceRepository, error)
* this creates the database entries, but not the file structure (it does not involve calling the git binary * instead it makes a call via https to the domain&path specified with a special header. * this ensures we're creating the files on a gitserver that is triggered by the url * the call is authenticated via a temporary associationtoken
func (*GIT2) DeleteRepository ¶
func (*GIT2) Fork ¶
func (g *GIT2) Fork(ctx context.Context, req *gitpb.ForkRequest) (*gitpb.SourceRepository, error)
func (*GIT2) GetLatestBuild ¶
func (*GIT2) GetRecentBuilds ¶
func (*GIT2) GetReposTags ¶
func (g *GIT2) GetReposTags(ctx context.Context, req *gitpb.RepoTagRequest) (*gitpb.SourceRepositoryList, error)
func (*GIT2) GetReposWithFilter ¶
func (g *GIT2) GetReposWithFilter(ctx context.Context, req *gitpb.RepoFilter) (*gitpb.SourceRepositoryList, error)
func (*GIT2) RepoBuilderComplete ¶
func (*GIT2) RepoByID ¶
func (g *GIT2) RepoByID(ctx context.Context, req *gitpb.ByIDRequest) (*gitpb.SourceRepository, error)
func (*GIT2) RepoByURL ¶
func (g *GIT2) RepoByURL(ctx context.Context, req *gitpb.ByURLRequest) (*gitpb.SourceRepository, error)
func (*GIT2) ResetRepository ¶
func (*GIT2) SetRepoFlags ¶
func (*GIT2) UpdateRepoStatus ¶
func (g *GIT2) UpdateRepoStatus(ctx context.Context, req *gitpb.UpdateRepoStatusRequest) (*gitpb.SourceRepository, error)
type HTTPRequest ¶
type HTTPRequest struct {
// contains filtered or unexported fields
}
func (*HTTPRequest) CreateRepo ¶
func (h *HTTPRequest) CreateRepo()
func (*HTTPRequest) CreateRepoWithError ¶
func (h *HTTPRequest) CreateRepoWithError(requireUser bool) (*gitpb.CreateRepoLog, error)
func (*HTTPRequest) Error ¶
func (h *HTTPRequest) Error(err error)
func (*HTTPRequest) ErrorCode ¶
func (h *HTTPRequest) ErrorCode(code int, msg string)
func (*HTTPRequest) GetCreateLog ¶
func (h *HTTPRequest) GetCreateLog() (*gitpb.CreateRepoLog, error)
load the createlog from url/headers
func (*HTTPRequest) GetScriptDir ¶
func (h *HTTPRequest) GetScriptDir() string
func (*HTTPRequest) GitRoot ¶
func (h *HTTPRequest) GitRoot() string
func (*HTTPRequest) InvokeGitCGI ¶
func (h *HTTPRequest) InvokeGitCGI(ctx context.Context)
func (*HTTPRequest) Printf ¶
func (h *HTTPRequest) Printf(format string, args ...interface{})
func (*HTTPRequest) RecreateRepo ¶
func (h *HTTPRequest) RecreateRepo()
func (*HTTPRequest) Respond ¶
func (g *HTTPRequest) Respond(txt string)
if all goes well send this response and repeat the header "X-PleaseRepeatBack"
func (*HTTPRequest) ServeHTTP ¶
func (h *HTTPRequest) ServeHTTP()
func (*HTTPRequest) SingleHeader ¶
func (g *HTTPRequest) SingleHeader(name string) string
get a single header from the request
func (*HTTPRequest) Username ¶
func (h *HTTPRequest) Username() string
func (*HTTPRequest) Write ¶
func (g *HTTPRequest) Write(b []byte)
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func RepoFromURL ¶
func (*Repo) AbsDirectory ¶
the absolute path to the git directory
func (*Repo) ExistsOnDisk ¶
func (*Repo) OnDiskPath ¶
Click to show internal directories.
Click to hide internal directories.