Documentation ¶
Index ¶
Constants ¶
View Source
const Syntax = "proto3"
Variables ¶
View Source
var ( Double = Message{ Name: "double", IsScalar: true, } Float = Message{ Name: "float", IsScalar: true, } Int32 = Message{ Name: "int32", IsScalar: true, } Int64 = Message{ Name: "int64", IsScalar: true, } Uint32 = Message{ Name: "uint32", IsScalar: true, } Uint64 = Message{ Name: "uint64", IsScalar: true, } Bool = Message{ Name: "bool", IsScalar: true, } String = Message{ Name: "string", IsScalar: true, } Bytes = Message{ Name: "bytes", IsScalar: true, } Any = Message{ Name: "google.protobuf.Any", } Empty = Message{ Name: "google.protobuf.Empty", } )
View Source
var EnumStore = make(map[string]Enum)
View Source
var ImportStore = make(map[string]struct{})
View Source
var MessageNames []string
View Source
var MessageStore = make(map[string]Message)
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { Name string Type ProtobufType Number int Comments []string JsonName string }
Field represents protobuf message field definition
type Message ¶
type Message struct { Name string Fields []Field Comments []string IsInner bool IsScalar bool IsMap bool IsRepeated bool IsTopLevel bool }
Message represents protobuf message definition
func NewMessage ¶
func NewMessage(structmeta astutils.StructMeta) Message
NewMessage returns message instance from astutils.StructMeta
type ProtobufType ¶ added in v1.2.11
func MessageOf ¶
func MessageOf(ft string) ProtobufType
type Rpc ¶
type Rpc struct { Name string Request Message Response Message Comments []string StreamType StreamType }
func NewRpc ¶
func NewRpc(method astutils.MethodMeta) Rpc
type Service ¶
type Service struct { Name string Package string GoPackage string Syntax string // go-doudou version Version string ProtoVer string Rpcs []Rpc Messages []Message Enums []Enum Comments []string Imports []string }
func NewService ¶
type StreamType ¶ added in v1.3.0
type StreamType int
Click to show internal directories.
Click to hide internal directories.