store

package
v0.0.0-...-7426b64 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBuildPlanFile = errs.New("no build plan file")
View Source
var ErrNoBuildScriptFile = errs.New("no buildscript file")

Functions

This section is empty.

Types

type Marker

type Marker struct {
	CommitID  string `json:"commitID"`
	Namespace string `json:"namespace"`
	Version   string `json:"version"`
}

type Store

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

Store manages the storing and loading of persistable information about the runtime

func New

func New(installPath string) *Store

func (*Store) Artifacts

func (s *Store) Artifacts() (StoredArtifactMap, error)

Artifacts loads artifact information collected during the installation. It includes the environment definition configuration and files installed for this artifact.

func (*Store) BuildEngine

func (s *Store) BuildEngine() (model.BuildEngine, error)

BuildEngine returns the runtime build engine value stored in the runtime directory

func (*Store) BuildPlan

func (s *Store) BuildPlan() (*bpModel.Build, error)

func (*Store) BuildPlanRaw

func (s *Store) BuildPlanRaw() ([]byte, error)

func (*Store) BuildScript

func (s *Store) BuildScript() (*buildscript.Script, error)

func (*Store) CommitID

func (s *Store) CommitID() (string, error)

func (*Store) DeleteArtifactStore

func (s *Store) DeleteArtifactStore(id artifact.ArtifactID) error

DeleteArtifactStore deletes the stored information for a specific artifact from the store

func (*Store) EnvDef

func (s *Store) EnvDef() (*envdef.EnvironmentDefinition, error)

func (*Store) Environ

func (s *Store) Environ(inherit bool) (map[string]string, error)

func (*Store) HasMarker

func (s *Store) HasMarker() bool

func (*Store) InstallPath

func (s *Store) InstallPath() string

InstallPath returns the installation path of the runtime

func (*Store) MarkInstallationComplete

func (s *Store) MarkInstallationComplete(commitID strfmt.UUID, namespace string) error

MarkInstallationComplete writes the installation complete marker to the runtime directory

func (*Store) MarkerIsValid

func (s *Store) MarkerIsValid(commitID strfmt.UUID) bool

MarkerIsValid checks if stored runtime is complete and can be loaded

func (*Store) Namespace

func (s *Store) Namespace() (string, error)

func (*Store) Recipe

func (s *Store) Recipe() (*inventory_models.Recipe, error)

Recipe returns the recipe the stored runtime has been built with

func (*Store) StoreArtifact

func (s *Store) StoreArtifact(artf StoredArtifact) error

func (*Store) StoreBuildEngine

func (s *Store) StoreBuildEngine(buildEngine model.BuildEngine) error

StoreBuildEngine stores the build engine value in the runtime directory

func (*Store) StoreBuildPlan

func (s *Store) StoreBuildPlan(build *bpModel.Build) error

func (*Store) StoreBuildScript

func (s *Store) StoreBuildScript(script *buildscript.Script) error

func (*Store) StoreRecipe

func (s *Store) StoreRecipe(recipe *inventory_models.Recipe) error

StoreRecipe stores a along side the stored runtime

func (*Store) UpdateEnviron

func (s *Store) UpdateEnviron(orderedArtifacts []artifact.ArtifactID) (*envdef.EnvironmentDefinition, error)

type StoredArtifact

type StoredArtifact struct {
	ArtifactID artifact.ArtifactID           `json:"artifactID"`
	Files      []string                      `json:"files"`
	Dirs       []string                      `json:"dirs"`
	EnvDef     *envdef.EnvironmentDefinition `json:"envdef"`
}

func NewStoredArtifact

func NewStoredArtifact(artifactID artifact.ArtifactID, files []string, dirs []string, envDef *envdef.EnvironmentDefinition) StoredArtifact

type StoredArtifactMap

type StoredArtifactMap = map[artifact.ArtifactID]StoredArtifact

Jump to

Keyboard shortcuts

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