cli

package
v0.0.0-...-c283e9f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: BSD-3-Clause Imports: 62 Imported by: 2

Documentation

Index

Constants

View Source
const GistMaxSize = 195 * 1024 * 1024

Actual limit is likely ~200mb.

Variables

View Source
var ErrIncompatibleVersion = fmt.Errorf(`
Versions prior to %s cannot be updated in-place to this version of Flynn.
In order to update to this version a cluster backup/restore is required.
Please see the updating documentation at https://flynn.io/docs/production#backup/restore.
`[1:], minVersion)
View Source
var ErrInvalidCommand = errors.New("invalid command")

Functions

func Register

func Register(cmd string, f interface{}, usage string) *command

func Run

func Run(name string, args []string) error

Types

type ErrAlreadyLogged

type ErrAlreadyLogged struct {
	Err error
}

func (ErrAlreadyLogged) Error

func (e ErrAlreadyLogged) Error() string

type File

type File struct {
	Content string `json:"content"`
}

type Gist

type Gist struct {
	URL         string          `json:"html_url,omitempty"`
	Description string          `json:"description"`
	Public      bool            `json:"public"`
	Files       map[string]File `json:"files"`
	Size        int
}

func (*Gist) AddFile

func (g *Gist) AddFile(name, content string)

func (*Gist) AddLocalFile

func (g *Gist) AddLocalFile(name, filepath string) error

func (*Gist) CreateTarball

func (g *Gist) CreateTarball(path string) error

func (*Gist) Upload

func (g *Gist) Upload(log log15.Logger) error

type LogLine

type LogLine struct {
	Token   int
	Content []byte
}

type LogRing

type LogRing struct {
	// contains filtered or unexported fields
}

func NewLogRing

func NewLogRing(capacity int) *LogRing

func (*LogRing) Add

func (r *LogRing) Add(l *LogLine)

func (*LogRing) Read

func (r *LogRing) Read() []*LogLine

Jump to

Keyboard shortcuts

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