cmd

package
Version: v0.0.0-...-9a03d5f Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const GetCmdName = "resource-get"

GetCmdName is the name of the resource-get command.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetCmd

type GetCmd struct {
	cmd.CommandBase
	// contains filtered or unexported fields
}

GetCmd provides the functionality of the resource-get command.

func NewGetCmd

func NewGetCmd(c jujuc.ContextComponent) (*GetCmd, error)

NewGetCmd creates a new GetCmd for the given hook context.

func (GetCmd) Info

func (c GetCmd) Info() *cmd.Info

Info implements cmd.Command.

func (*GetCmd) Init

func (c *GetCmd) Init(args []string) error

Init implements cmd.Command.

func (GetCmd) Run

func (c GetCmd) Run(ctx *cmd.Context) error

Run implements cmd.Command.

type HookContext

type HookContext interface {
	// Download downloads the named resource and returns
	// the path to which it was downloaded.
	Download(name string) (filePath string, _ error)
}

HookContext exposes the functionality needed by the "resource-*" hook commands.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL