service

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const GitLabTemplate = "git@lab.jamit.de:pace/web/service/%s.git"

GitLabTemplate git clone template for cloning repositories

View Source
const PaceBase = "lab.jamit.de/pace"

PaceBase for all go projects

View Source
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 Clone

func Clone(name string)

Clone the service into pace path

func Edit

func Edit(name string)

Edit the service with given name in favorite editor, defined by env PACE_EDITOR or EDITOR

func GoBinCommand

func GoBinCommand(cmdName string) string

GoBinCommand returns the path to a binary installed in the gopath

func GoBinCommandText

func GoBinCommandText(w io.Writer, cmdName string, arguments ...string)

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

func GoServicePackagePath(name string) string

GoServicePackagePath returns a go package path for given service name

func GoServicePath

func GoServicePath(name string) (string, error)

GoServicePath returns the path of the go service for given name

func Lint

func Lint(name string)

Lint executes golint or installes if not already installed

func New

func New(name string, options NewOptions)

New creates a new directory in the go path

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 Path

func Path(name string)

Path prints the path of the service identified by name to STDOUT

func Run

func Run(name string, options RunOptions)

Run the service daemon for the given name or use the optional cmdname instead

func SimpleExec

func SimpleExec(cmdName string, arguments ...string)

SimpleExec executes the command and uses the parent process STDIN,STDOUT,STDERR

func SimpleExecInPath

func SimpleExecInPath(dir, cmdName string, arguments ...string)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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