tree

package
v0.39.0-geaaru Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright © 2019-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2019-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2019-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Index

Constants

View Source
const (
	IDX_FILE = ".anise-idx.json"
)

Variables

This section is empty.

Functions

func ReadCollectionFile

func ReadCollectionFile(cFile string) (*pkg.Collection, error)

func ReadDefinitionFile

func ReadDefinitionFile(defFile string) (*pkg.DefaultPackage, error)

func WriteDefinitionFile

func WriteDefinitionFile(p pkg.Package, definitionFilePath string) error

Types

type GenOpts

type GenOpts struct {
	DryRun   bool
	OnlyMain bool
}

type TreeIdx

type TreeIdx struct {
	Map     map[string][]*TreeIdxPkg `json:"packages,omitempty" yaml:"packages,omitempty"`
	BaseDir string                   `json:"basedir,omitempty" yaml:"basedir,omitempty"`

	Compress bool   `json:"-" yaml:"-"`
	TreePath string `json:"-" yaml:"-"`
}

func NewTreeIdx

func NewTreeIdx(tpath string, compress bool) *TreeIdx

func (*TreeIdx) AddPackage

func (t *TreeIdx) AddPackage(name string, p *TreeIdxPkg)

func (*TreeIdx) DetectMode

func (t *TreeIdx) DetectMode() *TreeIdx

func (*TreeIdx) Generate

func (t *TreeIdx) Generate(treeDir string, opts *GenOpts) error

func (*TreeIdx) GetPackageVersion

func (t *TreeIdx) GetPackageVersion(name, version string) (*TreeIdxPkg, bool)

func (*TreeIdx) GetPackageVersions

func (t *TreeIdx) GetPackageVersions(name string) ([]*TreeIdxPkg, bool)

func (*TreeIdx) Merge

func (t *TreeIdx) Merge(tI *TreeIdx)

func (*TreeIdx) Read

func (t *TreeIdx) Read(treeDir string) error

func (*TreeIdx) ToJSON

func (t *TreeIdx) ToJSON() ([]byte, error)

func (*TreeIdx) ToYAML

func (t *TreeIdx) ToYAML() ([]byte, error)

func (*TreeIdx) Write

func (t *TreeIdx) Write() error

type TreeIdxPkg

type TreeIdxPkg struct {
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
	Path    string `json:"path,omitempty" yaml:"path,omitempty"`
}

Jump to

Keyboard shortcuts

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