2020-08-11 16:51:58 +01:00
|
|
|
// Package build is for building source into a package
|
2021-10-02 19:55:07 +03:00
|
|
|
package build // import "go.unistack.org/micro/v3/build"
|
2020-08-11 16:51:58 +01:00
|
|
|
|
|
|
|
// Build is an interface for building packages
|
|
|
|
type Build interface {
|
|
|
|
// Package builds a package
|
|
|
|
Package(name string, src *Source) (*Package, error)
|
|
|
|
// Remove removes the package
|
|
|
|
Remove(*Package) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Source is the source of a build
|
|
|
|
type Source struct {
|
|
|
|
// Path to the source if local
|
|
|
|
Path string
|
|
|
|
// Language is the language of code
|
|
|
|
Language string
|
|
|
|
// Location of the source
|
|
|
|
Repository string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Package is packaged format for source
|
|
|
|
type Package struct {
|
2021-03-06 19:45:13 +03:00
|
|
|
// Source of the package
|
|
|
|
Source *Source
|
2020-08-11 16:51:58 +01:00
|
|
|
// Name of the package
|
|
|
|
Name string
|
|
|
|
// Location of the package
|
|
|
|
Path string
|
|
|
|
// Type of package e.g tarball, binary, docker
|
|
|
|
Type string
|
|
|
|
}
|