pkgmanager

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const LockName = "luascript-lock.json"
View Source
const ManifestName = "luascript.json"
View Source
const ModulesDir = "lua_modules"

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Root    string
	Fetcher Fetcher
	Logf    func(format string, args ...any)
}

func (*Env) Add

func (e *Env) Add(specStr, name string) error

func (*Env) Install

func (e *Env) Install() error

func (*Env) Remove

func (e *Env) Remove(name string) error

type Fetcher

type Fetcher interface {
	Fetch(spec Spec, destDir string) (commit string, err error)
}

type GitFetcher

type GitFetcher struct{}

func (GitFetcher) Fetch

func (GitFetcher) Fetch(spec Spec, destDir string) (string, error)

type Lock

type Lock struct {
	Packages map[string]LockEntry `json:"packages"`
}

func LoadLock

func LoadLock(path string) (*Lock, error)

func (*Lock) Save

func (l *Lock) Save(path string) error

type LockEntry

type LockEntry struct {
	Source string `json:"source"`
	Ref    string `json:"ref,omitempty"`
	URL    string `json:"url"`
	Commit string `json:"commit"`
}

type Manifest

type Manifest struct {
	Name         string            `json:"name"`
	Version      string            `json:"version"`
	Dependencies map[string]string `json:"dependencies"`
}

func LoadManifest

func LoadManifest(path string) (*Manifest, bool, error)

func (*Manifest) Save

func (m *Manifest) Save(path string) error

type Spec

type Spec struct {
	Source string
	Ref    string
}

func ParseSpec

func ParseSpec(s string) (Spec, error)

func (Spec) CloneURL

func (s Spec) CloneURL() string

func (Spec) DefaultName

func (s Spec) DefaultName() string

func (Spec) String

func (s Spec) String() string

Jump to

Keyboard shortcuts

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