dagger

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBin added in v0.2.3

func GetBin() string

GetBin returns the path to the dagger binary.

Types

type ActionOptions

type ActionOptions struct {
	// Name of the action to be executed.
	Name string

	// Dir is the path to your cue module (the parent dir of
	// the 'cue.mod' dir that contains 'module.cue' file).
	Dir string
	// Relative path from `dir` to your plan, which is
	// expected to begin with `.` (default ".").
	Plan string
	// Disable caching when `NoCache` is set to `true`.
	NoCache bool
}

ActionOptions controls the behavior of dagger action.

func NewActionOptions

func NewActionOptions(name, dir, plan string, noCache bool) *ActionOptions

NewActionOptions creates and returns a ActionOptions struct.

type Client

type Client struct {
	// Path to the executable binary file of dagger.
	Binary string

	LogFormat string
	LogLevel  string

	genericclioptions.IOStreams
}

Client maintains dagger binary and executes dagger commands.

func NewClient

func NewClient(logFormat, logLevel string, streams genericclioptions.IOStreams) (*Client, error)

NewClient creates a customized dagger client and returns it

func NewDefaultClient

func NewDefaultClient(streams genericclioptions.IOStreams) (*Client, error)

NewDefaultClient creates a default dagger client and returns it.

func (*Client) Check

func (c *Client) Check() error

Check checks if the version of dagger binary is available.

func (*Client) CheckAndInstall

func (c *Client) CheckAndInstall() error

CheckAndInstall installs dagger if necessary.

func (*Client) Do

func (c *Client) Do(o *ActionOptions) error

Do executes a dagger do command.

Jump to

Keyboard shortcuts

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