Documentation
¶
Index ¶
- Variables
- func Execute() error
- func NewCommandAddCmd() *cobra.Command
- func NewCommandCmd() *cobra.Command
- func NewCommandListCmd() *cobra.Command
- func NewCommandManageCmd() *cobra.Command
- func NewCommandRemoveCmd() *cobra.Command
- func NewCommandRenameCmd() *cobra.Command
- func NewCommandUpgradeCmd() *cobra.Command
- func NewCustomCmd(commandName string, command Command) (*cobra.Command, error)
- func NewDetailCmd() *cobra.Command
- func NewEvalCmd() *cobra.Command
- func NewFetchCmd() *cobra.Command
- func NewListCmd() *cobra.Command
- func NewQueryCmd() *cobra.Command
- func NewRunCmd() *cobra.Command
- func NewTriggerCmd() *cobra.Command
- func NewValidateCmd() *cobra.Command
- func RefreshCommands() (map[string]Command, error)
- func Run(generator internal.PageGenerator) error
- type Author
- type Command
- type CommandRemote
- type ExitCodeError
- type GithubRemote
- type LocalRemote
- type Manifest
- type Metadata
- type Output
- type ScriptRemote
- type Val
- type ValTownRemote
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "dev" Date = "unknown" )
View Source
var MetadataRegexp = regexp.MustCompile(`@(?P<key>[A-Za-z0-9]+)\s(?P<value>[\S ]+)`)
Functions ¶
func NewCommandAddCmd ¶
func NewCommandCmd ¶
func NewCommandListCmd ¶
func NewCommandManageCmd ¶
func NewCommandRemoveCmd ¶
func NewCommandRenameCmd ¶
func NewCommandUpgradeCmd ¶
func NewDetailCmd ¶
func NewEvalCmd ¶
func NewFetchCmd ¶ added in v0.9.23
func NewListCmd ¶
func NewQueryCmd ¶ added in v0.3.0
func NewTriggerCmd ¶ added in v0.9.0
func NewValidateCmd ¶ added in v0.4.1
func RefreshCommands ¶
func Run ¶ added in v0.9.23
func Run(generator internal.PageGenerator) error
Types ¶
type CommandRemote ¶
type CommandRemote interface {
GetLatestVersion() (string, error)
Download(targetDir string, version string) error
}
func GetRemote ¶
func GetRemote(origin string) (CommandRemote, error)
type ExitCodeError ¶
type ExitCodeError struct {
ExitCode int
}
func (ExitCodeError) Error ¶
func (e ExitCodeError) Error() string
type GithubRemote ¶
type GithubRemote struct {
// contains filtered or unexported fields
}
func (GithubRemote) Download ¶
func (r GithubRemote) Download(targetDir string, version string) error
func (GithubRemote) GetLatestVersion ¶
func (r GithubRemote) GetLatestVersion() (string, error)
type LocalRemote ¶
type LocalRemote struct {
// contains filtered or unexported fields
}
func (LocalRemote) GetLatestVersion ¶
func (r LocalRemote) GetLatestVersion() (string, error)
type Manifest ¶
type Manifest struct {
Origin string `json:"origin"`
Version string `json:"version"`
Root string `json:"root"`
}
func LoadManifest ¶
type Metadata ¶
type Metadata struct {
Title string `json:"title"`
Description string `json:"description,omitempty"`
Command string `json:"command,omitempty"`
SubCommands map[string]Metadata `json:"subcommands,omitempty"`
}
func ExtractMetadata ¶
func ParseCommand ¶
type ScriptRemote ¶
type ScriptRemote struct {
// contains filtered or unexported fields
}
func (ScriptRemote) Download ¶
func (r ScriptRemote) Download(targetDir string, version string) error
func (ScriptRemote) GetLatestVersion ¶
func (r ScriptRemote) GetLatestVersion() (string, error)
type Val ¶
type Val struct {
Author Author `json:"author"`
Code string `json:"code"`
Error string `json:"error"`
ID string `json:"id"`
Logs []int `json:"logs"`
Name string `json:"name"`
Output Output `json:"output"`
Public bool `json:"public"`
RunEndAt string `json:"runEndAt"`
RunStartAt string `json:"runStartAt"`
Version int `json:"version"`
}
type ValTownRemote ¶
type ValTownRemote struct {
// contains filtered or unexported fields
}
func NewValTownRemote ¶
func NewValTownRemote(origin *url.URL) (*ValTownRemote, error)
func (ValTownRemote) Download ¶
func (r ValTownRemote) Download(targetDir string, version string) error
func (ValTownRemote) FetchVal ¶
func (r ValTownRemote) FetchVal() (Val, error)
func (ValTownRemote) GetLatestVersion ¶
func (r ValTownRemote) GetLatestVersion() (string, error)
func (ValTownRemote) Val ¶
func (t ValTownRemote) Val() string
Click to show internal directories.
Click to hide internal directories.