schema

package
v0.0.0-...-342c543 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2016 License: GPL-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Backends = make(map[string]Backend)
)

Functions

func MakeGrammar

func MakeGrammar() *Grammar

func Register

func Register(name string, backend Backend)

Types

type ArrayType

type ArrayType struct {
	SubType Type
	Count   uint64
}

func (*ArrayType) Resolve

func (at *ArrayType) Resolve(s *Schema) error

type Backend

type Backend interface {
	Generate(*Schema) (string, error)
	Flags() *flag.FlagSet
	GeneratedFilename(string) string
}

type BoolType

type BoolType struct {
}

type ByteType

type ByteType struct {
}

type DeferType

type DeferType struct {
	Defer    string
	Resolved Type
}

func (*DeferType) Resolve

func (d *DeferType) Resolve(s *Schema) error

type Field

type Field struct {
	Name string
	Type Type
}

type FloatType

type FloatType struct {
	Bits int
}

type IntType

type IntType struct {
	Bits   int
	Signed bool
	VarInt bool
}

type PointerType

type PointerType struct {
	SubType Type
}

func (*PointerType) Resolve

func (p *PointerType) Resolve(s *Schema) error

type ResolveError

type ResolveError struct {
	Defer string
}

func (ResolveError) Error

func (r ResolveError) Error() string

type ResolveType

type ResolveType interface {
	Resolve(s *Schema) error
}

type Schema

type Schema struct {
	Structs []*Struct
}

func ParseSchema

func ParseSchema(rs io.ReadSeeker) (*Schema, error)

func (*Schema) ResolveAll

func (s *Schema) ResolveAll() error

type SliceType

type SliceType struct {
	SubType Type
}

func (*SliceType) Resolve

func (st *SliceType) Resolve(s *Schema) error

type StringType

type StringType struct {
}

type Struct

type Struct struct {
	Name   string
	Fields []*Field
	Framed bool
}

type StructType

type StructType struct {
	Struct string
}

type TimeType

type TimeType struct {
}

type Type

type Type interface{}

type UnionType

type UnionType struct {
	Types     []Type
	Interface string
}

func (*UnionType) Resolve

func (u *UnionType) Resolve(s *Schema) error

Jump to

Keyboard shortcuts

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