tokconv

package
v0.0.0-...-30ac6d1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FatToken

type FatToken struct {
	// The type of token.  Indicates which of the value fields has meaning,
	// or has a special value to indicate beginnings and endings of maps and arrays.
	Type   TokenType
	Length int // If this is a TMapOpen or TArrOpen, a length may be specified.  Use -1 for unknown.

	Str     string  // Value union.  Only one of these has meaning, depending on the value of 'Type'.
	Bytes   []byte  // Value union.  Only one of these has meaning, depending on the value of 'Type'.
	Bool    bool    // Value union.  Only one of these has meaning, depending on the value of 'Type'.
	Int     int64   // Value union.  Only one of these has meaning, depending on the value of 'Type'.
	Uint    uint64  // Value union.  Only one of these has meaning, depending on the value of 'Type'.
	Float64 float64 // Value union.  Only one of these has meaning, depending on the value of 'Type'.

	Tagged bool // Extension slot for cbor.
	Tag    int  // Extension slot for cbor.  Only applicable if tagged=true.
}

type IffyToken

type IffyToken interface {
	Type() TokenType
}

type TIArrClose

type TIArrClose struct{}

func (TIArrClose) Type

func (TIArrClose) Type() TokenType

type TIArrOpen

type TIArrOpen struct{ Length int }

func (TIArrOpen) Type

func (TIArrOpen) Type() TokenType

type TIBool

type TIBool struct{ Val bool }

func (TIBool) Type

func (TIBool) Type() TokenType

type TIBytes

type TIBytes struct{ Val []byte }

func (TIBytes) Type

func (TIBytes) Type() TokenType

type TIFloat64

type TIFloat64 struct{ Val float64 }

func (TIFloat64) Type

func (TIFloat64) Type() TokenType

type TIInt

type TIInt struct{ Val int }

func (TIInt) Type

func (TIInt) Type() TokenType

type TIMapClose

type TIMapClose struct{}

func (TIMapClose) Type

func (TIMapClose) Type() TokenType

type TIMapOpen

type TIMapOpen struct{ Length int }

func (TIMapOpen) Type

func (TIMapOpen) Type() TokenType

type TINull

type TINull struct{}

func (TINull) Type

func (TINull) Type() TokenType

type TIString

type TIString struct{ Val string }

func (TIString) Type

func (TIString) Type() TokenType

type TIUint

type TIUint struct{ Val uint }

func (TIUint) Type

func (TIUint) Type() TokenType

type TokenType

type TokenType byte
const (
	TMapOpen  TokenType = '{'
	TMapClose TokenType = '}'
	TArrOpen  TokenType = '['
	TArrClose TokenType = ']'
	TNull     TokenType = '0'

	TString  TokenType = 's'
	TBytes   TokenType = 'x'
	TBool    TokenType = 'b'
	TInt     TokenType = 'i'
	TUint    TokenType = 'u'
	TFloat64 TokenType = 'f'
)

Jump to

Keyboard shortcuts

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