runkit

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunxAnnotation   = "vnd.docker.reference.type"
	RunxManifestType = "runx-manifest"
	RunxConfigType   = "application/vnd.runx.config+yaml"
	RunxDocType      = "application/vnd.runx.readme+txt"
)
View Source
const (
	DefaultLocalConfigFile = ".docker/runx.yaml"
)

Variables

This section is empty.

Functions

func Decorate

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

func Image added in v0.0.13

func Image(runxConfig, runxDoc []byte) (v1.Image, *v1.Descriptor, error)

Types

type Action added in v0.0.3

type Action struct {
	ID                string            `yaml:"id" json:"id"`
	Desc              string            `yaml:"desc,omitempty" json:"desc,omitempty"`
	Type              ActionType        `yaml:"type" json:"type"`
	Command           string            `yaml:"cmd" json:"cmd,omitempty"`
	Env               []string          `yaml:"env,omitempty" json:"env,omitempty"`
	Options           []Opt             `yaml:"opts,omitempty" json:"opts,omitempty"`
	Shell             map[string]string `yaml:"shell,omitempty" json:"shell,omitempty"`
	Dockerfile        string            `yaml:"dockerfile,omitempty" json:"dockerfile,omitempty"`
	DockerfileContent string
	// contains filtered or unexported fields
}

func (*Action) GetRunnable added in v0.0.3

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

func (*Action) IsDefault added in v0.0.18

func (a *Action) IsDefault() bool

type ActionType added in v0.0.3

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

type Config added in v0.0.4

type Config struct {
	Default string   `yaml:"default,omitempty" json:"default,omitempty"`
	Actions []Action `yaml:"actions" json:"actions"`
}

type ConfigAction added in v0.0.7

type ConfigAction struct {
	Opts map[string]string `yaml:"opts,omitempty" json:"opts,omitempty"`
}

type ConfigImage added in v0.0.7

type ConfigImage struct {
	Default    string                  `yaml:"default,omitempty" json:"default,omitempty"`
	AllActions ConfigAction            `yaml:"all-actions,omitempty" json:"all-actions,omitempty"`
	Actions    map[string]ConfigAction `yaml:"actions,omitempty" json:"actions,omitempty"`
}

type Files added in v0.0.9

type Files struct {
	Files []struct {
		Name    string `yaml:"name"`
		Content string `yaml:"content"`
	} `yaml:"files"`
}

type LocalConfig added in v0.0.6

type LocalConfig struct {
	Ref    string                 `yaml:"ref,omitempty" json:"ref,omitempty"`
	Images map[string]ConfigImage `yaml:"images,omitempty" json:"images,omitempty"`
}

func GetLocalConfig added in v0.0.6

func GetLocalConfig() LocalConfig

type Opt added in v0.0.5

type Opt struct {
	Name        string   `yaml:"name" json:"name"`
	Description string   `yaml:"desc" json:"desc,omitempty"`
	NoPrompt    bool     `yaml:"no-prompt,omitempty" json:"no-prompt,omitempty"`
	Prompt      string   `yaml:"prompt,omitempty" json:"prompt,omitempty"`
	Required    bool     `yaml:"required,omitempty" json:"required,omitempty"`
	Values      []string `yaml:"values,omitempty" json:"values,omitempty"`
}

type RunKit added in v0.0.3

type RunKit struct {
	Config Config
	Readme string
	Files  map[string]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, func(), error)

type Runnable added in v0.0.3

type Runnable struct {
	Command string

	Action *Action
	// contains filtered or unexported fields
}

func (*Runnable) Run added in v0.0.3

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

func (*Runnable) SetOptionValues added in v0.0.5

func (r *Runnable) SetOptionValues(opts map[string]string) error

type TemplateData added in v0.0.3

type TemplateData struct {
	Ref        string
	Env        map[string]string
	Opts       map[string]string
	Dockerfile string
	IsTTY      bool
}

Jump to

Keyboard shortcuts

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