Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType string
const ( ContentTypeJson ContentType = "application/json" ContentTypeData ContentType = "multipart/form-data" )
type DocumentType ¶
type DocumentType string
DocumentType 文档类型
const ( DocumentTypeHTML DocumentType = "html" DocumentTypeMarkdown DocumentType = "markdown" DocumentTypePostman DocumentType = "postman" DocumentTypeSwagger DocumentType = "swagger" )
type JsonLabel ¶
type JsonLabel string
func Convert2JsonLabel ¶
func Convert2JsonLabel(pl descriptorpb.FieldDescriptorProto_Label) JsonLabel
Convert2JsonLabel descriptorpb.FieldDescriptorProto_Label to JsonLabel
type JsonType ¶
type JsonType string
func Convert2JsonType ¶
func Convert2JsonType(pt descriptorpb.FieldDescriptorProto_Type) JsonType
Convert2JsonType descriptorpb.FieldDescriptorProto_Type to JsonType
type Message ¶
type Message struct { Name string Description string Fields []*MessageField }
type MessageField ¶
type MessageField struct { // MessageName Message.Name MessageName string // Description field description Description string ProtoName string // proto field name ProtoType descriptorpb.FieldDescriptorProto_Type // 隐式类型 ProtoLaber descriptorpb.FieldDescriptorProto_Label // proto 标签 ProtoTypeName string // 显示类型 ProtoFullName string // 包名.结构名 ProtoPackagePath string // 包路径 ProtoNumber int32 // 排序 JsonName string // json field name JsonType JsonType // json 类型 JsonLabel JsonLabel // json 标签 JsonDefaultValue interface{} // json 数据默认值 }
type Package ¶
type Package struct { // Name Package.Name Name string // Version version Version string // Prefix uri prefix Prefix string // Services Service list Services []*Service // Enums Enum list Enums []*Enum // EnumDic Enum map EnumDic map[string]*Enum // Messages Message list Messages []*Message // MessageDic Message map MessageDic map[string]*Message // contains filtered or unexported fields }
type Service ¶
type Service struct { Name string Description string // Methods rpc list Methods []*ServiceMethod }
type ServiceMethod ¶
type ServiceMethod struct { Name string Path string Method Method Description string Consume ContentType Produce ContentType RequestName string ResponseName string }
ServiceMethod service.rpc
Click to show internal directories.
Click to hide internal directories.