Documentation ¶
Index ¶
- func DecodeStringForSchema(input []byte, s Object) (string, error)
- func EncodeStringForSchema(input string, s Object) ([]byte, error)
- func EncodeType[T SchemaType](v T) ([]byte, error)
- type Array
- type Composite
- type Object
- type Parser
- type Scanner
- type SchemaType
- type TokenType
- type Type
- type Unknown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeStringForSchema ¶
EncodeStringForSchema takes an input string and a Object, and returns a byte slice representing that string.
func EncodeType ¶
func EncodeType[T SchemaType](v T) ([]byte, error)
EncodeType takes a SchemaType and returns the byte slice representing the data in a format the database expects
Types ¶
type Array ¶
func (Array) MarshalJSON ¶
type Composite ¶
func (Composite) MarshalJSON ¶
type Scanner ¶
func (*Scanner) MatchKey ¶
MatchKey returns the length of the schema key
Grammar:
key = DQUOTE 1*( ALPHA / DIGIT / "_" / "-" ) DQUOTE
func (*Scanner) MatchNumber ¶
func (*Scanner) SkipToBoundary ¶
SkipToBoundary returns the number of bytes until the next delimiter. This is useful for skipping over invalid tokens.
type SchemaType ¶
Click to show internal directories.
Click to hide internal directories.