Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateIndexHTML(basePath string, services []*Service) error
- func GetAbsPackage(pkg, imp string) string
- func GetAbsPath(pkg, imp string) string
- func IsProtoParsed(pkg, name string) bool
- func IsScalarType(name string) bool
- func MakeParsed(pkg, name string, msg *Message)
- func ParseOneof(lines []string, oneof *Oneof) int
- func RegisterProto(pkg, name string)
- type Elem
- type Enum
- type Field
- type Message
- func (m *Message) GetAll() []*Message
- func (message *Message) Parse(lines []string, depth int) int
- func (m *Message) String() string
- func (m *Message) WriteHtmlWithNavigator(basePath string, navigators []*Navigator) error
- func (m *Message) WriteHtmlWithService(basePath string, services []*Service) error
- type Navigator
- type Oneof
- type Proto
- type RPC
- type ScalarType
- type Service
Constants ¶
View Source
const ( PROTO_SYNTAX_3 = "proto3" PROTO_SYNTAX_UNKNOWN = "unknown" )
Variables ¶
View Source
var ParsedMessages map[string]*Message
View Source
var ParsingProto map[string]bool
Functions ¶
func GenerateIndexHTML ¶
func GetAbsPackage ¶
GetAbsPackage used to get absolute package name of one proto file pkg means package name imp means import name, one import has such format:
import "common/types/types.proto"
func GetAbsPath ¶
func IsProtoParsed ¶
func IsScalarType ¶
func MakeParsed ¶
func ParseOneof ¶
func RegisterProto ¶
func RegisterProto(pkg, name string)
Types ¶
type Elem ¶
func NewElemWithNote ¶
type Enum ¶
type Enum struct { Note string Name string Elems []*Elem // contains filtered or unexported fields }
func (*Enum) WriteHtmlWithNavigator ¶
type Field ¶
type Field struct { Label string Type string Name string Order int Note string Link string // contains filtered or unexported fields }
func NewFieldWithNote ¶
func NewMapField ¶
type Message ¶
type Message struct { Note string Package string Name string Messages []*Message Enums []*Enum Oneofs []*Oneof Fields []*Field }
func (*Message) WriteHtmlWithNavigator ¶
type Proto ¶
type Proto struct { Messages []*Message Services []*Service Enums []*Enum Comment string Package string Start int // the message start int, excludes syntax,package and imports line Syntax string Imports []string Path string // base folder of proto file // contains filtered or unexported fields }
func (*Proto) Initialize ¶
func (*Proto) IsSupported ¶
func (*Proto) ResolveImport ¶
func (*Proto) ResolveImports ¶
type RPC ¶
type RPC struct { Note string Method string Request string Response string ReqLink string RespLink string // contains filtered or unexported fields }
func NewRPCWithNote ¶
type ScalarType ¶
type ScalarType string
const ( DOUBLE ScalarType = "double" FLOAT ScalarType = "float" INT32 ScalarType = "int32" INT64 ScalarType = "int64" UINT32 ScalarType = "uint32" UINT64 ScalarType = "uint64" SINT32 ScalarType = "sint32" SINT64 ScalarType = "sint64" FIXED32 ScalarType = "fixed32" FIXED64 ScalarType = "fixed64" SFIXED32 ScalarType = "sfixed32" SFIXED64 ScalarType = "sfixed64" BOOL ScalarType = "bool" STRING ScalarType = "string" BYTES ScalarType = "bytes" MAP ScalarType = "map" )
Click to show internal directories.
Click to hide internal directories.