parser

package
v1.34.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOnParser

type AddOnParser struct {
	// contains filtered or unexported fields
}

AddOnParser is responsible for loading an addon from file and converting it into an AddOn

func NewAddOnParser

func NewAddOnParser() *AddOnParser

func (*AddOnParser) Parse

func (parser *AddOnParser) Parse(addOnDir string) (addon.AddOn, error)

Parse parses the addon files containing in a directory provided via addOnDir and returns an AddOn instance. If an error occurs, the error is returned.

type CatCommandHandler added in v1.25.0

type CatCommandHandler struct {
	// contains filtered or unexported fields
}

func (CatCommandHandler) Handle added in v1.25.0

func (dc CatCommandHandler) Handle(c CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

func (*CatCommandHandler) Parse added in v1.25.0

func (c *CatCommandHandler) Parse(s string, ignoreError bool, outputVariable string) command.Command

func (CatCommandHandler) SetNext added in v1.25.0

func (dc CatCommandHandler) SetNext(next CommandHandler)

type CommandHandler

type CommandHandler interface {
	// Create attempts to parse the given string into a Command instance of its type. In case
	// s does not represent a command which can be handled by this Command instance, Create of the specified next
	// Command is called. If there is no next Command, nil is returned.
	Handle(next CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

	// Parse attempts to parse the given string into a Command instance of its type. nil is returned in case
	// s does not represent a command which can be handled by this Command instance.
	Parse(s string, ignoreError bool, outputVariable string) command.Command
}

type DefaultParseError

type DefaultParseError struct {
	// contains filtered or unexported fields
}

func NewParseError

func NewParseError(msg string, name string, dir string) *DefaultParseError

func (*DefaultParseError) AddonDir

func (e *DefaultParseError) AddonDir() string

func (*DefaultParseError) AddonName

func (e *DefaultParseError) AddonName() string

func (*DefaultParseError) Error

func (e *DefaultParseError) Error() string

type DockerCommandHandler

type DockerCommandHandler struct {
	// contains filtered or unexported fields
}

func (DockerCommandHandler) Handle

func (dc DockerCommandHandler) Handle(c CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

func (*DockerCommandHandler) Parse

func (c *DockerCommandHandler) Parse(s string, ignoreError bool, outputVariable string) command.Command

func (DockerCommandHandler) SetNext

func (dc DockerCommandHandler) SetNext(next CommandHandler)

type EchoCommandHandler

type EchoCommandHandler struct {
	// contains filtered or unexported fields
}

func (EchoCommandHandler) Handle

func (dc EchoCommandHandler) Handle(c CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

func (*EchoCommandHandler) Parse

func (c *EchoCommandHandler) Parse(s string, ignoreError bool, outputVariable string) command.Command

func (EchoCommandHandler) SetNext

func (dc EchoCommandHandler) SetNext(next CommandHandler)

type OcCommandHandler

type OcCommandHandler struct {
	// contains filtered or unexported fields
}

func (OcCommandHandler) Handle

func (dc OcCommandHandler) Handle(c CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

func (*OcCommandHandler) Parse

func (c *OcCommandHandler) Parse(s string, ignoreError bool, outputVariable string) command.Command

func (OcCommandHandler) SetNext

func (dc OcCommandHandler) SetNext(next CommandHandler)

type OpenShiftCommandHandler

type OpenShiftCommandHandler struct {
	// contains filtered or unexported fields
}

func (OpenShiftCommandHandler) Handle

func (dc OpenShiftCommandHandler) Handle(c CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

func (*OpenShiftCommandHandler) Parse

func (c *OpenShiftCommandHandler) Parse(s string, ignoreError bool, outputVariable string) command.Command

func (OpenShiftCommandHandler) SetNext

func (dc OpenShiftCommandHandler) SetNext(next CommandHandler)

type ParseError

type ParseError interface {
	error
	AddonName() string
	AddonDir() string
}

type SSHCommandHandler

type SSHCommandHandler struct {
	// contains filtered or unexported fields
}

func (SSHCommandHandler) Handle

func (dc SSHCommandHandler) Handle(c CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

func (*SSHCommandHandler) Parse

func (c *SSHCommandHandler) Parse(s string, ignoreError bool, outputVariable string) command.Command

func (SSHCommandHandler) SetNext

func (dc SSHCommandHandler) SetNext(next CommandHandler)

type SleepCommandHandler

type SleepCommandHandler struct {
	// contains filtered or unexported fields
}

func (SleepCommandHandler) Handle

func (dc SleepCommandHandler) Handle(c CommandHandler, s string, ignoreError bool, outputVariable string) (command.Command, error)

func (*SleepCommandHandler) Parse

func (c *SleepCommandHandler) Parse(s string, ignoreError bool, outputVariable string) command.Command

func (SleepCommandHandler) SetNext

func (dc SleepCommandHandler) SetNext(next CommandHandler)

Jump to

Keyboard shortcuts

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