store

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput  = errors.New("invalid input")
	ErrInvalidPath   = errors.New("invalid file path")
	ErrMissingEnvVar = errors.New("missing environment variable")
)
View Source
var (
	ErrMissingInput = errors.New("missing input")
	ErrMissingStore = errors.New("missing store")
)

Functions

func Clear

func Clear(storePath string) error

Removes all cached artifacts in the store.

func HasTarget added in v0.2.1

func HasTarget(storePath string, checksum string) (bool, error)

Return whether the store has the specified version cached.

func HasTemplate added in v0.2.1

func HasTemplate(storePath string, checksum string) (bool, error)

Return whether the store has the specified version cached.

func ListExports added in v0.3.9

func ListExports(storePath string) ([]osutil.Path, error)

ListExports lists all exported targets cached in the store.

func ListTemplates added in v0.3.9

func ListTemplates(storePath string) ([]osutil.Path, error)

ListTemplates lists all templates cached in the store.

func NewCacheTargetAction added in v0.3.0

func NewCacheTargetAction(
	_ *run.Context,
	root osutil.Path,
	artifacts []string,
	checksum string,
) (action.WithDescription[action.Function], error)

NewCacheTargetAction creates an 'action.Action' which caches the generated project artifacts in the 'gdbuild' store.

func NewCacheTemplateAction added in v0.3.0

func NewCacheTemplateAction(
	_ *run.Context,
	root osutil.Path,
	artifacts []string,
	checksum string,
) (action.WithDescription[action.Function], error)

NewCacheTemplateAction creates an 'action.Action' which caches the generated export template in the 'gdbuild' store.

func Path

func Path() (string, error)

Returns the user-configured path to the 'gdbuild' store.

func Remove

func Remove(storePath string, checksum string) error

Removes the specified version from the store.

func TargetArchive added in v0.2.1

func TargetArchive(storePath string, checksum string) (string, error)

TargetArchive returns the full path (starting with the store path) to the exported project archive within the store.

NOTE: This does *not* mean the export archive exists.

func TemplateArchive

func TemplateArchive(storePath string, checksum string) (string, error)

TemplateArchive returns the full path (starting with the store path) to the export template artifact archive within the store.

NOTE: This does *not* mean the template archive exists.

func Touch

func Touch(storePath string) error

Touch ensures a store is initialized at the specified path; no effect if it exists already.

Types

This section is empty.

Jump to

Keyboard shortcuts

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