Documentation
¶
Index ¶
- Constants
- func AddAllFlags(fset *flag.FlagSet) (debug *bool, projectDir *string, godelConfig *string, config *string)
- func AddAllFlagsPtrs(fset *flag.FlagSet, debug *bool, projectDir *string, godelConfig *string, ...)
- func AddAllPFlags(fset *pflag.FlagSet) (debug *bool, projectDir *string, godelConfig *string, config *string, ...)
- func AddAllPFlagsPtrs(fset *pflag.FlagSet, debug *bool, projectDir *string, godelConfig *string, ...)
- func AddAssetsPFlag(fset *pflag.FlagSet) *[]string
- func AddAssetsPFlagPtr(fset *pflag.FlagSet, assets *[]string)
- func AddConfigFlag(fset *flag.FlagSet) *string
- func AddConfigFlagPtr(fset *flag.FlagSet, config *string)
- func AddConfigPFlag(fset *pflag.FlagSet) *string
- func AddConfigPFlagPtr(fset *pflag.FlagSet, config *string)
- func AddDebugFlag(fset *flag.FlagSet) *bool
- func AddDebugFlagPtr(fset *flag.FlagSet, debug *bool)
- func AddDebugPFlag(fset *pflag.FlagSet) *bool
- func AddDebugPFlagPtr(fset *pflag.FlagSet, debug *bool)
- func AddGodelConfigFlag(fset *flag.FlagSet) *string
- func AddGodelConfigFlagPtr(fset *flag.FlagSet, godelConfig *string)
- func AddGodelConfigPFlag(fset *pflag.FlagSet) *string
- func AddGodelConfigPFlagPtr(fset *pflag.FlagSet, godelConfig *string)
- func AddProjectDirFlag(fset *flag.FlagSet) *string
- func AddProjectDirFlagPtr(fset *flag.FlagSet, projectDir *string)
- func AddProjectDirPFlag(fset *pflag.FlagSet) *string
- func AddProjectDirPFlagPtr(fset *pflag.FlagSet, projectDir *string)
- func CobraInfoCmd(info Info) *cobra.Command
- func InfoCmd(osArgs []string, stdout io.Writer, info Info) bool
- type GlobalFlagOptions
- type GlobalFlagOptionsParam
- func GlobalFlagOptionsParamConfigFlag(configFlag string) GlobalFlagOptionsParam
- func GlobalFlagOptionsParamDebugFlag(debugFlag string) GlobalFlagOptionsParam
- func GlobalFlagOptionsParamGodelConfigFlag(godelConfigFlag string) GlobalFlagOptionsParam
- func GlobalFlagOptionsParamProjectDirFlag(projectDirFlag string) GlobalFlagOptionsParam
- type Info
- type TaskInfo
- type TaskInfoParam
- type VerifyFlag
- type VerifyOptions
- type VerifyOptionsParam
Constants ¶
const ( // DebugFlagName is the name of the boolean flag that will be provided as "--<DebugFlagName>" if "debug" is true. DebugFlagName = "debug" // ProjectDirFlagName is the name of the string flag that is provided as "--<ProjectDirFlagName> <dir>", where // "<dir>" is the // path to the project directory. ProjectDirFlagName = "project-dir" // GodelConfigFlagName is the name of the string flag that is provided as "--<GodelConfigFlagName> <config>", where // "<config>" is the path to the configuration file for gödel. GodelConfigFlagName = "godel-config" // ConfigFlagName is the name of the string flag that is provided as "--<ConfigFlagName> <config>", where "<config>" // is the path to the configuration file for the plugin. ConfigFlagName = "config" // AssetsFlagName is the name of the assets flag that is provided as "--<AssetsFlagName> <assets>", where "<assets>" // is a comma-delimited list of the paths to the assets for the plugin. AssetsFlagName = "assets" )
const ( CurrentSchemaVersion = "1" InfoCommandName = "_godelPluginInfo" )
Variables ¶
This section is empty.
Functions ¶
func AddAllFlags ¶
func AddAllFlagsPtrs ¶
func AddAllPFlags ¶
func AddAllPFlagsPtrs ¶
func AddAssetsPFlag ¶
func AddAssetsPFlagPtr ¶
func AddConfigFlag ¶
func AddConfigFlagPtr ¶
func AddConfigPFlag ¶
func AddConfigPFlagPtr ¶
func AddDebugFlag ¶
func AddDebugFlagPtr ¶
func AddDebugPFlag ¶
func AddDebugPFlagPtr ¶
func AddGodelConfigFlag ¶
func AddGodelConfigFlagPtr ¶
func AddGodelConfigPFlag ¶
func AddGodelConfigPFlagPtr ¶
func AddProjectDirFlag ¶
func AddProjectDirFlagPtr ¶
func AddProjectDirPFlag ¶
func AddProjectDirPFlagPtr ¶
func CobraInfoCmd ¶
Types ¶
type GlobalFlagOptions ¶
type GlobalFlagOptions interface {
DebugFlag() string
ProjectDirFlag() string
GodelConfigFlag() string
ConfigFlag() string
// contains filtered or unexported methods
}
GlobalFlagOptions is a JSON-serializable interface that can be translated into a godellauncher.GlobalFlagOptions. See godellauncher.GlobalFlagOptions for documentation.
func NewGlobalFlagOptions ¶
func NewGlobalFlagOptions(params ...GlobalFlagOptionsParam) GlobalFlagOptions
type GlobalFlagOptionsParam ¶
type GlobalFlagOptionsParam interface {
// contains filtered or unexported methods
}
func GlobalFlagOptionsParamConfigFlag ¶
func GlobalFlagOptionsParamConfigFlag(configFlag string) GlobalFlagOptionsParam
func GlobalFlagOptionsParamDebugFlag ¶
func GlobalFlagOptionsParamDebugFlag(debugFlag string) GlobalFlagOptionsParam
func GlobalFlagOptionsParamGodelConfigFlag ¶
func GlobalFlagOptionsParamGodelConfigFlag(godelConfigFlag string) GlobalFlagOptionsParam
func GlobalFlagOptionsParamProjectDirFlag ¶
func GlobalFlagOptionsParamProjectDirFlag(projectDirFlag string) GlobalFlagOptionsParam
type Info ¶
type Info interface {
// PluginSchemaVersion returns the schema version for the plugin.
PluginSchemaVersion() string
// ID returns the identifier for a plugin and is a string of the form "group:product:version".
ID() string
// ConfigFileName returns the name of the configuration file used by the plugin.
ConfigFileName() string
// Tasks returns the tasks provided by the plugin. Requires the path to the plugin executable and assets as input.
Tasks(pluginExecPath string, assets []string) []godellauncher.Task
// contains filtered or unexported methods
}
Info specifies the information for a plugin and the tasks that it provides.
func InfoFromPlugin ¶
InfoFromPlugin returns the Info for the plugin at the specified path. Does so by invoking the InfoCommand on the plugin and parsing the output.
func MustNewInfo ¶
MustNewInfo returns the result of calling NewInfo with the provided parameters. Panics if the call to NewInfo returns an error, so this function should only be used when the inputs are static and known to be valid.
type TaskInfo ¶
type TaskInfo interface {
Name() string
Description() string
Command() []string
GlobalFlagOptions() GlobalFlagOptions
VerifyOptions() VerifyOptions
// contains filtered or unexported methods
}
TaskInfo is a JSON-serializable interface that can be translated into a godellauncher.Task. Refer to that struct for field documentation.
func MustNewTaskInfo ¶
func MustNewTaskInfo(name, description string, params ...TaskInfoParam) TaskInfo
func NewTaskInfo ¶
func NewTaskInfo(name, description string, params ...TaskInfoParam) (TaskInfo, error)
type TaskInfoParam ¶
type TaskInfoParam interface {
// contains filtered or unexported methods
}
func TaskInfoCommand ¶
func TaskInfoCommand(command ...string) TaskInfoParam
func TaskInfoGlobalFlagOptions ¶
func TaskInfoGlobalFlagOptions(globalFlagOpts GlobalFlagOptions) TaskInfoParam
func TaskInfoVerifyOptions ¶
func TaskInfoVerifyOptions(verifyOpts VerifyOptions) TaskInfoParam
type VerifyFlag ¶
type VerifyFlag interface {
Name() string
Description() string
Type() godellauncher.FlagType
// contains filtered or unexported methods
}
VerifyFlag is a JSON-serializable interface that can be translated into a godellauncher.VerifyFlag. Refer to that struct for field documentation.
func NewVerifyFlag ¶
func NewVerifyFlag(name, description string, typ godellauncher.FlagType) VerifyFlag
type VerifyOptions ¶
type VerifyOptions interface {
VerifyTaskFlags() []VerifyFlag
Ordering() *int
ApplyTrueArgs() []string
ApplyFalseArgs() []string
// contains filtered or unexported methods
}
VerifyOptions is a JSON-serializable interface that can be translated into a godellauncher.VerifyOptions. Refer to that struct for field documentation.
func NewVerifyOptions ¶
func NewVerifyOptions(params ...VerifyOptionsParam) VerifyOptions
type VerifyOptionsParam ¶
type VerifyOptionsParam interface {
// contains filtered or unexported methods
}
func VerifyOptionsApplyFalseArgs ¶
func VerifyOptionsApplyFalseArgs(args ...string) VerifyOptionsParam
func VerifyOptionsApplyTrueArgs ¶
func VerifyOptionsApplyTrueArgs(args ...string) VerifyOptionsParam
func VerifyOptionsOrdering ¶
func VerifyOptionsOrdering(ordering *int) VerifyOptionsParam
func VerifyOptionsTaskFlags ¶
func VerifyOptionsTaskFlags(flags ...VerifyFlag) VerifyOptionsParam