grpcdocs

package module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(s *grpc.Server, opts ...Option) docshandler.Plugin

NewPlugin returns a docshandler.Plugin for generating documentation for a grpc.Server. See Option for configuration settings for this plugin. Note that currently when using this plugin, the docs handler must be served at the root, not at a prefix such as "/docs/".

Types

type Option

type Option func(*config)

Option is a configuration option for NewPlugin.

func WithExampleRequests

func WithExampleRequests(method string, request proto.Message, more ...proto.Message) Option

WithExampleRequests registers example requests for a method which can be selected in the debug form of the docs page. The method name should be in the format "service/method", e.g., "greet.GreetService/Greet".

func WithSerializedDescriptors

func WithSerializedDescriptors(serializedDescriptors []byte) Option

WithSerializedDescriptors registers serialized proto descriptors to use for extracting docstrings in documentation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL