processor

package
v0.2.8-dev Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand

func AddCommand(cmd *cobra.Command)

func AddRegistryFunction

func AddRegistryFunction(function RegistryFunction)

func Execute

func Execute()

func Initialize

func Initialize(pkg, name, version string)

func SetGenerateCommandCallback

func SetGenerateCommandCallback(callback CommandCallback)

func SetValidateCommandCallback

func SetValidateCommandCallback(callback CommandCallback)

Types

type CommandCallback

type CommandCallback func(ctx *Context)

type Config

type Config struct {
	Version    string      `json:"version"`
	Parameters []Parameter `json:"parameters"`
	Overrides  []Override  `json:"overrides"`
}

type Context

type Context struct {
	// contains filtered or unexported fields
}

func (*Context) Args

func (ctx *Context) Args() []string

func (*Context) Collector

func (ctx *Context) Collector() *marker.Collector

func (*Context) Config

func (ctx *Context) Config() Config

func (*Context) ConfigFilePath

func (ctx *Context) ConfigFilePath() string

func (*Context) Directories

func (ctx *Context) Directories() []string

func (*Context) Error

func (ctx *Context) Error(err error)

func (*Context) LoadResult

func (ctx *Context) LoadResult() *packages.LoadResult

func (*Context) ModuleRoot

func (ctx *Context) ModuleRoot() string

func (*Context) OutputPath

func (ctx *Context) OutputPath() string

func (*Context) ParameterValue

func (ctx *Context) ParameterValue(name string) (Parameter, bool)

func (*Context) Parameters

func (ctx *Context) Parameters() []Parameter

func (*Context) Registry

func (ctx *Context) Registry() *marker.Registry

func (*Context) Set

func (ctx *Context) Set(name string, value any)

func (*Context) Value

func (ctx *Context) Value(name string) (any, bool)

type Override

type Override struct {
	Package    string      `json:"package"`
	Version    string      `json:"version"`
	Parameters []Parameter `json:"parameters"`
}

type Parameter

type Parameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type RegistryFunction

type RegistryFunction func(ctx *Context) error

Jump to

Keyboard shortcuts

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