Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NameKey is the name of the git repo target. NameKey = "name" // RemoteKey is the remote address of this git repo. RemoteKey = "remote" // CommitKey is the full commit SHA of the source to download. CommitKey = "commit" )
View Source
const (
// DepsFile is the file name that stores remote module info.
DepsFile = "isopod.deps"
)
Variables ¶
View Source
var ( // RequiredFields is the list of required fields to initialize a GitRepo target. RequiredFields = []string{NameKey, RemoteKey, CommitKey} )
View Source
var (
// Workspace is the directory that stages all Isopod-managed remote modules.
Workspace = "/tmp/isopod-workspace"
)
Functions ¶
func Load ¶
Load processes the file that stores Isopod dependencies and registers them with the module loader to support subsequent load() statements.
func NewGitRepoBuiltin ¶
NewGitRepoBuiltin creates a new git_repository built-in.
Types ¶
type AbstractDependency ¶
AbstractDependency contains the common impl of all loader.Dependency. Specifically, it offers easy parsing of
dependency_directive(foo="bar", baz="qux")
func NewAbstractDependency ¶
func NewAbstractDependency( typeStr string, requiredFields []string, kwargs []starlark.Tuple, ) (*AbstractDependency, error)
NewAbstractDependency creates a new AbstractDependency.
func (*AbstractDependency) String ¶
func (a *AbstractDependency) String() string
String implements starlark.Value.String.
func (*AbstractDependency) Type ¶
func (a *AbstractDependency) Type() string
Type implements starlark.Value.Type.
type GitCloneParams ¶
type GitCloneParams struct {
OutputDir, GitRemoteURL, GitCommitSHA string
}
GitCloneParams is used to templatize git clone command.
type GitRepo ¶
type GitRepo struct { *AbstractDependency // contains filtered or unexported fields }
GitRepo represents Isopod module source as remote git repo.
func (*GitRepo) Fetch ¶
Fetch is part of the Dependency interface. It downloads the source of this dependency.
Click to show internal directories.
Click to hide internal directories.