pkgman

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PackageDirectory = ".flmod"
View Source
const PkgFile = "flare.yaml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	// Url is the package repository url
	Url string `yaml:"url"`

	// Author is the author of the package
	Author string `yaml:"-"`
	// Package is the name of the package
	Package string `yaml:"-"`
	// Version is the version of the package
	Version string `yaml:"version"`
}

Package represents a package in the package manager

type PackageManager

type PackageManager struct {
	PackageName   string         `yaml:"packageName"`
	PackageType   Type           `yaml:"type"`
	PackageConfig map[string]any `yaml:"config"`

	Packages []*Package `yaml:"packages"`
	// contains filtered or unexported fields
}

func New

func New(root string) (*PackageManager, error)

func NewInitializer

func NewInitializer(root string) (*PackageManager, error)

func (*PackageManager) Add

func (pm *PackageManager) Add(packageUrl string) error

Add adds a package to pkg.yaml

func (*PackageManager) Download

func (pm *PackageManager) Download() error

func (*PackageManager) Remove

func (pm *PackageManager) Remove(packageUrl string) error

Remove removes a package from pkg.yaml

func (*PackageManager) Save

func (pm *PackageManager) Save() error

type Type

type Type string
const (
	TypeModule Type = "module"
	TypeCLI    Type = "cli"
	TypeWeb    Type = "web"
)

Jump to

Keyboard shortcuts

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