api

package
v0.0.0-...-b491a59 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	ScriptRunner Methods
	Parameter    Parameter
}

API use to expose object

func (*API) Webhook

func (api *API) Webhook(c echo.Context) error

Webhook method use for serve webhook

type Methods

type Methods interface {
	RunScript(scriptPath string) error
	CheckScriptPath(scriptPath string) (string, error)
	VerifySecretKey(secretKeyFromCommandLine, secretKey string) (bool, error)
}

Methods interface use to help passing method

type Parameter

type Parameter struct {
	ScriptPath string
	SecretKey  string
}

Parameter is struct that we use to pass parameter from command line

type ScriptRunner

type ScriptRunner struct {
}

ScriptRunner struct for run script

func (ScriptRunner) CheckScriptPath

func (s ScriptRunner) CheckScriptPath(scriptPath string) (string, error)

CheckScriptPath use to check user specify path is legal

func (ScriptRunner) RunScript

func (s ScriptRunner) RunScript(scriptPath string) error

RunScript for starting shellÎ

func (ScriptRunner) VerifySecretKey

func (s ScriptRunner) VerifySecretKey(secretKeyFromCommandLine, secretKey string) (bool, error)

VerifySecretKey use to verify hooking is legal

Jump to

Keyboard shortcuts

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