2019-11-19 19:09:43 +03:00
|
|
|
// Package build builds a micro runtime package
|
|
|
|
package build
|
2019-05-31 02:26:34 +03:00
|
|
|
|
|
|
|
import (
|
2019-05-31 02:27:41 +03:00
|
|
|
"github.com/micro/go-micro/runtime/source"
|
2019-05-31 02:26:34 +03:00
|
|
|
)
|
|
|
|
|
2019-11-19 19:09:43 +03:00
|
|
|
// Builder builds binaries
|
|
|
|
type Builder interface {
|
|
|
|
// Build builds a package
|
|
|
|
Build(*Source) (*Package, error)
|
|
|
|
// Clean deletes the package
|
|
|
|
Clean(*Package) error
|
2019-05-31 02:26:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Source is the source of a build
|
|
|
|
type Source struct {
|
|
|
|
// Language is the language of code
|
|
|
|
Language string
|
|
|
|
// Location of the source
|
|
|
|
Repository *source.Repository
|
|
|
|
}
|
|
|
|
|
2019-11-19 19:09:43 +03:00
|
|
|
// Package is micro service package
|
|
|
|
type Package struct {
|
2019-05-31 02:26:34 +03:00
|
|
|
// Name of the binary
|
|
|
|
Name string
|
|
|
|
// Location of the binary
|
|
|
|
Path string
|
|
|
|
// Type of binary
|
|
|
|
Type string
|
|
|
|
// Source of the binary
|
|
|
|
Source *Source
|
|
|
|
}
|