commands

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MaxFileSize = 1073741824 // 1GB

MaxFileSize is the tarball file size allowed to be uploaded in bytes.

Variables

This section is empty.

Functions

func BuildFilelist

func BuildFilelist(dir string, ignores []string) (files []string, err error)

BuildFilelist builds a list of files to be tarballed, with optional ignores.

func CreateTarball

func CreateTarball(w io.Writer, filePaths []string) error

CreateTarball creates a tarball containing all the files in filePaths and writes it to w.

func NewTable

func NewTable(out io.Writer) (t *tablewriter.Table)

NewTable returns a table with sectionctl standard formatting

Types

type AccountsCmd

type AccountsCmd struct {
	List AccountsListCmd `cmd help:"List accounts on Section." default:"1"`
}

AccountsCmd manages accounts on Section

type AccountsCreateCmd

type AccountsCreateCmd struct{}

AccountsCreateCmd handles creating apps on Section

type AccountsListCmd

type AccountsListCmd struct{}

AccountsListCmd handles listing accounts on Section

func (*AccountsListCmd) Run

func (c *AccountsListCmd) Run() (err error)

Run executes the command

type AppsCmd

type AppsCmd struct {
	List   AppsListCmd   `cmd help:"List apps on Section." default:"1"`
	Info   AppsInfoCmd   `cmd help:"Show detailed app information on Section."`
	Create AppsCreateCmd `cmd help:"Create new app on Section."`
}

AppsCmd manages apps on Section

type AppsCreateCmd

type AppsCreateCmd struct{}

AppsCreateCmd handles creating apps on Section

type AppsInfoCmd

type AppsInfoCmd struct {
	AccountID     int `required short:"a"`
	ApplicationID int `required short:"i"`
}

AppsInfoCmd shows detailed information on an app running on Section

func (*AppsInfoCmd) Run

func (c *AppsInfoCmd) Run() (err error)

Run executes the command

type AppsListCmd

type AppsListCmd struct {
	AccountID int `required short:"a"`
}

AppsListCmd handles listing apps running on Section

func (*AppsListCmd) Run

func (c *AppsListCmd) Run() (err error)

Run executes the command

type DeployCmd

type DeployCmd struct {
	Debug     bool
	Directory string   `default:"."`
	ServerURL *url.URL `default:"https://aperture.section.io/new/code_upload/v1"`
}

DeployCmd handles deploying an app to Section.

func (*DeployCmd) Run

func (c *DeployCmd) Run() (err error)

Run deploys an app to Section's edge

type LoginCmd

type LoginCmd struct{}

LoginCmd handles authenticating the CLI against Section's API

func (*LoginCmd) Run

func (c *LoginCmd) Run() (err error)

Run executes the command

type VersionCmd

type VersionCmd struct{}

VersionCmd handles authenticating the CLI against Section's API

func (*VersionCmd) Run

func (c *VersionCmd) Run() (err error)

Run executes the `login` command

Jump to

Keyboard shortcuts

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