Documentation ¶
Overview ¶
Package launchr has application implementation.
Index ¶
- Constants
- func EnsurePath(parts ...string) error
- func Gen() int
- func GenAndExit()
- func GetFsAbsPath(fs fs.FS) string
- func NewExitError(code int, msg string) error
- func RegisterPlugin(p Plugin)
- func Run() int
- func RunAndExit()
- func SetLogger(l *Logger)
- type ActionDiscoveryPlugin
- type ActionsAlterPlugin
- type App
- type AppVersion
- type CobraPlugin
- type Command
- type Config
- type ConfigAware
- type ExitError
- type GenerateConfig
- type GeneratePlugin
- type In
- type LogLevel
- type LogOptions
- type Logger
- type ManagedFS
- type OnAppInitPlugin
- type Out
- type Plugin
- type PluginInfo
- type PluginManager
- type Service
- type ServiceInfo
- type Slog
- type Streams
- type Template
- type Terminal
- type TextPrinter
Constants ¶
const ( // PkgPath is a main module path. PkgPath = launchr.PkgPath LogLevelDisabled = launchr.LogLevelDisabled // LogLevelDisabled does never print. LogLevelDebug = launchr.LogLevelDebug // LogLevelDebug is the log level for debug. LogLevelInfo = launchr.LogLevelInfo // LogLevelInfo is the log level for info. LogLevelWarn = launchr.LogLevelWarn // LogLevelWarn is the log level for warnings. LogLevelError = launchr.LogLevelError // LogLevelError is the log level for errors. )
Variables ¶
This section is empty.
Functions ¶
func EnsurePath ¶ added in v0.0.9
EnsurePath creates all directories in the path.
func GenAndExit ¶ added in v0.16.0
func GenAndExit()
GenAndExit runs the generation and exits with a result code.
func GetFsAbsPath ¶ added in v0.0.9
GetFsAbsPath returns absolute path for an FS struct.
func NewExitError ¶ added in v0.16.4
NewExitError creates a new ExitError.
func RunAndExit ¶ added in v0.16.0
func RunAndExit()
RunAndExit runs the application and exits with a result code.
Types ¶
type ActionDiscoveryPlugin ¶ added in v0.5.4
type ActionDiscoveryPlugin = action.DiscoveryPlugin
ActionDiscoveryPlugin is an interface to implement a plugin to discover actions.
type ActionsAlterPlugin ¶ added in v0.14.0
type ActionsAlterPlugin = action.AlterActionsPlugin
ActionsAlterPlugin is in interface to implement a plugin to alter registered actions.
type CobraPlugin ¶
type CobraPlugin = launchr.CobraPlugin
CobraPlugin is an interface to implement a plugin for cobra.
type ConfigAware ¶ added in v0.1.0
type ConfigAware = launchr.ConfigAware
ConfigAware provides an interface for structs to support launchr configuration setting.
type GenerateConfig ¶ added in v0.16.3
type GenerateConfig = launchr.GenerateConfig
GenerateConfig defines generation config.
type GeneratePlugin ¶
type GeneratePlugin = launchr.GeneratePlugin
GeneratePlugin is an interface to generate supporting files before build.
type In ¶ added in v0.16.0
In is an input stream used by the app to read user input.
func NewIn ¶ added in v0.16.0
func NewIn(in io.ReadCloser) *In
NewIn returns a new In object from a io.ReadCloser.
type LogOptions ¶ added in v0.16.0
type LogOptions = launchr.LogOptions
LogOptions is a common interface to allow adjusting the logger.
type Logger ¶ added in v0.16.0
Logger is a logger and its config holder struct.
func NewConsoleLogger ¶ added in v0.16.0
NewConsoleLogger creates a default console logger.
func NewJSONHandlerLogger ¶ added in v0.16.0
NewJSONHandlerLogger creates a logger with a io.Writer and JSON output.
type OnAppInitPlugin ¶ added in v0.1.0
type OnAppInitPlugin = launchr.OnAppInitPlugin
OnAppInitPlugin is an interface to implement a plugin for app initialisation.
type PluginInfo ¶
type PluginInfo = launchr.PluginInfo
PluginInfo provides information about the plugin and is used as a unique data to indentify a plugin.
type PluginManager ¶ added in v0.0.8
type PluginManager = launchr.PluginManager
PluginManager handles plugins.
type ServiceInfo ¶ added in v0.0.8
type ServiceInfo = launchr.ServiceInfo
ServiceInfo provides service info for its initialization.
type Slog ¶ added in v0.16.0
Slog is an alias for a go structured logger [slog.Logger] to reduce visible dependencies.
type Streams ¶ added in v0.16.0
Streams is an interface which exposes the standard input and output streams.
func NoopStreams ¶ added in v0.16.0
func NoopStreams() Streams
NoopStreams provides streams like /dev/null.
func StandardStreams ¶ added in v0.16.0
func StandardStreams() Streams
StandardStreams sets a cli in, out and err streams with the standard streams.
type TextPrinter ¶ added in v0.16.0
type TextPrinter = launchr.TextPrinter
TextPrinter contains methods to print formatted text to the console or return it as a string.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
launchr
Package executes Launchr application.
|
Package executes Launchr application. |
internal
|
|
launchr
Package launchr provides common app functionality.
|
Package launchr provides common app functionality. |
pkg
|
|
action
Package action provides implementations of discovering and running actions.
|
Package action provides implementations of discovering and running actions. |
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. |
types
Package types contains launchr common types.
|
Package types contains launchr common types. |
Package plugins provides launchr core plugins.
|
Package plugins provides launchr core plugins. |
actionnaming
Package actionnaming is a plugin of launchr to adjust action ids.
|
Package actionnaming is a plugin of launchr to adjust action ids. |
actionscobra
Package actionscobra is a launchr plugin providing cobra interface to actions.
|
Package actionscobra is a launchr plugin providing cobra interface to actions. |
builder
Package builder implements launchr functionality to build itself.
|
Package builder implements launchr functionality to build itself. |
builtinprocessors
Package builtinprocessors is a plugin of launchr to provide native action processors.
|
Package builtinprocessors is a plugin of launchr to provide native action processors. |
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. |
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. |
yamldiscovery/embed
Package embed provides yaml discovery with embed actions definition.
|
Package embed provides yaml discovery with embed actions definition. |