arguments

package
v0.0.0-...-77029e5 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2016 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgumentCountMismatch

type ArgumentCountMismatch struct {
}

ArgumentCountMismatch describes an error where the number of schema elements do not match the number of passed in arguments

func ArgumentCountMismatchException

func ArgumentCountMismatchException() ArgumentCountMismatch

func (ArgumentCountMismatch) Error

func (exception ArgumentCountMismatch) Error() string

type ArgumentMarshaler

type ArgumentMarshaler interface {
	Marshal() error
	Value() interface{}
}

ArgumentMarshaler is an interface to be implement by specific type marshalers. Each type marshaler will parse the argument and place the result into the implementing structure's value. It may then be read using Value()

type ArgumentParser

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

func NewArgumentParser

func NewArgumentParser(schema string, arguments []string) (*ArgumentParser, error)

func (*ArgumentParser) GetBoolean

func (argumentParser *ArgumentParser) GetBoolean(arg string) (bool, error)

func (*ArgumentParser) GetFloat

func (argumentParser *ArgumentParser) GetFloat(arg string) (float64, error)

func (*ArgumentParser) GetInteger

func (argumentParser *ArgumentParser) GetInteger(arg string) (int, error)

func (*ArgumentParser) GetString

func (argumentParser *ArgumentParser) GetString(arg string) (string, error)

func (*ArgumentParser) Has

func (argumentParser *ArgumentParser) Has(arg string) bool

type BooleanArgumentMarshaler

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

func NewBooleanArgumentMarshaler

func NewBooleanArgumentMarshaler(argumentID string, value string) *BooleanArgumentMarshaler

func (*BooleanArgumentMarshaler) Marshal

func (marshaler *BooleanArgumentMarshaler) Marshal() error

func (*BooleanArgumentMarshaler) Value

func (marshaler *BooleanArgumentMarshaler) Value() interface{}

type FloatArgumentMarshaler

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

func NewFloatArgumentMarshaler

func NewFloatArgumentMarshaler(argumentID string, value string) *FloatArgumentMarshaler

func (*FloatArgumentMarshaler) Marshal

func (marshaler *FloatArgumentMarshaler) Marshal() error

func (*FloatArgumentMarshaler) Value

func (marshaler *FloatArgumentMarshaler) Value() interface{}

type IntegerArgumentMarshaler

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

func NewIntegerArgumentMarshaler

func NewIntegerArgumentMarshaler(argumentID string, value string) *IntegerArgumentMarshaler

func (*IntegerArgumentMarshaler) Marshal

func (marshaler *IntegerArgumentMarshaler) Marshal() error

func (*IntegerArgumentMarshaler) Value

func (marshaler *IntegerArgumentMarshaler) Value() interface{}

type InvalidArgumentFormat

type InvalidArgumentFormat struct {
	Parameter string
}

InvalidArgumentFormat describes an error where a parameter is in the wrong format

func InvalidArgumentFormatException

func InvalidArgumentFormatException(parameter string) InvalidArgumentFormat

func (InvalidArgumentFormat) Error

func (exception InvalidArgumentFormat) Error() string

type InvalidArgumentName

type InvalidArgumentName struct {
	ArgumentID string
}

InvalidArgumentName describes an error where a schema argument name contains invalid characters

func InvalidArgumentNameException

func InvalidArgumentNameException(argumentID string) InvalidArgumentName

func (InvalidArgumentName) Error

func (exception InvalidArgumentName) Error() string

type InvalidBoolean

type InvalidBoolean struct {
	ArgumentID string
	Parameter  string
}

InvalidBoolean describes an error where a boolean parameter gets a value that is not the right type

func InvalidBooleanException

func InvalidBooleanException(argumentID, parameter string) InvalidBoolean

func (InvalidBoolean) Error

func (exception InvalidBoolean) Error() string

type InvalidFloat

type InvalidFloat struct {
	ArgumentID string
	Parameter  string
}

InvalidFloat describes an error where a float parameter gets a value that is not the right type

func InvalidFloatException

func InvalidFloatException(argumentID, parameter string) InvalidFloat

func (InvalidFloat) Error

func (exception InvalidFloat) Error() string

type InvalidInteger

type InvalidInteger struct {
	ArgumentID string
	Parameter  string
}

InvalidInteger describes an error where an integer parameter gets a value that is not the right type

func InvalidIntegerException

func InvalidIntegerException(argumentID, parameter string) InvalidInteger

func (InvalidInteger) Error

func (exception InvalidInteger) Error() string

type StringArgumentMarshaler

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

func NewStringArgumentMarshaler

func NewStringArgumentMarshaler(argumentID string, value string) *StringArgumentMarshaler

func (*StringArgumentMarshaler) Marshal

func (marshaler *StringArgumentMarshaler) Marshal() error

func (*StringArgumentMarshaler) Value

func (marshaler *StringArgumentMarshaler) Value() interface{}

Jump to

Keyboard shortcuts

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