Documentation
¶
Index ¶
Constants ¶
View Source
const ( RepoFile = "kerria.repo.yaml" RepoKind = "Repository" )
Variables ¶
View Source
var ( HashAlgorithms = map[string]HashAlgorithm{ "md5": MD5, "sha1": SHA1, "sha256": SHA256, "sha512": SHA512, } HashAlgorithmsReverse map[HashAlgorithm]string )
View Source
var ( ProcessorStages = map[string]ProcessorStage{ "None": StageNone, "PreBuild": StagePreBuild, "PostBuild": StagePostBuild, } ProcessorStagesReverse map[ProcessorStage]string )
Functions ¶
Types ¶
type BuildStatus ¶
type BuildStatus struct {
ID int
Timestamp time.Time
DiscoHash []byte
DiscoHashType HashAlgorithm
DiscoPath string
BuildHash []byte
BuildHashType HashAlgorithm
BuildPath string
}
type HashAlgorithm ¶
type HashAlgorithm int
const ( MD5 HashAlgorithm = iota SHA1 SHA256 SHA512 LockFile = "kerria.lock.yaml" LockKind = "Lockfile" )
type Lockfile ¶
type Lockfile struct {
Name string
DefaultHash HashAlgorithm
Builds []*BuildStatus
}
func LockfileFromAPI ¶
LockfileFromAPI converts the latest API into the internal representation
func ReadLockfile ¶
func ReadLockfileWithPath ¶
func (*Lockfile) WriteWithPath ¶
type Processor ¶
type Processor struct {
ID int
Name string
Stage ProcessorStage
Properties interface{}
Image string
Network bool
StorageMounts []*StorageMount
Env []string
}
type ProcessorStage ¶
type ProcessorStage int
const ( StageNone ProcessorStage = iota StagePreBuild StagePostBuild )
type Repository ¶
type Repository struct {
Name string
GitRoot string
RepoRoot string
KustomizeFlags []string
BuildPath string
Sources []*Source
Processors []*Processor
}
func ReadRepository ¶
func ReadRepository() (*Repository, error)
func ReadRepositoryWithPath ¶
func ReadRepositoryWithPath(path string) (*Repository, error)
func RepositoryFromAPI ¶
func RepositoryFromAPI(apiRepo *v1alpha1.Repository) (*Repository, error)
RepositoryFromAPI converts the latest API into the internal representation
Click to show internal directories.
Click to hide internal directories.