cli

package
v0.0.0-...-3c3b521 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCommands

func RegisterCommands(app *cobra.Command, c *client.Client)

RegisterCommands registers the resource action CLI commands.

Types

type CreateCourseCommand

type CreateCourseCommand struct {
	Payload     string
	ContentType string
	PrettyPrint bool
}

CreateCourseCommand is the command line data structure for the create action of course

func (*CreateCourseCommand) RegisterFlags

func (cmd *CreateCourseCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*CreateCourseCommand) Run

func (cmd *CreateCourseCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the CreateCourseCommand command.

type CreateRegistrationCommand

type CreateRegistrationCommand struct {
	Payload     string
	ContentType string
	PrettyPrint bool
}

CreateRegistrationCommand is the command line data structure for the create action of registration

func (*CreateRegistrationCommand) RegisterFlags

func (cmd *CreateRegistrationCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*CreateRegistrationCommand) Run

func (cmd *CreateRegistrationCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the CreateRegistrationCommand command.

type DeleteCourseCommand

type DeleteCourseCommand struct {
	// The course ID
	ID          int
	PrettyPrint bool
}

DeleteCourseCommand is the command line data structure for the delete action of course

func (*DeleteCourseCommand) RegisterFlags

func (cmd *DeleteCourseCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*DeleteCourseCommand) Run

func (cmd *DeleteCourseCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the DeleteCourseCommand command.

type DownloadCommand

type DownloadCommand struct {
	// OutFile is the path to the download output file.
	OutFile string
}

DownloadCommand is the command line data structure for the download command.

func (*DownloadCommand) Run

func (cmd *DownloadCommand) Run(c *client.Client, args []string) error

Run downloads files with given paths.

type ListRegistrationCommand

type ListRegistrationCommand struct {
	// Filter by course
	CourseID    int
	PrettyPrint bool
}

ListRegistrationCommand is the command line data structure for the list action of registration

func (*ListRegistrationCommand) RegisterFlags

func (cmd *ListRegistrationCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*ListRegistrationCommand) Run

func (cmd *ListRegistrationCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the ListRegistrationCommand command.

type ShowCourseCommand

type ShowCourseCommand struct {
	// The course ID
	ID          int
	PrettyPrint bool
}

ShowCourseCommand is the command line data structure for the show action of course

func (*ShowCourseCommand) RegisterFlags

func (cmd *ShowCourseCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*ShowCourseCommand) Run

func (cmd *ShowCourseCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the ShowCourseCommand command.

type ShowRegistrationCommand

type ShowRegistrationCommand struct {
	// The registration ID
	ID int
	// The view used to render the registration
	View        string
	PrettyPrint bool
}

ShowRegistrationCommand is the command line data structure for the show action of registration

func (*ShowRegistrationCommand) RegisterFlags

func (cmd *ShowRegistrationCommand) RegisterFlags(cc *cobra.Command, c *client.Client)

RegisterFlags registers the command flags with the command line.

func (*ShowRegistrationCommand) Run

func (cmd *ShowRegistrationCommand) Run(c *client.Client, args []string) error

Run makes the HTTP request corresponding to the ShowRegistrationCommand command.

Jump to

Keyboard shortcuts

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