rpcreflect

package
v0.0.0-...-f3d8a94 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	String = iota + 1
	Number
	Bool
	Array
	Object
	Custom
	Map
	Nullable
)

Variables

This section is empty.

Functions

func RPCInfo

func RPCInfo(root interface{}) map[string]map[string]RequestType

Types

type Kind

type Kind int

func (Kind) String

func (k Kind) String() string

type RequestType

type RequestType struct {
	Params *Type
	Result *Type
}

type Type

type Type struct {
	Kind   Kind
	Name   string
	Elem   *Type
	Fields map[string]*Type
}

func ArrayOf

func ArrayOf(t *Type) *Type

func CustomType

func CustomType(name string) *Type

func MapOf

func MapOf(t *Type) *Type

func NullableOf

func NullableOf(t *Type) *Type

func ObjectOf

func ObjectOf(fields map[string]*Type) *Type

func SimpleType

func SimpleType(kind Kind) *Type

func (*Type) MarshalJSON

func (t *Type) MarshalJSON() ([]byte, error)

func (*Type) UnmarshalJSON

func (t *Type) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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