runkit

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decorate

func Decorate(ctx context.Context, src, dest string, runxConfig, runxDoc []byte) error

Types

type Action added in v0.0.3

type Action struct {
	ID      string     `yaml:"id" json:"id"`
	Type    ActionType `yaml:"type" json:"type"`
	Command string     `yaml:"cmd" json:"cmd,omitempty"`
	Env     []string   `yaml:"env,omitempty" json:"env,omitempty"`
}

func (Action) GetRunnable added in v0.0.3

func (action Action) GetRunnable(ref string) (*Runnable, error)

type ActionType added in v0.0.3

type ActionType string
const (
	ActionTypeRun ActionType = "run"
)

type Config added in v0.0.4

type Config struct {
	Actions []Action `yaml:"actions" json:"actions"`
}

type RunKit added in v0.0.3

type RunKit struct {
	Config Config
	Readme string
	// contains filtered or unexported fields
}

func Get added in v0.0.3

func Get(ctx context.Context, src string) (*RunKit, error)

func (*RunKit) GetRunnable added in v0.0.3

func (rk *RunKit) GetRunnable(action string) (*Runnable, error)

type Runnable added in v0.0.3

type Runnable struct {
	Command string
	Args    string
}

func GetRunnable added in v0.0.3

func GetRunnable(rk *RunKit, action string) (*Runnable, error)

func (Runnable) Run added in v0.0.3

func (r Runnable) Run(ctx context.Context) error

func (Runnable) String added in v0.0.3

func (r Runnable) String() string

type TemplateData added in v0.0.3

type TemplateData struct {
	Ref string
	Env map[string]string
}

Jump to

Keyboard shortcuts

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