Documentation
¶
Overview ¶
Package launchr has application implementation.
Index ¶
- Variables
- func Gen() int
- func RegisterPlugin(p Plugin)
- func Run() int
- func SetCustomVersion(v string)
- func ToCamelCase(s string, capFirst bool) string
- type App
- func (app *App) AddActionCommand(cmd *action.Command)
- func (app *App) Execute() int
- func (app *App) Generate() int
- func (app *App) GetActionCommands() map[string]*action.Command
- func (app *App) GetCli() cli.Cli
- func (app *App) GetWD() string
- func (app *App) Init() error
- func (app *App) Plugins() map[PluginInfo]Plugin
- func (app *App) SetCli(c cli.Cli)
- type AppVersion
- type CobraPlugin
- type GeneratePlugin
- type Plugin
- type PluginGeneratedData
- type PluginInfo
Constants ¶
This section is empty.
Variables ¶
var ( Name = "launchr" // Name - version info Version = "dev" // Version - version info CustomVersion string // CustomVersion - custom version text )
var ActionsGroup = &cobra.Group{
ID: "actions",
Title: "Actions:",
}
ActionsGroup is a cobra command group definition
Functions ¶
func SetCustomVersion ¶
func SetCustomVersion(v string)
SetCustomVersion stores custom version string for output, for example on custom build.
func ToCamelCase ¶
ToCamelCase converts a string to CamelCase
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App holds app related global variables.
func (*App) AddActionCommand ¶ added in v0.0.6
AddActionCommand adds an action to the app.
func (*App) GetActionCommands ¶ added in v0.0.6
func (*App) Plugins ¶
func (app *App) Plugins() map[PluginInfo]Plugin
Plugins returns installed app plugins.
type AppVersion ¶
AppVersion stores application version.
func (*AppVersion) String ¶
func (v *AppVersion) String() string
type CobraPlugin ¶
CobraPlugin is an interface to implement a plugin for cobra.
type GeneratePlugin ¶
type GeneratePlugin interface { Plugin Generate(buildPath string, workDir string) (*PluginGeneratedData, error) }
GeneratePlugin is an interface to generate supporting files before build.
type Plugin ¶
type Plugin interface { PluginInfo() PluginInfo InitApp(app *App) error }
Plugin is a common interface for launchr plugins.
type PluginGeneratedData ¶
type PluginGeneratedData struct {
Plugins []string
}
PluginGeneratedData is a struct containing a result information of plugin generation.
type PluginInfo ¶
PluginInfo provides information about the plugin.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
launchr
Package executes Launchr application.
|
Package executes Launchr application. |
launchr/gen
Package gen is here to provide example structure for the built app.
|
Package gen is here to provide example structure for the built app. |
pkg
|
|
action
Package action provides implementations of discovering and running actions.
|
Package action provides implementations of discovering and running actions. |
cli
Package cli implements printing functionality for CLI output.
|
Package cli implements printing functionality for CLI output. |
cli/streams
Package streams has functionality related to in/out/err streams.
|
Package streams has functionality related to in/out/err streams. |
cobraadapter
Package cobraadapter provides an adapter from launchr actions to cobra commands.
|
Package cobraadapter provides an adapter from launchr actions to cobra commands. |
driver
Package driver hold implementation for action drivers.
|
Package driver hold implementation for action drivers. |
driver/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
jsonschema
Package jsonschema has functionality related to json schema support.
|
Package jsonschema has functionality related to json schema support. |
log
Package log is meant to provide a global logger for the application and provide logging functionality interface.
|
Package log is meant to provide a global logger for the application and provide logging functionality interface. |
plugins
Package plugins provides launchr core plugins.
|
Package plugins provides launchr core plugins. |
plugins/builder
Package builder implements launchr functionality to build itself.
|
Package builder implements launchr functionality to build itself. |
plugins/verbosity
Package verbosity is a plugin of launchr to configure log level of the app.
|
Package verbosity is a plugin of launchr to configure log level of the app. |
plugins/yamldiscovery
Package yamldiscovery implements a launchr plugin to discover actions defined in yaml.
|
Package yamldiscovery implements a launchr plugin to discover actions defined in yaml. |
plugins/yamldiscovery/embed
Package embed provides yaml discovery with embed actions definition.
|
Package embed provides yaml discovery with embed actions definition. |