Documentation ¶
Overview ¶
Makedt is a package for exposing the creation of a doctree structure.
It lives in its own package because it must use several other packages which make use of doctree to create a doctree, so to prevent circular imports, it must be its own package.
Index ¶
- func FindServiceFile(req *plugin.CodeGeneratorRequest) string
- func New(req *plugin.CodeGeneratorRequest, serviceFile io.Reader) (doctree.Doctree, error)
- func NewEnum(enum *descriptor.EnumDescriptorProto) (*doctree.ProtoEnum, error)
- func NewFile(pfile *descriptor.FileDescriptorProto, ...) (*doctree.ProtoFile, error)
- func NewMessage(msg *descriptor.DescriptorProto) (*doctree.ProtoMessage, error)
- func NewService(srvc *descriptor.ServiceDescriptorProto, curNewFile *doctree.ProtoFile, ...) (*doctree.ProtoService, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindServiceFile ¶
func FindServiceFile(req *plugin.CodeGeneratorRequest) string
Searches through the files in the request and returns the path to the first one which contains a service declaration. If no file in the request contains a service, returns an empty string.
func New ¶
New accepts a Protobuf plugin.CodeGeneratorRequest and the contents of the file containing the service declaration and returns a Doctree struct
func NewEnum ¶
func NewEnum(enum *descriptor.EnumDescriptorProto) (*doctree.ProtoEnum, error)
NewEnum returns a *doctree.ProtoEnum created from a *descriptor.EnumDescriptorProto
func NewFile ¶
func NewFile( pfile *descriptor.FileDescriptorProto, curNewDt *doctree.MicroserviceDefinition) (*doctree.ProtoFile, error)
Build a new doctree.File struct
func NewMessage ¶
func NewMessage(msg *descriptor.DescriptorProto) (*doctree.ProtoMessage, error)
NewMessage returns a *doctree.ProtoMessage created from a *descriptor.DescriptorProto
func NewService ¶
func NewService( srvc *descriptor.ServiceDescriptorProto, curNewFile *doctree.ProtoFile, curNewDt *doctree.MicroserviceDefinition) (*doctree.ProtoService, error)
NewService creates a new *doctree.ProtoService from a descriptor.ServiceDescriptorProto. Additionally requires being passed the current *doctree.ProtoFile being defined and a reference to the current *doctree.MicroserviceDefinition being defined; this access is necessary so that the RequestType and ResponseType fields of each of the methods of this service may be set as references to the correct ProtoMessages
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package google_api is a generated protocol buffer package.
|
Package google_api is a generated protocol buffer package. |