store

package
v0.6.20 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPath   = errors.New("invalid file path")
	ErrMissingEnvVar = errors.New("missing environment variable")
)
View Source
var (
	ErrInvalidInput        = errors.New("invalid input")
	ErrMissingStore        = errors.New("missing store")
	ErrUnexpectedLayout    = errors.New("unexpected layout")
	ErrUnsupportedArtifact = errors.New("unsupported artifact")
)

Functions

func Add

func Add(ctx context.Context, storePath string, localArtifacts ...artifact.Local[artifact.Artifact]) error

Add caches the specified locally-available artifacts in the store.

func Clear

func Clear(storePath string) error

Removes all cached artifacts in the store.

func Executable

func Executable(storePath string, ex executable.Executable) (string, error)

Returns the full path (starting with the store path) to the *executable* file in the store.

NOTE: This does *not* mean the executable exists.

func Has

func Has(storePath string, a artifact.Artifact) (bool, error)

Return whether the store has the specified version cached.

func Path

func Path() (string, error)

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

func Remove

func Remove(storePath string, a artifact.Artifact) error

Removes the specified version from the store.

func Source

func Source(storePath string, src source.Source) (string, error)

Returns the full path (starting with the store path) to the Godot source directory in the store.

NOTE: This does *not* mean the source folder 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

type LocalEx

func Executables

func Executables(ctx context.Context, storePath string) ([]LocalEx, error)

Executables returns the list of installed Godot executables.

type LocalSrc

type LocalSrc = artifact.Local[source.Archive]

func Sources

func Sources(ctx context.Context, storePath string) ([]LocalSrc, error)

Sources returns the list of installed Godot source code versions.

Jump to

Keyboard shortcuts

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