reflection

package
v0.0.0-...-fb4ca4a Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: GPL-3.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumInfo

type EnumInfo struct {
	Id     int              `json:"id"`
	Name   string           `json:"name"`
	Values map[int32]string `json:"values"`
}

func GetEnumInfo

func GetEnumInfo(pool *descPool, enumName string) *EnumInfo

type FieldInfo

type FieldInfo struct {
	Name         string `json:"name"`
	Number       int    `json:"number"`
	IsRepeated   bool   `json:"is_repeated"`
	IsMap        bool   `json:"is_map"` //TODO: implement
	DefaultValue string `json:"default_value"`
	TypeName     string `json:"type_name"`
	TypeID       int    `json:"type_id"`
}

type InfoResp

type InfoResp struct {
	Types    map[string]*TypeInfo  `json:"types"`
	Enums    map[string]*EnumInfo  `json:"enums"`
	Packages map[string][]*Service `json:"packages"`
}

func GetInfo

func GetInfo(ctx context.Context, addr string) (*InfoResp, error)

type Method

type Method struct {
	Name string `json:"name"`

	In  string `json:"in"`
	Out string `json:"out"`

	InStream  bool `json:"in_stream"`
	OutStream bool `json:"out_stream"`
}

type Package

type Package struct {
	Name     string     `json:"name"`
	Services []*Service `json:"services"`
}

type Service

type Service struct {
	Name    string    `json:"name"`
	Methods []*Method `json:"methods"`
}

type TypeInfo

type TypeInfo struct {
	Id     int          `json:"id"`
	Fields []*FieldInfo `json:"fields"`
}

func GetTypeInfo

func GetTypeInfo(pool *descPool, typeName string) *TypeInfo

Jump to

Keyboard shortcuts

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