domain

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ProjectFileName = "project.yaml"
	TargetDirName   = "target"

	RepositoryRoleRelease    = "release"
	RepositoryRoleDependency = "dependency"
)

Variables

View Source
var FindProject = internalFindProject

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Classifier  string            `yaml:"classifier,omitempty"`
	Targets     []Target          `yaml:"targets,omitempty"`
	Archive     string            `yaml:"archive,omitempty"`
	Resources   []string          `yaml:"resources,omitempty"`
	Environment map[string]string `yaml:"env,omitempty"`
}

func (*Artifact) ArtifactFile

func (a *Artifact) ArtifactFile(project *Project) string

type Project

type Project struct {
	FilePath     string                `yaml:",omitempty"`
	Name         string                `yaml:"name"`
	Version      string                `yaml:"version"`
	GoVersion    string                `yaml:"go_version,omitempty"`
	Artifacts    []Artifact            `yaml:"artifacts,omitempty"`
	Repositories map[string]Repository `yaml:"repositories,omitempty"`
	Resources    []string              `yaml:"resources,omitempty"`
}

func LoadProject

func LoadProject(filepath string) (*Project, error)

func (*Project) Environment added in v1.0.3

func (project *Project) Environment() []string

func (*Project) ProjectPath

func (p *Project) ProjectPath(subdirs ...string) string

func (*Project) TargetPath

func (p *Project) TargetPath(subdirs ...string) string

type Repository

type Repository struct {
	URL      string   `yaml:"url,omitempty"`
	Group    string   `yaml:"group,omitempty"`
	Artifact string   `yaml:"artifact,omitempty"`
	File     string   `yaml:"file,omitempty"`
	Type     string   `yaml:"type,omitempty"`
	Roles    []string `yaml:"roles,omitempty"`
}

func (*Repository) HasRole added in v0.10.0

func (r *Repository) HasRole(role string) bool

type Target

type Target struct {
	Executable  string            `yaml:"executable,omitempty"`
	Package     string            `yaml:"package,omitempty"`
	Flags       string            `yaml:"flags,omitempty"`
	Environment map[string]string `yaml:"env,omitempty"`
}

type Version

type Version struct {
	Major     int
	Minor     int
	Patch     int
	Qualifier string
}

func (*Version) Parse

func (v *Version) Parse(s string) (err error)

func (*Version) ToString

func (v *Version) ToString() string

Jump to

Keyboard shortcuts

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