cmd

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Closed       bool
	GistResponse map[string]interface{}
	GithubToken  string
	HomeDir      = getHome()
	Instructions []Lines
)

Setting storage.

View Source
var (
	AblyToken   = "Yn3xbQ.W4fPqA:_aZ8tpIGEPJXscWv"
	Application = "termbacktime"
	GistAPI     = "https://api.github.com/gists"
	PlaybackURL = "https://termbackti.me"
	Revision    = "0000000"
	Version     = "0.0.0"
	ConfigType  = "json"
)

Export default compile settings.

Functions

func Error

func Error(err error) error

Error stops the spinner whenever an error is thrown.

func Execute

func Execute()

Execute runs the recording function.

Types

type Gist

type Gist struct {
	Description string              `json:"description,omitempty"`
	Public      bool                `json:"public,omitempty"`
	GistFile    map[string]GistFile `json:"files,omitempty"`
}

Gist is the required structure for POST data for API purposes

type GistFile

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

GistFile is the top-level struct for a gist file

type Lines

type Lines struct {
	Time    int64    `json:"t,omitempty"`
	Command string   `json:"c,omitempty"`
	Lines   []string `json:"l,omitempty"`
	Sizes   []int    `json:"s,omitempty"`
}

Lines is an array of terminal STDOUT lines.

type Recording

type Recording struct {
	Started int64   `json:"d"`
	Title   string  `json:"t,omitempty"`
	Sizes   []int   `json:"s,omitempty"`
	Lines   []Lines `json:"r,omitempty"`
	Pack    string  `json:"p,omitemptu"`
}

Recording JSON struct for recordings.

Jump to

Keyboard shortcuts

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