Documentation
¶
Index ¶
Constants ¶
const ( RootDir = "LeafBridge" StagingDir = "Deploy" )
File path constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentDir ¶
type DeploymentDir struct {
// contains filtered or unexported fields
}
DeploymentDir is a staging directory for a deployment in LeafBridge.
func OpenDeployment ¶
func OpenDeployment(id lbdeploy.DeploymentID) (DeploymentDir, error)
OpenDeployment opens the staging directory for a deployment in LeafBridge. If the directory does not already exist, it is created.
It is the caller's responsibility to close the directory when finished with it.
func (DeploymentDir) Close ¶
func (r DeploymentDir) Close() error
Close releases any file handles or resources held by the deployment staging directory.
func (DeploymentDir) OpenPackage ¶
func (r DeploymentDir) OpenPackage(content lbdeploy.PackageContent) (PackageDir, error)
OpenPackage opens the staging directory for the given package content. If the directory does not already exist, it is created.
It is the caller's responsibility to close the directory when finished with it.
type PackageDir ¶
type PackageDir struct {
// contains filtered or unexported fields
}
PackageDir is a staging directory for a package in LeafBridge.
func (PackageDir) Close ¶
func (d PackageDir) Close() error
Close releases any file handles or resources held by the package staging directory.
func (PackageDir) FilePath ¶
func (d PackageDir) FilePath(pkg lbdeploy.Package) (string, error)
FilePath returns the absolute file path for the requested package.
It returns an error if the package file name is invalid.
func (PackageDir) OpenFile ¶
func (d PackageDir) OpenFile(pkg lbdeploy.Package) (PackageFile, error)
OpenFile opens the staging file for the given package.
It is the caller's responsibility to close the file when finished with it.
func (PackageDir) Stat ¶
Stat returns a os.FileInfo describing the package file.
type PackageFile ¶
type PackageFile struct {
Name string
Type lbdeploy.PackageType
Format lbdeploy.PackageFormat
Path string
*os.File
}
PackageFile is an open file for a package.