cmdrunner

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GitCommit string

Functions

func RegisterPostProc

func RegisterPostProc(name string, pp func(s string) (rv string, err error))

func RunCmdClosure

func RunCmdClosure(cmdName string, params []string) func(w http.ResponseWriter, r *http.Request)

func RunCmdImpl

func RunCmdImpl(cmdName string, argList, values []string) (out string, err error)

func RunCmdInternal

func RunCmdInternal(cmdName string, params []string) (out string, status int, err error)

func Setup

func Setup(cfg *RunCmdConfigType, dbf map[string]bool, lfp *os.File, gt string)

-------------------------------------------------------------------------------------------------------------------------------------------------------------

func SetupEndpoints

func SetupEndpoints(mux *ymux.ServeMux)

Types

type RunCmdConfigType

type RunCmdConfigType struct {
	Commands map[string]map[string]string `json:"run_cmd"`
}

-------------------------------------------------------------------------------------------------------------------------------------------------------------

, "run_cmd": {
	  "poipoi": {
			"_api_": "/v1/run"
			"_cmd_": "./bin/test-poipoi.sh"
			,"_params_": "in,out,data"
			, "in": "{{.in}}"
			, "out": "{{.out}}"
			, "data": "{{.data}}"
		}
}

Jump to

Keyboard shortcuts

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