Documentation
¶
Overview ¶
Package forklift provides the core functionality of the forklift tool
Index ¶
- Constants
- func CompareCachedPkgs(p, q CachedPkg) int
- func CompareCachedRepoPaths(r, s CachedRepo) int
- func CompareCachedRepos(r, s CachedRepo) int
- func CompareVersionedRepos(r, s VersionedRepo) int
- func DeplsFS(envFS fs.FS) (fs.FS, error)
- func ShortCommit(commit string) string
- func ToTimestamp(t time.Time) string
- func VersionedReposFS(envFS fs.FS) (fs.FS, error)
- type CachedPkg
- type CachedRepo
- type Depl
- type DeplConfig
- type ListenerResource
- type NetworkResource
- type PkgConfig
- type PkgDeplSpec
- type PkgFeatureSpec
- type PkgHostSpec
- type PkgMaintainer
- type PkgSpec
- type ProvidedResources
- type RepoConfig
- type RepoSpec
- type RepoVersionConfig
- type RepoVersionLock
- type RequiredResources
- type ServiceResource
- type VersionedPkg
- type VersionedRepo
Constants ¶
View Source
const Timestamp = "20060102150405"
Variables ¶
This section is empty.
Functions ¶
func CompareCachedPkgs ¶
func CompareCachedRepoPaths ¶
func CompareCachedRepoPaths(r, s CachedRepo) int
func CompareCachedRepos ¶
func CompareCachedRepos(r, s CachedRepo) int
func CompareVersionedRepos ¶
func CompareVersionedRepos(r, s VersionedRepo) int
func ShortCommit ¶
func ToTimestamp ¶
Types ¶
type CachedPkg ¶
type CachedPkg struct { Repo CachedRepo Path string PkgSubdir string ConfigPath string Config PkgConfig }
func FindCachedPkg ¶
func ListVersionedPkgs ¶
func ListVersionedPkgs(cacheFS fs.FS, repos []VersionedRepo) ([]CachedPkg, error)
type CachedRepo ¶
type CachedRepo struct { VCSRepoPath string Version string RepoSubdir string ConfigPath string Config RepoConfig }
func FindCachedRepo ¶
func ListCachedRepos ¶
func ListCachedRepos(cacheFS fs.FS) ([]CachedRepo, error)
func LoadCachedRepo ¶
func LoadCachedRepo(cacheFS fs.FS, repoConfigFilePath string) (CachedRepo, error)
func (CachedRepo) FromSameVCSRepo ¶
func (r CachedRepo) FromSameVCSRepo(cr CachedRepo) bool
type Depl ¶
type Depl struct { Name string Config DeplConfig Pkg VersionedPkg }
func (*Depl) DisabledFeatures ¶
func (d *Depl) DisabledFeatures( all map[string]PkgFeatureSpec, ) (disabled map[string]PkgFeatureSpec, err error)
func (*Depl) EnabledFeatures ¶
func (d *Depl) EnabledFeatures( all map[string]PkgFeatureSpec, ) (enabled map[string]PkgFeatureSpec, err error)
type DeplConfig ¶
type ListenerResource ¶
type NetworkResource ¶
type PkgConfig ¶
type PkgConfig struct { Package PkgSpec `yaml:"package"` Host PkgHostSpec `yaml:"host"` Deployment PkgDeplSpec `yaml:"deployment"` Features map[string]PkgFeatureSpec `yaml:"features"` }
type PkgDeplSpec ¶
type PkgDeplSpec struct { Name string `yaml:"name"` DefinitionFile string `yaml:"definition-file"` Requires RequiredResources `yaml:"requires"` Provides ProvidedResources `yaml:"provides"` }
func (PkgDeplSpec) DefinesStack ¶
func (s PkgDeplSpec) DefinesStack() bool
type PkgFeatureSpec ¶
type PkgFeatureSpec struct { Description string `yaml:"description"` Requires RequiredResources `yaml:"requires"` Provides ProvidedResources `yaml:"provides"` }
type PkgHostSpec ¶
type PkgHostSpec struct {
Provides ProvidedResources `yaml:"provides"`
}
type PkgMaintainer ¶
type PkgSpec ¶
type PkgSpec struct { Description string `yaml:"description"` Maintainers []PkgMaintainer `yaml:"maintainers"` License string `yaml:"license"` LicenseFile string `yaml:"license-file"` Sources []string `yaml:"sources"` }
type ProvidedResources ¶
type ProvidedResources struct { Listeners []ListenerResource `yaml:"listeners"` Networks []NetworkResource `yaml:"networks"` Services []ServiceResource `yaml:"services"` }
type RepoConfig ¶
type RepoConfig struct {
Repository RepoSpec `yaml:"repository"`
}
type RepoVersionConfig ¶
type RepoVersionConfig struct {
Release string `yaml:"release"`
}
type RepoVersionLock ¶
type RepoVersionLock struct { Version string `yaml:"version"` Timestamp string `yaml:"timestamp"` Commit string `yaml:"commit"` }
func (RepoVersionLock) IsCommitLocked ¶
func (l RepoVersionLock) IsCommitLocked() bool
func (RepoVersionLock) IsVersion ¶
func (l RepoVersionLock) IsVersion() bool
func (RepoVersionLock) ParseVersion ¶
func (l RepoVersionLock) ParseVersion() (semver.Version, error)
func (RepoVersionLock) Pseudoversion ¶
func (l RepoVersionLock) Pseudoversion() (string, error)
func (RepoVersionLock) ShortCommit ¶
func (l RepoVersionLock) ShortCommit() string
type RequiredResources ¶
type RequiredResources struct { Networks []NetworkResource `yaml:"networks"` Services []ServiceResource `yaml:"services"` }
type ServiceResource ¶
type VersionedPkg ¶
type VersionedPkg struct { Path string Repo VersionedRepo Cached CachedPkg }
func LoadVersionedPkg ¶
func LoadVersionedPkg(reposFS, cacheFS fs.FS, pkgPath string) (VersionedPkg, error)
type VersionedRepo ¶
type VersionedRepo struct { VCSRepoPath string RepoSubdir string Config RepoVersionConfig Lock RepoVersionLock }
func ListVersionedRepos ¶
func ListVersionedRepos(envFS fs.FS) ([]VersionedRepo, error)
func LoadVersionedRepo ¶
func LoadVersionedRepo(reposFS fs.FS, repoPath string) (VersionedRepo, error)
func (VersionedRepo) Path ¶
func (r VersionedRepo) Path() string
func (VersionedRepo) Version ¶
func (r VersionedRepo) Version() (string, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.