control

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller knows how to execute the main business logic of the tool.

func New

func New(opts ...Option) *Controller

New allocates a command controller based on the provided options. The orchestrator contains the core logic of the operations that the vending tool supports. This can be used to automate vending operations without having to rely on running cobra commands.

func (*Controller) AddDependency

func (c *Controller) AddDependency(url, branch string, filters *vending.Filters) error

AddDependency adds a new dependency into the spec file.

func (*Controller) CleanCache

func (c *Controller) CleanCache() error

CleanCache performs a reset of the repository cache, once cleaned, the repositories of the dependencies will have to be cloned again.

func (*Controller) Init

func (c *Controller) Init() error

Init initializes the vending tool for the current directory. This creates a default spec in the filesystem.

func (*Controller) Install

func (c *Controller) Install() error

Install vendors the dependencies at the version specified by the lockfile. When no lockfile is present, it locks the dependencies at the latest reference of the branch that the spec defines for each dependency.

func (*Controller) Update

func (c *Controller) Update() error

Update vendors the dependencies at the latest reference from the specified branch, this updates the lockfile with the locked references for each dependency.

type Option

type Option = func(c *Controller)

Option is used to apply customizations to the Controller.

func WithPreset

func WithPreset(preset vending.Preset) Option

Jump to

Keyboard shortcuts

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