Documentation ¶
Index ¶
- Constants
- Variables
- func Ready(path string) bool
- type Catalog
- func (c *Catalog) Close() error
- func (c *Catalog) Index() (uint64, error)
- func (c *Catalog) InstallRepository(name, url, branch string, force bool) (uint64, error)
- func (c *Catalog) Recipe(name string) (*recipe.Recipe, error)
- func (c *Catalog) Repositories() ([]*Repository, error)
- func (c *Catalog) Search(term string, includeDesc bool) ([]*SearchHit, error)
- func (c *Catalog) UninstallRepository(name string) (uint64, error)
- func (c *Catalog) Walk(f func(rcp *recipe.Recipe, repo *Repository, err error) error) error
- type Repository
- type SearchHit
Constants ¶
View Source
const (
// DefaultRepository is the default recipes repository short name.
DefaultRepository = "mkdeb/core"
)
Variables ¶
View Source
var ( ErrAlreadyUpToDate = errors.New("already up-to-date") ErrRecipeNotFound = errors.New("recipe not found") ErrRepositoryExist = errors.New("repository already exists") ErrRepositoryNotExist = errors.New("repository does not exist") )
Errors:
Functions ¶
Types ¶
type Catalog ¶
type Catalog struct { Path string // contains filtered or unexported fields }
Catalog is a recipes catalog.
func (*Catalog) Index ¶
Index indexes repositories recipes into the catalog.
func (*Catalog) InstallRepository ¶
InstallRepository installs a new recipes repository into the catalog.
func (*Catalog) Recipe ¶
Recipe searches the catalog for a recipe.
func (*Catalog) Repositories ¶
func (c *Catalog) Repositories() ([]*Repository, error)
Repositories returns a list of installed recipes repositories.
func (*Catalog) Search ¶
Search searches the catalog index for recipes matches.
func (*Catalog) UninstallRepository ¶
UninstallRepository uninstalls a recipes repository from the catalog.
type Repository ¶
Repository is a recipes repository.
func NewRepository ¶
func NewRepository(path, name, url, branch string) *Repository
NewRepository creates a new recipes repository instance.
func NewRepositoryFromPath ¶
func NewRepositoryFromPath(path string) (*Repository, error)
NewRepositoryFromPath creates a new recipes repository instance from an existing path.
func (*Repository) Recipe ¶
func (r *Repository) Recipe(name string) (*recipe.Recipe, error)
Recipe loads a recipe from the repository.
func (*Repository) Update ¶
func (r *Repository) Update(force bool) error
Update updates the repository from the remote.
Click to show internal directories.
Click to hide internal directories.