project

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(opts *Options) error

Exec will execute a input cmd string.

Types

type File

type File struct {
	Commands []string               `json:"commands"`
	Lables   map[string]string      `json:"labels"`
	Fields   map[string]interface{} `json:"fields"`
	Meta     struct {
		Name string
	} `json:"meta"`
}

File represents a project file.

func (*File) Empty

func (f *File) Empty() bool

Empty returns true if a file struct is empty.

type Option

type Option func(*Project)

Option configures a project option.

func Destination

func Destination(v string) Option

Destination returns an option configured with a destination value.

func Log

func Log(v *log.Logger) Option

Log returns an option configured with a log value.

func Source

func Source(v string) Option

Source returns an option configured with a source value.

type Options

type Options struct {
	Context context.Context
	Dir     string
	Env     []string
	Command string
	Stdin   io.Reader
	Stdout  io.Writer
	Stderr  io.Writer
}

Options represents execute options.

type Project

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

Project represents a project.

func New

func New(options ...Option) *Project

New create a new project with the given options.

func (*Project) Create

func (p *Project) Create() error

Create creates a new project.

Jump to

Keyboard shortcuts

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