types

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Golang structs for scw commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// Exec executes the command
	Exec func(cmd *Command, args []string)

	// Usage is the one-line usage message.
	UsageLine string

	// Description is the description of the command
	Description string

	// Help is the full description of the command
	Help string

	// Examples are some examples of the command
	Examples string

	// Flag is a set of flags specific to this command.
	Flag flag.FlagSet

	// Hidden is a flat to hide command from global help commands listing
	Hidden bool

	// API is the interface used to communicate with Scaleway's API
	API *api.ScalewayAPI
}

Command is a Scaleway command

func (*Command) ExamplesHelp

func (c *Command) ExamplesHelp() string

ExamplesHelp returns a string describing examples of the command

func (*Command) Name

func (c *Command) Name() string

Name returns the command's name

func (*Command) Options

func (c *Command) Options() string

Options returns a string describing options of the command

func (*Command) PrintShortUsage

func (c *Command) PrintShortUsage()

PrintShortUsage prints a short command usage and exits

func (*Command) PrintUsage

func (c *Command) PrintUsage()

PrintUsage prints a full command usage and exits

Jump to

Keyboard shortcuts

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