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 ListCourseCommand

type ListCourseCommand struct {
	// Filter by name
	Name        string
	PrettyPrint bool
}

ListCourseCommand is the command line data structure for the list action of course

func (*ListCourseCommand) RegisterFlags

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

RegisterFlags registers the command flags with the command line.

func (*ListCourseCommand) Run

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

Run makes the HTTP request corresponding to the ListCourseCommand command.

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 LoginSessionCommand

type LoginSessionCommand struct {
	PrettyPrint bool
}

LoginSessionCommand is the command line data structure for the login action of session

func (*LoginSessionCommand) RegisterFlags

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

RegisterFlags registers the command flags with the command line.

func (*LoginSessionCommand) Run

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

Run makes the HTTP request corresponding to the LoginSessionCommand command.

type PatchCourseCommand

type PatchCourseCommand struct {
	Payload     string
	ContentType string
	// The course ID
	ID          int
	PrettyPrint bool
}

PatchCourseCommand is the command line data structure for the patch action of course

func (*PatchCourseCommand) RegisterFlags

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

RegisterFlags registers the command flags with the command line.

func (*PatchCourseCommand) Run

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

Run makes the HTTP request corresponding to the PatchCourseCommand command.

type PatchRegistrationCommand

type PatchRegistrationCommand struct {
	Payload     string
	ContentType string
	// The registration ID
	ID          int
	PrettyPrint bool
}

PatchRegistrationCommand is the command line data structure for the patch action of registration

func (*PatchRegistrationCommand) RegisterFlags

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

RegisterFlags registers the command flags with the command line.

func (*PatchRegistrationCommand) Run

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

Run makes the HTTP request corresponding to the PatchRegistrationCommand 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