pm

package
v0.0.0-...-8e32e10 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListOrPackage

type ListOrPackage struct {
	List    string `json:"list,omitempty" yaml:"list,omitempty"`
	Package string `json:"package,omitempty" yaml:"package,omitempty"`
}

type PackageManager

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

func NewPackageManager

func NewPackageManager() (*PackageManager, error)

func (*PackageManager) AddRepository

func (pm *PackageManager) AddRepository(index, url string) error

func (*PackageManager) GetDependencies

func (pm *PackageManager) GetDependencies(from []string, recommends bool) ([]*RPackage, *multierror.Error)

func (*PackageManager) GetRepositories

func (rh *PackageManager) GetRepositories() []*Repository

func (*PackageManager) Validate

func (pm *PackageManager) Validate() error

type RInfo

type RInfo struct {
	Name        string          `json:"name" yaml:"name"`
	Version     string          `json:"version" yaml:"version"`
	Description string          `json:"description" yaml:"description"`
	Deprecation string          `json:"deprecation,omitempty" yaml:"deprecation,omitempty"`
	Depends     []ListOrPackage `json:"depends,omitempty" yaml:"depends,omitempty"`
	Supports    []ListOrPackage `json:"supports,omitempty" yaml:"supports,omitempty"`
}

type RPDependency

type RPDependency struct {
	Package string `json:"package" yaml:"package"`
	Default string `json:"default,omitempty" yaml:"default,omitempty"`
}

type RPackage

type RPackage struct {
	Repository   *Repository    `json:"-" yaml:"-"`
	Name         string         `json:"name" yaml:"name"`
	Deprecation  string         `json:"deprecation" yaml:"deprecation"`
	Description  string         `json:"description" yaml:"description"`
	Author       string         `json:"author" yaml:"author"`
	Packager     string         `json:"packager,omitempty" yaml:"packager,omitempty"`
	License      string         `json:"license" yaml:"license"`
	Homepage     string         `json:"homepage" yaml:"homepage"`
	Repo         string         `json:"repo" yaml:"repo"`
	Provides     []string       `json:"provides" yaml:"provides"`
	Dependencies []RPDependency `json:"dependencies" yaml:"dependencies"`
	Recommends   []RPDependency `json:"recommends" yaml:"recommends"`
}

type Repository

type Repository struct {
	Info     RInfo      `json:"info" yaml:"info"`
	Packages []RPackage `json:"packages" yaml:"packages"`
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(index, list string) (*Repository, error)

func (*Repository) DumpJSON

func (r *Repository) DumpJSON() ([]byte, error)

func (*Repository) Fetch

func (r *Repository) Fetch() error

func (*Repository) GetFullURL

func (r *Repository) GetFullURL() (string, error)

func (*Repository) GetIndex

func (r *Repository) GetIndex() string

func (*Repository) GetList

func (r *Repository) GetList() string

func (*Repository) IsDependency

func (r *Repository) IsDependency() bool

func (*Repository) SetDependency

func (r *Repository) SetDependency(isDep bool)

Jump to

Keyboard shortcuts

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