Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SPACE_RULE = `" "?` PRIMITIVE_RULES = map[string]string{ "boolean": `("true" | "false") space`, "number": `[0-9]+ space`, "integer": `[0-9]+ space`, "string": `"\"" [ \t!#-\[\]-~]* "\"" space`, "null": `"null" space`, } INVALID_RULE_CHARS_RE = regexp.MustCompile(`[^a-zA-Z0-9-]+`) GRAMMAR_LITERAL_ESCAPE_RE = regexp.MustCompile(`[\r\n"]`) GRAMMAR_LITERAL_ESCAPES = map[string]string{ "\r": `\r`, "\n": `\n`, `"`: `\"`, } )
Functions ¶
This section is empty.
Types ¶
type FunctionName ¶
type FunctionName struct {
Const string `json:"const"`
}
type Functions ¶
type Functions []Function
func (Functions) Select ¶
Select returns a list of functions containing the function with the given name
func (Functions) ToJSONStructure ¶
func (f Functions) ToJSONStructure() JSONFunctionStructure
type Item ¶
type Item struct { Type string `json:"type"` Properties Properties `json:"properties"` }
type JSONFunctionStructure ¶
type JSONFunctionStructure struct { OneOf []Item `json:"oneOf,omitempty"` AnyOf []Item `json:"anyOf,omitempty"` Defs map[string]interface{} `json:"$defs,omitempty"` }
func (JSONFunctionStructure) Grammar ¶
func (j JSONFunctionStructure) Grammar(propOrder string) string
type JSONSchemaConverter ¶
type JSONSchemaConverter struct {
// contains filtered or unexported fields
}
func NewJSONSchemaConverter ¶
func NewJSONSchemaConverter(propOrder string) *JSONSchemaConverter
func (*JSONSchemaConverter) Grammar ¶
func (sc *JSONSchemaConverter) Grammar(schema map[string]interface{}) string
func (*JSONSchemaConverter) GrammarFromBytes ¶
func (sc *JSONSchemaConverter) GrammarFromBytes(b []byte) string
type Properties ¶
type Properties struct { Function FunctionName `json:"function"` Arguments Argument `json:"arguments"` }
Click to show internal directories.
Click to hide internal directories.