dependency

package
v0.0.0-...-83f582a Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx zbcontext.Context, tt TargetType, targets []*Target) (int, error)

func Each

func Each(ctx zbcontext.Context, targets []*Target, fn TargetFunc) error

Types

type Dependency

type Dependency interface {
	Name() string
	Build(ctx zbcontext.Context) error
	Install(ctx zbcontext.Context) error
	ModTime() time.Time
	Dependencies(ctx zbcontext.Context) ([]Dependency, error)
	Buildable() bool
}

type File

type File string

func (File) Build

func (f File) Build(zbcontext.Context) error

func (File) Buildable

func (f File) Buildable() bool

func (File) Dependencies

func (f File) Dependencies(zbcontext.Context) ([]Dependency, error)

func (File) Install

func (f File) Install(zbcontext.Context) error

func (File) ModTime

func (f File) ModTime() time.Time

func (File) Name

func (f File) Name() string

type GoFile

type GoFile struct {
	BuildArgs         []string
	Path              string
	ProjectImportPath string
	// contains filtered or unexported fields
}

func NewGoFile

func NewGoFile(ctx zbcontext.Context, pkg *GoPackage, path string) *GoFile

func (*GoFile) Build

func (e *GoFile) Build(zbcontext.Context) error

func (*GoFile) Buildable

func (e *GoFile) Buildable() bool

func (*GoFile) Dependencies

func (e *GoFile) Dependencies(ctx zbcontext.Context) ([]Dependency, error)

func (*GoFile) Generate

func (e *GoFile) Generate(ctx zbcontext.Context) error

func (*GoFile) Install

func (e *GoFile) Install(zbcontext.Context) error

func (*GoFile) ModTime

func (e *GoFile) ModTime() time.Time

func (*GoFile) Name

func (e *GoFile) Name() string

type GoGenerateFile

type GoGenerateFile struct {
	GoFile  *GoFile
	Depends File
	Path    string
}

func (GoGenerateFile) Build

func (f GoGenerateFile) Build(ctx zbcontext.Context) error

func (GoGenerateFile) Buildable

func (f GoGenerateFile) Buildable() bool

func (GoGenerateFile) Dependencies

func (f GoGenerateFile) Dependencies(zbcontext.Context) ([]Dependency, error)

func (GoGenerateFile) Install

func (f GoGenerateFile) Install(ctx zbcontext.Context) error

func (GoGenerateFile) ModTime

func (f GoGenerateFile) ModTime() time.Time

func (GoGenerateFile) Name

func (f GoGenerateFile) Name() string

type GoPackage

type GoPackage struct {
	*build.Package
	Hash              *plumbing.Hash
	Path              string
	ProjectImportPath string
	// contains filtered or unexported fields
}

func (*GoPackage) Build

func (pkg *GoPackage) Build(ctx zbcontext.Context) error

func (*GoPackage) BuildArgs

func (pkg *GoPackage) BuildArgs(ctx zbcontext.Context) []string

func (*GoPackage) Buildable

func (pkg *GoPackage) Buildable() bool

func (*GoPackage) Dependencies

func (pkg *GoPackage) Dependencies(ctx zbcontext.Context) ([]Dependency, error)

func (*GoPackage) Install

func (pkg *GoPackage) Install(ctx zbcontext.Context) error

func (*GoPackage) ModTime

func (pkg *GoPackage) ModTime() time.Time

func (*GoPackage) Name

func (pkg *GoPackage) Name() string

type Target

type Target struct {
	Dependency

	RequiredBy Targets
	Data       interface{}

	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewTarget

func NewTarget(dep Dependency, req *Target) *Target

func (*Target) Done

func (t *Target) Done()

func (*Target) OnDone

func (t *Target) OnDone(fn func())

type TargetFunc

type TargetFunc func(*Target) error

type TargetType

type TargetType int
const (
	TargetBuild TargetType = iota
	TargetInstall
	TargetGenerate
)

func (TargetType) String

func (tt TargetType) String() string

type Targets

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

func (*Targets) Append

func (ts *Targets) Append(r *Targets)

func (*Targets) Insert

func (ts *Targets) Insert(t *Target) bool

func (*Targets) Range

func (ts *Targets) Range(fn TargetsRangeFunc)

func (*Targets) TopologicalSort

func (ts *Targets) TopologicalSort() []*Target

type TargetsRangeFunc

type TargetsRangeFunc func(target *Target)

Jump to

Keyboard shortcuts

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