Documentation
¶
Index ¶
- func ExecuteAuxiliaryMethod(ctx context.Context, module AuxiliaryMethod) (err error)
- func ExecuteCleanAuxiliaryMethod(ctx context.Context, module CleanAuxiliaryMethod) (err error)
- func ExecuteCleanMethod(ctx context.Context, module CleanExecutionMethod, execIO *ExecutionIO) (err error)
- func ExecuteMethod(ctx context.Context, module ExecutionMethod, execIO *ExecutionIO) (err error)
- type AuthOptions
- type AuxiliaryMethod
- type Clean
- type CleanAuxiliaryMethod
- type CleanExecutionMethod
- type CleanMethod
- type Cleaner
- type Client
- type ClientOptions
- type ContextOption
- type Dialer
- type ExecutionIO
- type ExecutionInput
- type ExecutionMethod
- type ExecutionOutput
- type Executor
- type Method
- type OutputProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteAuxiliaryMethod ¶
func ExecuteAuxiliaryMethod(ctx context.Context, module AuxiliaryMethod) (err error)
func ExecuteCleanAuxiliaryMethod ¶
func ExecuteCleanAuxiliaryMethod(ctx context.Context, module CleanAuxiliaryMethod) (err error)
func ExecuteCleanMethod ¶
func ExecuteCleanMethod(ctx context.Context, module CleanExecutionMethod, execIO *ExecutionIO) (err error)
func ExecuteMethod ¶
func ExecuteMethod(ctx context.Context, module ExecutionMethod, execIO *ExecutionIO) (err error)
Types ¶
type AuthOptions ¶
type AuthOptions struct {
Target *adauth.Target
Credential *adauth.Credential
}
AuthOptions holds Windows / Active Directory authentication parameters
type CleanAuxiliaryMethod ¶
type CleanAuxiliaryMethod interface {
AuxiliaryMethod
Clean
}
type CleanExecutionMethod ¶
type CleanExecutionMethod interface {
ExecutionMethod
Clean
}
type CleanMethod ¶
type Cleaner ¶
type Cleaner struct {
// contains filtered or unexported fields
}
func (*Cleaner) AddCleaners ¶
type Client ¶
type Client interface {
// Connect establishes a connection to the remote server
Connect(ctx context.Context) error
// Close terminates the active connection and frees allocated resources
Close(ctx context.Context) error
}
Client represents an application layer network client
type ClientOptions ¶
type ClientOptions struct {
// Proxy specifies the URI of the proxy server to route client requests through
Proxy string `json:"proxy,omitempty" yaml:"proxy,omitempty"`
// Host specifies the hostname or IP address that the client should connect to
Host string `json:"host" yaml:"host"`
// Port specifies the network port on Host that the client will connect to
Port uint16 `json:"port" yaml:"port"`
}
ClientOptions represents configuration options for a Client
type ContextOption ¶ added in v0.2.1
type ContextOption string
const ( ContextOptionOutputTimeout ContextOption = "output.timeout" ContextOptionOutputPollInterval ContextOption = "output.pollInterval" )
type Dialer ¶
type Dialer interface {
// Dial establishes a network connection (net.Conn) using the provided parameters
Dial(network string, address string) (connection net.Conn, err error)
}
Dialer outlines a basic implementation for establishing network connections
func ParseProxyURI ¶
ParseProxyURI parses the provided proxy URI spec to a Dialer
type ExecutionIO ¶
type ExecutionIO struct {
Cleaner
Input *ExecutionInput
Output *ExecutionOutput
}
func (*ExecutionIO) CommandLine ¶
func (execIO *ExecutionIO) CommandLine() (cmd []string)
func (*ExecutionIO) GetOutput ¶
func (execIO *ExecutionIO) GetOutput(ctx context.Context) (err error)
func (*ExecutionIO) String ¶
func (execIO *ExecutionIO) String() (str string)
type ExecutionInput ¶
type ExecutionInput struct {
StageFile io.ReadCloser
Executable string
ExecutablePath string
Arguments string
Command string
}
func (*ExecutionInput) CommandLine ¶
func (i *ExecutionInput) CommandLine() (cmd []string)
func (*ExecutionInput) Reader ¶
func (i *ExecutionInput) Reader() (reader io.Reader)
func (*ExecutionInput) String ¶
func (i *ExecutionInput) String() string
type ExecutionMethod ¶
type ExecutionMethod interface {
Method
Execute(ctx context.Context, io *ExecutionIO) error
}
type ExecutionOutput ¶
type ExecutionOutput struct {
NoDelete bool
RemotePath string
Timeout time.Duration
Provider OutputProvider
Writer io.WriteCloser
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.