tree

package
v0.40.1-geaaru Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-3.0 Imports: 19 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.

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

Copyright © 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 NewCollection

func NewCollection(data *[]byte) (*pkg.Collection, error)

func ReadBuildFile

func ReadBuildFile(buildFile, definitionFile string,
	engine *render.RenderEngine,
	overrideValues map[string]interface{},
) (*specs.CompilationSpecLoad, error)

Render the build file of a package with definition.yaml file

func ReadBuildFileFromCollection

func ReadBuildFileFromCollection(buildFile, cFile string,
	engine *render.RenderEngine,
	atom *pkg.DefaultPackage,
	overrideValues map[string]interface{},
) (*specs.CompilationSpecLoad, error)

Render the build file of a package with definition.yaml file

func ReadCollectionFile

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

func ReadDefinitionFile

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

func ReadDefinitionFileAsMap

func ReadDefinitionFileAsMap(defFile string) (*map[string]interface{}, error)

func WriteDefinitionFile

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

Types

type CollectionRender

type CollectionRender struct {
	Packages []map[string]interface{} `json:"packages" yaml:"packages"`
}

func NewCollectionRender

func NewCollectionRender(data *[]byte) (*CollectionRender, error)

func ReadCollectionFileLoad

func ReadCollectionFileLoad(cFile string) (*CollectionRender, error)

func (*CollectionRender) GetPackageValues

func (c *CollectionRender) GetPackageValues(p *pkg.DefaultPackage) (*map[string]interface{}, error)

type ForestGuard

type ForestGuard struct {
	Config *cfg.LuetConfig
	Trees  []*TreeIdx
}

func NewForestGuard

func NewForestGuard(config *cfg.LuetConfig) *ForestGuard

func (*ForestGuard) LoadTrees

func (fg *ForestGuard) LoadTrees(tpaths []string) error

func (*ForestGuard) Search

func (fg *ForestGuard) Search(p string) ([]*TreeIdx, error)

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) HasPackages

func (t *TreeIdx) HasPackages() 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