Documentation ¶
Index ¶
- Constants
- func AutoInstall(cmdName, goGetPath string)
- func Clone(name string)
- func Edit(name string)
- func GoBinCommand(cmdName string) string
- func GoBinCommandText(w io.Writer, cmdName string, arguments ...string)
- func GoPath() string
- func GoServicePackagePath(name string) string
- func GoServicePath(name string) (string, error)
- func Lint(name string)
- func New(name string, options NewOptions)
- func PacePath() string
- func Path(name string)
- func Run(name string, options RunOptions)
- func SimpleExec(cmdName string, arguments ...string)
- func SimpleExecInPath(dir, cmdName string, arguments ...string)
- func Test(name string, options TestOptions)
- type NewOptions
- type RunOptions
- type TestOptions
Constants ¶
const GitLabTemplate = "git@lab.jamit.de:pace/web/service/%s.git"
GitLabTemplate git clone template for cloning repositories
const PaceBase = "lab.jamit.de/pace"
PaceBase for all go projects
const ServiceBase = "web/service"
ServiceBase for all go microservices
Variables ¶
This section is empty.
Functions ¶
func AutoInstall ¶
func AutoInstall(cmdName, goGetPath string)
AutoInstall cmdName if not installed already using go get -u goGetPath
func Edit ¶
func Edit(name string)
Edit the service with given name in favorite editor, defined by env PACE_EDITOR or EDITOR
func GoBinCommand ¶
GoBinCommand returns the path to a binary installed in the gopath
func GoBinCommandText ¶
GoBinCommandText writes the command output to the passed writer
func GoPath ¶
func GoPath() string
GoPath returns the gopath for the current system, uses GOPATH env and fallback to default go dir
func GoServicePackagePath ¶
GoServicePackagePath returns a go package path for given service name
func GoServicePath ¶
GoServicePath returns the path of the go service for given name
func PacePath ¶
func PacePath() string
PacePath returns the pace path for the current system, uses PACE_PATH env and fallback to default go dir
func Run ¶
func Run(name string, options RunOptions)
Run the service daemon for the given name or use the optional cmdname instead
func SimpleExec ¶
SimpleExec executes the command and uses the parent process STDIN,STDOUT,STDERR
func SimpleExecInPath ¶
SimpleExecInPath executes the command and uses the parent process STDIN,STDOUT,STDERR in passed dir
func Test ¶
func Test(name string, options TestOptions)
Test execute the gorich or goconvey test runners
Types ¶
type NewOptions ¶
type NewOptions struct {
RestSource string // url or path to OpenAPIv3 (json:api) specification
}
NewOptions collection of options to apply while or after the creation of the new project
type RunOptions ¶
type RunOptions struct { CmdName string // alternative name for the command of the service Args []string // rest of arguments }
RunOptions fallback cmdName and additional arguments for the run cmd
type TestOptions ¶
type TestOptions struct {
GoConvey bool
}
TestOptions options to respect when starting a test