filesystem

package
v0.4.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package filesystem provides file-based repositories for the infrastructure layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLockfileRepository

type FileLockfileRepository struct{}

FileLockfileRepository implements ports.LockfileRepository using the local filesystem.

func NewFileLockfileRepository

func NewFileLockfileRepository() *FileLockfileRepository

NewFileLockfileRepository creates a new FileLockfileRepository.

func (*FileLockfileRepository) Exists

func (r *FileLockfileRepository) Exists(ctx context.Context, path string) (bool, error)

Exists checks if a lockfile exists at the given path.

func (*FileLockfileRepository) Load

Load reads a lockfile from the given path.

func (*FileLockfileRepository) Save

func (r *FileLockfileRepository) Save(ctx context.Context, lockfile *entities.Lockfile, path string) error

Save writes a lockfile to the given path.

type Lockfile

type Lockfile struct {
	Generated time.Time             `yaml:"generated"`
	Plugins   map[string]PluginLock `yaml:"plugins"`
	Version   int                   `yaml:"lockfile_version"`
}

Lockfile represents the YAML structure of a lockfile.

func FromEntity

func FromEntity(entity *entities.Lockfile) *Lockfile

FromEntity converts a domain lockfile to YAML representation.

func (*Lockfile) ToEntity

func (l *Lockfile) ToEntity() *entities.Lockfile

ToEntity converts the lockfile to a domain entity.

type PluginLock

type PluginLock struct {
	Fetched   time.Time `yaml:"fetched,omitempty"`
	Modified  time.Time `yaml:"modified,omitempty"`
	Requested string    `yaml:"requested"`
	Resolved  string    `yaml:"resolved"`
	Source    string    `yaml:"source"`
	Digest    string    `yaml:"sha256"`
}

PluginLock represents a pinned plugin version in YAML.

Jump to

Keyboard shortcuts

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