Documentation ¶
Index ¶
- Variables
- type Go
- func (g *Go) GetBuildCommand() *modo.Do
- func (g *Go) GetCopyDir() string
- func (g *Go) GetDownloadDir() string
- func (g *Go) GetImage() string
- func (g *Go) GetName() string
- func (g *Go) GetRunCommand() *modo.Do
- func (g *Go) GetSourceDir() string
- func (g *Go) RequiresBuild() bool
- func (g *Go) SetBuildParams(buildParams map[string]interface{}) error
- func (g *Go) SetRunEnv(env map[string]string)
- type Language
Constants ¶
This section is empty.
Variables ¶
var SupportedVendorTool = []string{
"glide",
"govendor",
}
SupportedVendorTool includes a list of supported vendor packaging tool
Functions ¶
This section is empty.
Types ¶
type Go ¶
type Go struct {
// contains filtered or unexported fields
}
Go defines a deployment helper for go cocoon.
func (*Go) GetBuildCommand ¶
GetBuildCommand will return the command to build the source code and generate a binary.
func (*Go) GetCopyDir ¶
GetCopyDir returns the location in the container where the source code will be copied to
func (*Go) GetDownloadDir ¶
GetDownloadDir returns the location to save the downloaded go cocoon code source on the connector
func (*Go) GetRunCommand ¶
GetRunCommand returns the command to start the cocoon code for this language. If DEV_RUN_ROOT_BIN env is set, it will run any ccode binary located in the mount destination.
func (*Go) GetSourceDir ¶
GetSourceDir returns the root directory of the cocoon source code in container.
func (*Go) RequiresBuild ¶
RequiresBuild returns true if cocoon codes written in go language spec a build process. During development, If DEV_RUN_ROOT_BIN env is set, it will return false as the run command will find and find the ccode binary in the repo root.
func (*Go) SetBuildParams ¶
SetBuildParams sets and validates build parameters
type Language ¶
type Language interface { // GetName returns the name of the language GetName() string // GetImage returns the docker image suitable for running the language GetImage() string // GetDownloadDir returns the directory path to store downloaded source code GetDownloadDir() string // GetCopyDir returns the path to copy the downloaded source from the // path returned by GetDownloadDir() GetCopyDir() string // GetSourceDir returns the path to the root of the downloaded source code GetSourceDir() string // RequiresBuild returns true if the language requires a build stage RequiresBuild() bool // GetBuildCommand returns the build command to run GetBuildCommand() *modo.Do // GetRunCommand returns the program execution command GetRunCommand() *modo.Do // SetBuildParams sets the build parameters required to construct the build command // returned by GetBuildCommand() SetBuildParams(map[string]interface{}) error // SetRunEnv sets the environment to apply when constructing the run/execution command // returned by GetRunCommand() SetRunEnv(env map[string]string) }
Language defines a cocoon code language and its unique deployment procedure.