Documentation ¶
Index ¶
- Variables
- func ConfigureApp(config *pkgmirror.Config, l *goapp.Lifecycle)
- func ConfigureHttp(name string, conf *pkgmirror.GitConfig, app *goapp.App)
- func GitRewriteArchive(publicServer, path string) string
- func GitRewriteRepository(publicServer, path string) string
- func NewGitPat(hostname string) goji.Pattern
- type GitConfig
- type GitPat
- type GitService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DRUPAL_ARCHIVE = regexp.MustCompile(`https:\/\/ftp.drupal.org\/files\/projects/(.*)\.zip`) BITBUCKET_ARCHIVE = regexp.MustCompile(`http(s|):\/\/([\w-\.]+)\/([\w\.\d-]+)\/([\w-\.\d]+)\/get\/([\w]+)\.zip`) GITHUB_ARCHIVE = regexp.MustCompile(`http(s|):\/\/api\.([\w-\.]+)\/repos\/([\w\.\d-]+)\/([\w\.\d-]+)\/zipball\/([\w]+)`) GITLAB_ARCHIVE = regexp.MustCompile(`http(s|):\/\/([\w-\.]+)\/([\w-\.\d]+)\/([\w-\.\d]+)\/repository\/archive.zip\?ref=([\w]+)`) GIT_REPOSITORY = regexp.MustCompile(`^(((git|http(s|)):\/\/|git@))([\w-\.]+@|)([\w-\.]+)(\/|:)([\w-\.\/]+?)(\.git|)$`) SVN_REPOSITORY = regexp.MustCompile(`(svn:\/\/(.*)|(.*)\.svn\.(.*))`) CACHEABLE_REF = regexp.MustCompile(`([\w\d]{40}|[\w\d]+\.[\w\d]+\.[\w\d]+(-[\w\d]+|))`) IS_REF = regexp.MustCompile(`^[a-zA-Z0-9\.\-]{1,40}$`) )
Functions ¶
func GitRewriteArchive ¶
func GitRewriteRepository ¶
Types ¶
type GitService ¶
type GitService struct { DB *bolt.DB Config *GitConfig Logger *log.Entry Vault *vault.Vault StateChan chan pkgmirror.State }
func NewGitService ¶
func NewGitService() *GitService
func (*GitService) Clone ¶
func (gs *GitService) Clone(path string) error
func (*GitService) Has ¶
func (gs *GitService) Has(path string) bool
func (*GitService) Serve ¶
func (gs *GitService) Serve(state *goapp.GoroutineState) error
func (*GitService) WriteArchive ¶
func (gs *GitService) WriteArchive(w io.Writer, path, ref string) error
Click to show internal directories.
Click to hide internal directories.