script

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2017 License: GPL-3.0 Imports: 9 Imported by: 1

Documentation

Overview

Package script defines the structure of script files.

Index

Constants

View Source
const (
	// RoadieSchemePrefix is the prefix of roadie scheme URLs.
	RoadieSchemePrefix = "roadie://"
	// SourcePrefix defines a prefix to store source files.
	SourcePrefix = "source"
	// DataPrefix defines a prefix to store data files.
	DataPrefix = "data"
	// ResultPrefix defines a prefix to store result files.
	ResultPrefix = "result"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Script

type Script struct {
	// List of apt packages to be installed.
	APT []string `yaml:"apt,omitempty"`
	// URL to the source code.
	Source string `yaml:"source,omitempty"`
	// List of URLs to be downloaded as data files.
	Data []string `yaml:"data,omitempty"`
	// List of commands to be run.
	Run []string `yaml:"run,omitempty"`
	// URL where the computational results will be stored.
	Result string `yaml:"result,omitempty"`
	// List of glob pattern, files matches of one of them are uploaded as resuts.
	Upload []string `yaml:"upload,omitempty"`
	// List of option flags.
	Options []string `yaml:"options,omitempty"`

	// Name of this script.
	Name string `yaml:"name,omitempty"`
	// Image is a docker image name used to run this script.
	Image string `yaml:"image,omitempty"`
}

Script defines roadie's script format.

func NewScript

func NewScript(filename string) (s *Script, err error)

NewScript reads a given file and creates a new script.

func NewScriptWithArgs added in v0.4.0

func NewScriptWithArgs(filename string, args []string) (res *Script, err error)

NewScriptWithArgs loads a given script file and apply arguments.

func (*Script) String

func (s *Script) String() string

String converts this script to a string.

Jump to

Keyboard shortcuts

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