tokenizers

package
v0.0.0-...-65ddab0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2018 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

type Boolean struct{}

func (Boolean) Matchers

func (Boolean) Matchers() []Matcher

func (Boolean) Token

func (Boolean) Token(in []byte) Token

type BooleanToken

type BooleanToken struct {
	Value bool
}

func (BooleanToken) Children

func (BooleanToken) Children() []Token

func (BooleanToken) SetChildren

func (BooleanToken) SetChildren([]Token) error

func (*BooleanToken) String

func (e *BooleanToken) String() string

type Bytes

type Bytes struct{}

func (Bytes) Matchers

func (Bytes) Matchers() []Matcher

func (Bytes) Token

func (Bytes) Token(in []byte) Token

type BytesToken

type BytesToken struct {
	Bytes []byte
}

func (BytesToken) Children

func (BytesToken) Children() []Token

func (BytesToken) SetChildren

func (BytesToken) SetChildren([]Token) error

func (*BytesToken) String

func (e *BytesToken) String() string

type DateTime

type DateTime struct{}

func (DateTime) Matchers

func (DateTime) Matchers() []Matcher

func (DateTime) Token

func (DateTime) Token(in []byte) Token

type DateTimeToken

type DateTimeToken struct {
	Value  time.Time
	Format []byte
}

func (DateTimeToken) Children

func (DateTimeToken) Children() []Token

func (DateTimeToken) SetChildren

func (DateTimeToken) SetChildren([]Token) error

func (DateTimeToken) String

func (DateTimeToken) String() string

type Domain

type Domain struct{}

func (Domain) Matchers

func (Domain) Matchers() []Matcher

func (Domain) Token

func (Domain) Token(in []byte) Token

type DomainToken

type DomainToken struct {
	Domain []byte
}

func (*DomainToken) Children

func (e *DomainToken) Children() []Token

func (*DomainToken) SetChildren

func (e *DomainToken) SetChildren(ts []Token) error

func (*DomainToken) String

func (e *DomainToken) String() string

type Email

type Email struct{}

func (Email) Matchers

func (Email) Matchers() []Matcher

func (Email) Token

func (Email) Token(in []byte) Token

type EmailToken

type EmailToken struct {
	Username Token
	Domain   Token
}

func (*EmailToken) Children

func (e *EmailToken) Children() []Token

func (*EmailToken) SetChildren

func (e *EmailToken) SetChildren(ts []Token) error

func (*EmailToken) String

func (e *EmailToken) String() string

type HTTPMethod

type HTTPMethod struct{}

func (HTTPMethod) Matchers

func (HTTPMethod) Matchers() []Matcher

func (HTTPMethod) Token

func (HTTPMethod) Token(in []byte) Token

type HTTPMethodToken

type HTTPMethodToken struct {
	Value []byte
}

func (HTTPMethodToken) Children

func (HTTPMethodToken) Children() []Token

func (HTTPMethodToken) SetChildren

func (HTTPMethodToken) SetChildren([]Token) error

func (*HTTPMethodToken) String

func (e *HTTPMethodToken) String() string

type InvalidCount

type InvalidCount struct{}

func (InvalidCount) Error

func (InvalidCount) Error() string

type JSONArray

type JSONArray struct{}

func (JSONArray) Matchers

func (JSONArray) Matchers() []Matcher

func (JSONArray) Token

func (JSONArray) Token(in []byte) Token

type JSONArrayToken

type JSONArrayToken struct {
	Values []Token
}

func (*JSONArrayToken) Children

func (e *JSONArrayToken) Children() []Token

func (*JSONArrayToken) SetChildren

func (e *JSONArrayToken) SetChildren(ts []Token) error

func (*JSONArrayToken) String

func (e *JSONArrayToken) String() string

type JSONObject

type JSONObject struct{}

func (JSONObject) Matchers

func (JSONObject) Matchers() []Matcher

func (JSONObject) Token

func (JSONObject) Token(in []byte) Token

type JSONObjectToken

type JSONObjectToken struct {
	Values []Token
	Keys   []string
}

func (*JSONObjectToken) Children

func (e *JSONObjectToken) Children() []Token

