ctlcmd

package
v0.0.0-...-55a61f8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Overview

Package ctlcmd contains the various snapctl subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(context *hookstate.Context, args []string, uid uint32) (stdout, stderr []byte, err error)

Run runs the requested command.

Types

type ForbiddenCommand

type ForbiddenCommand struct {
	Uid  uint32
	Name string
}

ForbiddenCommand contains information about an attempt to use a command in a context where it is not allowed.

func (*ForbiddenCommand) Execute

func (f *ForbiddenCommand) Execute(args []string) error

type ForbiddenCommandError

type ForbiddenCommandError struct {
	Message string
}

ForbiddenCommandError conveys that a command cannot be invoked in some context

func (ForbiddenCommandError) Error

func (f ForbiddenCommandError) Error() string

type NoAttributeError

type NoAttributeError struct {
	Attribute string
}

NoAttributeError indicates that an interface attribute is not set.

func (*NoAttributeError) Error

func (e *NoAttributeError) Error() string

type UnsuccessfulError

type UnsuccessfulError struct {
	ExitCode int
}

UnsuccessfulError carries a specific exit code to be returned to the client.

func (UnsuccessfulError) Error

func (e UnsuccessfulError) Error() string

Jump to

Keyboard shortcuts

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