execute

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package execute abstracts methods, providing a standardised way to trigger methods and provide values

Index

Constants

View Source
const CombinedType = "combined"

CombinedType is the type of the CombinedExecute; designed to link together multiple executers and to provide a simplified single entry point

Variables

This section is empty.

Functions

This section is empty.

Types

type CombinedExecute

type CombinedExecute struct {
	Executers []Executer
}

CombinedExecute is an executer that contains subexecuters that it will forward method requests to; designed to link together multiple executers and to provide a simplified single entry point

func (*CombinedExecute) ExecuteWithValue

func (e *CombinedExecute) ExecuteWithValue(method *config.Method, value string) (string, error)

ExecuteWithValue takes in a method and a value to pass, it will look at the stored sub executers and decide which executer to use for the method provided

func (*CombinedExecute) GetType

func (e *CombinedExecute) GetType() string

GetType returns the CombinedExecute type

type Executer

type Executer interface {
	ExecuteWithValue(method *config.Method, value string) (string, error)
	GetType() string
}

Executer interface provides methods for executing user logic with a value passed through to it

Directories

Path Synopsis
Package http handles interactions over HTTP
Package http handles interactions over HTTP
Package shell handles interactions with the OS shell
Package shell handles interactions with the OS shell

Jump to

Keyboard shortcuts

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