parser

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name string
	Type *Type
	Num  int
}

type Message

type Message struct {
	Name   string
	Fields []*Field
}

type RPC

type RPC struct {
	Name         string
	Request      *Message
	Response     *Message
	Descriptions []string
}

type Service

type Service struct {
	Name         string
	RPCs         []*RPC
	Descriptions []string
}

func Parse

func Parse(data *ifacetool.Data) (*Service, error)

type Type

type Type struct {
	Name     string
	Repeated bool     // true for slice: []Type
	MapKey   string   // non-empty for map: map[key]Type
	Fields   []*Field // non-empty for struct
}

func (*Type) Squash

func (t *Type) Squash() (types []*Type)

Squash does a pre-order walk of t and returns all the composite types (including itself) as a flat list.

Jump to

Keyboard shortcuts

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