proto

package
v0.0.0-...-f43bd78 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertEnum

func ConvertEnum(e *protogen.Enum) *doc.Enum

ConvertEnum converts the provided protogen enum to a doc enum.

func ConvertEnumVal

func ConvertEnumVal(v *protogen.EnumValue) *doc.EnumVal

ConvertEnumVal converts the provided protogen enum value to a doc enum value.

func ConvertField

func ConvertField(f *protogen.Field) *doc.Field

ConvertField converts the provided protogen field to a doc field.

func ConvertFile

func ConvertFile(f *protogen.File) *doc.Package

ConvertFile converts the provided protogen file to a package.

func ConvertMessage

func ConvertMessage(m *protogen.Message) (*doc.Message, []doc.Type)

ConvertMessage converts the provided protogen message to a doc message. It also returns every nested type.

func ConvertMethod

func ConvertMethod(m *protogen.Method) *doc.Endpoint

ConvertMethod converts the provided protogen method to a doc endpoint. If the method is not an endpoint, nil is returned instead.

func ConvertService

func ConvertService(s *protogen.Service) *doc.Service

ConvertService converts the provided protogen service to a doc service.

Types

type Desc

type Desc struct {
	Text       string
	Deprecated bool
}

Desc is a struct containing information retrieved from the description.

func ConvertCommentSet

func ConvertCommentSet(c protogen.CommentSet) Desc

ConvertCommentSet parses the comment set as a description.

func ParseDesc

func ParseDesc(s string) Desc

ParseDesc parses the string provided as a description, a comment describing a type, method or value.

func (Desc) Long

func (d Desc) Long(name string) string

Long returns the description with the name removed.

func (Desc) Short

func (d Desc) Short(name string) string

Short returns the first sentence of the description with the name removed.

Jump to

Keyboard shortcuts

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