metadata

package
v0.0.0-...-89d1a0b Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Begin state = 1 << iota
	DeclaratorSymbol
	PathExpression
	QuerySymbol
	VariableTerm
	End
)
View Source
const (
	NoneExpected expect = 1 << iota
	ExpectIdentifier
	ExpectPath
	ExpectArguments
)

Variables

This section is empty.

Functions

func ToStringOfHttpMethod

func ToStringOfHttpMethod(method HttpMethod) string

Types

type Delete

type Delete struct{}

type Entry

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

func (Entry) String

func (entry Entry) String() string

func (Entry) Text

func (entry Entry) Text() string

type Get

type Get struct{}

type HttpMethod

type HttpMethod interface{}

func ToHttpMethod

func ToHttpMethod(method string) HttpMethod

type IncompatibleMethod

type IncompatibleMethod struct{}

type Metadata

type Metadata struct {
	Type        MetadataType
	Info        interface{}
	ErrorReason string
}

func NewError

func NewError(reason string) Metadata

func NewMetadata

func NewMetadata(metaDataType MetadataType, routeInfos ...RouteInfo) *Metadata

func ParseMetadata

func ParseMetadata(line string) (meta *Metadata, err error)

func (Metadata) Error

func (metadata Metadata) Error() string

func (*Metadata) String

func (metadata *Metadata) String() string

type MetadataType

type MetadataType int
const (
	Route MetadataType = iota
	Variable
	MultiVariable
)

type MultiVariableInfo

type MultiVariableInfo struct {
	Names []string
}

func NewMultiVariableInfo

func NewMultiVariableInfo(names ...string) *MultiVariableInfo

type PathList

type PathList []interface{}

func (PathList) String

func (pathList PathList) String() string

type Post

type Post struct{}

type Put

type Put struct{}

type RouteInfo

type RouteInfo struct {
	Method  HttpMethod
	Path    PathList
	Mapping map[string]*interface{}
	Query   []string
}

func NewRouteInfo

func NewRouteInfo(method HttpMethod) RouteInfo

func (*RouteInfo) AddArgument

func (routeInfo *RouteInfo) AddArgument(argument string)

func (*RouteInfo) ConcatenatePath

func (routeInfo *RouteInfo) ConcatenatePath(path string)

func (*RouteInfo) ConcatenatePathVariable

func (routeInfo *RouteInfo) ConcatenatePathVariable(variable string)

type Source

type Source struct{}

func (*Source) LoadSourceCode

func (source *Source) LoadSourceCode(path string)

type VariableInfo

type VariableInfo struct {
	Name string
}

func NewVariableInfo

func NewVariableInfo(name string) *VariableInfo

Jump to

Keyboard shortcuts

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