mere

package module
v0.0.0-...-6ecca19 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mere

Go Report Card codecov

An experimental package manager.

mere is a work in progress package manager being built for Mere Linux, taking inspiration from pacman, apk and brew.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStoreBadGroup       = errors.New("incorrect group")
	ErrStoreBadPermissions = errors.New("incorrect permissions")
	ErrStoreIsFile         = errors.New("store is a file")
)

Functions

This section is empty.

Types

type Log

type Log struct {
	EnableDebug bool
	Output      io.Writer
}

Log provides an implementation of Logger.

func (Log) Debug

func (l Log) Debug(msg string)

func (Log) Info

func (l Log) Info(msg string)

type Logger

type Logger interface {
	Info(message string)
	Debug(message string)
}

Logger is an interface that presents only two main logging methods, Info and Debug.

type Mere

type Mere struct {
	// contains filtered or unexported fields
}

func NewMere

func NewMere(log Logger, store string) (Mere, error)

type Package

type Package struct {
	Name  string   `json:"name"`
	Deps  []string `json:"deps,omitempty"`
	Files []string `json:"files,omitempty"`
	Libs  []string `json:"libs,omitempty"`
}

Package defines the properties needed to create an individual package.

type Source

type Source struct {
	URL       string `json:"url"`
	B3Sum     string `json:"b3sum"               jsonschema:"minLength=64,maxLength=64"`
	LocalName string `json:"localName,omitempty"`
	// contains filtered or unexported fields
}

Source defines the properties needed to retrieve and validate a source file.

type Spec

type Spec struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Home        string    `json:"home"`
	Version     string    `json:"version"`
	Release     int64     `json:"release"`
	Sources     []Source  `json:"sources,omitempty"`
	BuildDeps   string    `json:"buildDeps,omitempty"`
	Build       string    `json:"build,omitempty"`
	Test        string    `json:"test,omitempty"`
	Install     string    `json:"install,omitempty"`
	Packages    []Package `json:"packages"`
	// contains filtered or unexported fields
}

Spec contains the properties needed to build one or more packages from the same source code.

func NewSpec

func NewSpec(path string, output io.Writer) (*Spec, error)

NewSpec constructs and validates new Spec structs from a given file.

func (*Spec) BuildSteps

func (s *Spec) BuildSteps() error

BuildSteps executes the build, test and install steps as defined in a package spec.

func (*Spec) Cleanup

func (s *Spec) Cleanup()

Cleanup removes the entire internal working directory.

Jump to

Keyboard shortcuts

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