func (*JSONObjectToken) SetChildren

func (e *JSONObjectToken) SetChildren(ts []Token) error

func (*JSONObjectToken) String

func (e *JSONObjectToken) String() string

type JWT

type JWT struct{}

func (JWT) Matchers

func (JWT) Matchers() []Matcher

func (JWT) Token

func (JWT) Token(in []byte) Token

type JWTToken

type JWTToken struct {
	Bytes []byte
}

func (JWTToken) Children

func (JWTToken) Children() []Token

func (JWTToken) SetChildren

func (JWTToken) SetChildren([]Token) error

func (JWTToken) String

func (JWTToken) String() string

type Matcher

type Matcher func([]byte) bool

type Null

type Null struct{}

func (Null) Matchers

func (Null) Matchers() []Matcher

func (Null) Token

func (Null) Token(in []byte) Token

type NullToken

type NullToken struct{}

func (NullToken) Children

func (NullToken) Children() []Token

func (NullToken) SetChildren

func (NullToken) SetChildren([]Token) error

func (*NullToken) String

func (e *NullToken) String() string

type Number

type Number struct{}

func (Number) Matchers

func (Number) Matchers() []Matcher

func (Number) Token

func (Number) Token(in []byte) Token

type NumberToken

type NumberToken struct {
	Value float64
}

func (NumberToken) Children

func (NumberToken) Children() []Token

func (NumberToken) SetChildren

func (NumberToken) SetChildren([]Token) error

func (NumberToken) String

func (NumberToken) String() string

type QuotedString

type QuotedString struct{}

func (QuotedString) Matchers

func (QuotedString) Matchers() []Matcher

func (QuotedString) Token

func (QuotedString) Token(in []byte) Token

type QuotedStringToken

type QuotedStringToken struct {
	Value Token
	Quote byte
}

func (*QuotedStringToken) Children

func (e *QuotedStringToken) Children() []Token

func (*QuotedStringToken) SetChildren

func (e *QuotedStringToken) SetChildren(ts []Token) error

func (*QuotedStringToken) String

func (e *QuotedStringToken) String() string

type Token

type Token interface {
	Children() []Token
	SetChildren([]Token) error
	String() string
}

type Tokenizer

type Tokenizer interface {
	Matchers() []Matcher
	Token([]byte) Token
}

type Tokenizers

type Tokenizers []Tokenizer

type URL

type URL struct{}

func (URL) Matchers

func (URL) Matchers() []Matcher

func (URL) Token

func (URL) Token(in []byte) Token

type URLToken

type URLToken struct {
	Protocol          []byte
	Host              Token
	Port              *int
	Fragment          []Token
	QueryStringKeys   [][]byte
	QueryStringValues []Token
}

func (*URLToken) Children

func (e *URLToken) Children() []Token

func (*URLToken) SetChildren

func (e *URLToken) SetChildren(ts []Token) error

func (*URLToken) String

func (e *URLToken) String() string

type UUID

type UUID struct{}

func (UUID) Matchers

func (UUID) Matchers() []Matcher

func (UUID) Token

func (UUID) Token(in []byte) Token

type UUIDToken

type UUIDToken struct {
	UUID []byte
	Orig []byte
}

func (UUIDToken) Children

func (UUIDToken) Children() []Token

func (UUIDToken) SetChildren

func (UUIDToken) SetChildren([]Token) error

func (*UUIDToken) String

func (e *UUIDToken) String() string

type UnSupportedOperation

type UnSupportedOperation struct{}

func (UnSupportedOperation) Error

func (UnSupportedOperation) Error() string

type Unknown

type Unknown struct{}

func (Unknown) Matchers

func (Unknown) Matchers() []Matcher

func (Unknown) Token

func (Unknown) Token(in []byte) Token

type UnknownToken

type UnknownToken struct {
	Bytes []byte
}

func (UnknownToken) Children

func (UnknownToken) Children() []Token

func (UnknownToken) SetChildren

func (UnknownToken) SetChildren([]Token) error

func (UnknownToken) String

func (UnknownToken) String() string

Jump to

Keyboard shortcuts

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