Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDependencyMap ¶
func GenerateDependencyMap(source *descriptorpb.FileDescriptorProto, protos []*descriptorpb.FileDescriptorProto) map[string]*descriptorpb.FileDescriptorProto
GenerateDependencyMap recursively loops through dependencies and creates a map for their names and FileDescriptorProto
Types ¶
type Field ¶
type Field struct { Name string Comment *Comment Type *Type JSONName string FixedExample json.RawMessage }
Field describes a proto field.
type File ¶
File is a proto parsed file.
func ParseFile ¶
func ParseFile(file *FileDescWrapper, onlyExternal OnlyExternalOpt) (*File, error)
ParseFile parses a proto file.
func (*File) CheckSwagger ¶
CheckSwagger checks existence of Swagger annotations, that are needed for proper generation of the markdown documentation.
func (*File) HasServices ¶
HasServices returns true when file contains service definitions.
func (*File) SwaggerScheme ¶
SwaggerScheme gets scheme that you most probably want. The order is https - http - wss - ws. Includes "://" string if present, returns empty string if there is no valid scheme.
type FileDescWrapper ¶
type FileDescWrapper struct { *descriptorpb.FileDescriptorProto DependencyMap map[string]*descriptorpb.FileDescriptorProto }
FileDescWrapper is a wrapper for FileDescriptorProto for holding a map of dependencies.
type Message ¶
type Message struct { Name string Comment *Comment Fields []*Field NestedMessages []*Message Enums []*Enum FixedExample map[string]interface{} }
Message describes a proto message.
type Method ¶
type Method struct { Name string Comment *Comment Request *Request Response *Response Operation *options.Operation }
Method describes a proto method.
type OnlyExternalOpt ¶
type OnlyExternalOpt int
const ( OnlyExternalDisabled OnlyExternalOpt = iota OnlyExternalEnabled )