tree

package
v0.2.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add added in v0.2.0

func Add(entry *Entry) error

func CreateDefault

func CreateDefault() error

func Privileged added in v0.2.0

func Privileged(path string) bool

func Store added in v0.2.0

func Store() (*storm.DB, error)

func Switch added in v0.2.0

func Switch(name string) error

Types

type Config

type Config struct {
	OS   os.OS     `pkl:"os"`
	Arch arch.Arch `pkl:"arch"`

	Security security.Mode `pkl:"security"`

	Repositories []ops.Repository `pkl:"repositories"`
}

func Load

func Load(path string) (*Config, error)

func (*Config) Platform

func (c *Config) Platform() *platform.Platform

func (*Config) Repository

func (c *Config) Repository(name string) (*ops.Repository, error)

type Entry

type Entry struct {
	Path string `storm:"id"`
	Name string `storm:"unique"`
}

func Current added in v0.2.0

func Current() (*Entry, error)

func Destroy added in v0.2.0

func Destroy(name string) (*Entry, error)

func Get added in v0.2.0

func Get(name string) (*Entry, error)

func Init added in v0.2.0

func Init(name string, path string, pltfrm *platform.Platform, createConfig bool, force bool) (*Entry, error)

func List added in v0.2.0

func List() ([]*Entry, error)

func Lookup added in v0.2.0

func Lookup(path string) (*Entry, error)

func Virtual added in v0.2.0

func Virtual() *Entry

type Tree

type Tree struct {
	*slog.Logger

	Name string
	Path string

	Config   *Config
	Platform *platform.Platform

	Cache    *cache.Cache
	Signing  *pki.Signing
	Trust    *pki.Trust
	Security security.Security
	State    *state.State
	// contains filtered or unexported fields
}

func New

func New(log *slog.Logger, name string, path string, writeable bool, cfg *Config) (*Tree, error)

func (*Tree) Lock

func (t *Tree) Lock() error

func (*Tree) Pool

func (t *Tree) Pool(platforms []*platform.Platform, empty bool, repos ...*ops.Repository) (*ops.Pool, error)

func (*Tree) Privileged added in v0.2.0

func (t *Tree) Privileged() bool

func (*Tree) Ready

func (t *Tree) Ready() bool

func (*Tree) RepoLoad

func (t *Tree) RepoLoad(platforms []*platform.Platform, repo *ops.Repository, all bool) error

func (*Tree) StateToRepo

func (t *Tree) StateToRepo() (*ops.Repository, error)

func (*Tree) Unlock

func (t *Tree) Unlock() error

type Type

type Type string
const (
	Dynamic  Type = "dynamic"
	Embedded Type = "embedded"
	Root     Type = "root"
)

Jump to

Keyboard shortcuts

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