types

package
v0.0.0-...-7a03e6a Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package types contains the supported types for JSON schemas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsArray

func IsArray(t Type) bool

IsArray checks whether or not a given type represents an array of some other type. e.g. strings -> array of strings

func Normalize

func Normalize(t Type) string

Types

type Type

type Type string

Type represents a type which can be validated by a JSON schema.

const (
	Err Type = "error"
	EOF Type = "eof"

	Object   Type = "object"
	Objects  Type = "list of object"
	Array    Type = "array"
	Arrays   Type = "list of array"
	String   Type = "string"
	Strings  Type = "list of string"
	Boolean  Type = "boolean"
	Booleans Type = "list of boolean"
	Integer  Type = "integer"
	Integers Type = "list of integer"
)

func InnerType

func InnerType(t Type) Type

func (Type) String

func (t Type) String() string

String maps a type to its text based representation.

Jump to

Keyboard shortcuts

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