parser

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

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 takes as parameter a reader containing an addon definition and returns an AddOn instance. If an error occurs nil and the error are returned.

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) (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) 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) (command.Command, error)

func (*DockerCommandHandler) Parse

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) (command.Command, error)

func (*EchoCommandHandler) Parse

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) (command.Command, error)

func (*OcCommandHandler) Parse

func (c *OcCommandHandler) Parse(s 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) (command.Command, error)

func (*OpenShiftCommandHandler) Parse

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) (command.Command, error)

func (*SSHCommandHandler) Parse

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) (command.Command, error)

func (*SleepCommandHandler) Parse

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