Documentation
¶
Overview ¶
Package file is a store in a local directory, one per installation, in the directory of its stack, next to the stack's manifest:
<root>/<stack>/installations/<name>/installation.json <root>/<stack>/installations/<name>/runs/<claim id>.json <root>/<stack>/installations/<name>/results/<result id>.json <root>/<stack>/installations/<name>/outputs/<result id>/<output>
Files are written whole, through a temporary file, and readable by their owner only.
Index ¶
- Constants
- func DefaultRoot() (string, error)
- type Store
- func (store *Store) GetInstallation(ctx context.Context, stack, name string) (storage.Installation, error)
- func (store *Store) GetOutputs(ctx context.Context, stack, name, resultID string) (map[string]string, error)
- func (store *Store) GetRun(ctx context.Context, stack, name, id string) (cnab.Claim, error)
- func (store *Store) ListInstallations(ctx context.Context, stack string) ([]storage.Installation, error)
- func (store *Store) ListResults(ctx context.Context, stack, name string) ([]cnab.Result, error)
- func (store *Store) ListRuns(ctx context.Context, stack, name string) ([]cnab.Claim, error)
- func (store *Store) SaveInstallation(ctx context.Context, installation storage.Installation) error
- func (store *Store) SaveResult(ctx context.Context, stack, name string, result cnab.Result, ...) error
- func (store *Store) SaveRun(ctx context.Context, stack, name string, run cnab.Claim) error
Constants ¶
View Source
const HomeVariable = "NEMO_HOME"
HomeVariable overrides where nemo keeps its files.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a store in a directory.
func (*Store) GetInstallation ¶
func (*Store) GetOutputs ¶
func (store *Store) GetOutputs(ctx context.Context, stack, name, resultID string) (map[string]string, error)
GetOutputs reads the files a result's outputs were written to.
func (*Store) ListInstallations ¶
func (*Store) ListResults ¶
ListResults returns the results sorted by ID, ULIDs too.
func (*Store) ListRuns ¶
ListRuns returns the claims sorted by ID: claim IDs are ULIDs, which sort by time.
func (*Store) SaveInstallation ¶
Click to show internal directories.
Click to hide internal directories.