Documentation ¶
Overview ¶
Package buttplugschema provides functions to fetch the buttplug.io JSON schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadRaw ¶
func DownloadRaw(ref string) (*jsonschema.Schema, error)
DownloadRaw downloads the schema from GitHub with the given ref name.
Types ¶
type BaseType ¶
type BaseType struct {
// contains filtered or unexported fields
}
BaseType describes the base type that will always implement the Type interface but isn't useful by itself.
type Field ¶
Field is a struct field.
func (Field) ObjectType ¶
func (f Field) ObjectType() ObjectType
ObjectType asserts Field's Type as an ObjectType.
type IntegerType ¶
IntegerType describes an integer type.
func (IntegerType) LimitString ¶
func (i IntegerType) LimitString() string
LimitString returns the limit in bracket notation. Null is translated to either "max" or "-max".
type NumberType ¶
NumberType describes a floating point type.
func (NumberType) LimitString ¶
func (n NumberType) LimitString() string
LimitString returns the limit in bracket notation. Null is translated to either "max" or "-max".
type ObjectType ¶
ObjectType is a Type.
func (ObjectType) GoType ¶
func (o ObjectType) GoType() string
func (ObjectType) RawGoType ¶
func (o ObjectType) RawGoType() string
type Type ¶
type Type interface { // GoName returns the Go name for the type. If it returns an empty string, // then the type is anonymous. GoName() string // GoType returns the Go representation of the type. GoType() string // SchemaName returns the original name. SchemaName() string // Description returns the description of the type. Description() string // contains filtered or unexported methods }
Type describes any type.