sourcesystem

package
v0.0.0-...-7f05d5b Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: MPL-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitVersionControl

type GitVersionControl struct {
	// contains filtered or unexported fields
}

GitVersionControl is the git implemenation of the SourceControlManager

func (*GitVersionControl) CloneSource

func (scm *GitVersionControl) CloneSource(repo *SourceRepository, location string) error

CloneSource implements a git shallow clone of depth 2

func (GitVersionControl) PullSource

func (scm GitVersionControl) PullSource() error

PullSource implements a simple git pull from a remote repo

func (*GitVersionControl) SourceFolderSize

func (scm *GitVersionControl) SourceFolderSize(location string) int64

SourceFolderSize will return the size of the source folder

func (*GitVersionControl) StopCloneProcess

func (scm *GitVersionControl) StopCloneProcess() error

StopCloneProcess will interrupt the clone process

type Result

type Result struct {
	Quit bool
	Err  error
}

Result is the data sent back from the clone channel

type SourceControlManager

type SourceControlManager struct {
	VersionControl VersionControl
	Log            logger.Log
	Poller         int64
}

SourceControlManager is the main system for running source control operations Poller: how many seconds to check source folder Size on clone

type SourceRepository

type SourceRepository struct {
	ProjectName    string
	SourceOrigin   string
	SourceLocation string
}

SourceRepository is the base entity for Gogetas source control management system ProjectName: Name of the source ProjectName SourceOrigin: url / origin of the source code AccessLocation: location of files when added

func (SourceRepository) SizeLimitsReached

func (repo SourceRepository) SizeLimitsReached(size int64) bool

SizeLimitsReached returns true if the repo being clone is too large for the user's payment tier

type SourceSystem

type SourceSystem interface {
	AddSource(repo *SourceRepository) error
	UpdateSource(repo *SourceRepository) error
}

SourceSystem is the base interface for Gogetas source control management system

type SystemSCM

type SystemSCM SourceControlManager

SystemSCM is a SCM that saves repositories locally on the file system

func (SystemSCM) AddSource

func (scm SystemSCM) AddSource(repo *SourceRepository) error

AddSource for SystemSCM will gather source code and then save the files to the local filesystem

func (SystemSCM) UpdateSource

func (scm SystemSCM) UpdateSource(repo *SourceRepository) error

UpdateSource for SystemSCM will find the source code location on the file system and update it

type VersionControl

type VersionControl interface {
	CloneSource(repo *SourceRepository, location string) error
	StopCloneProcess() error
	SourceFolderSize(location string) int64
	PullSource() error
}

VersionControl is the interface for specific version control integrations

Jump to

Keyboard shortcuts

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