proto

package
v0.0.0-...-c9e72cd Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name            string
	Type            string
	IsNestedMessage bool
}

type Message

type Message struct {
	Name   string
	Fields []Field
}

func (Message) FieldNames

func (m Message) FieldNames() []string

func (Message) FieldTypes

func (m Message) FieldTypes() []string

type Method

type Method struct {
	Name            string
	RequestMessage  string
	ResponseMessage string
}

type Service

type Service struct {
	ServiceName  string
	ProtoPackage string
	Methods      []Method
	Messages     []Message
}

func Parse

func Parse(filePath string) (Service, error)

func (Service) IsMessage

func (s Service) IsMessage(
	name string,
) bool

func (Service) Message

func (s Service) Message(
	messageName string,
) (Message, error)

func (Service) Method

func (s Service) Method(
	methodName string,
) (Method, error)

func (Service) MethodRequestFields

func (s Service) MethodRequestFields(
	methodName string,
) ([]Field, error)

func (Service) MethodRequestMessage

func (s Service) MethodRequestMessage(
	methodName string,
) (Message, error)

func (Service) MethodResponseFields

func (s Service) MethodResponseFields(
	methodName string,
) ([]Field, error)

func (Service) MethodResponseMessage

func (s Service) MethodResponseMessage(
	methodName string,
) (Message, error)

func (Service) MethodResponseTypes

func (s Service) MethodResponseTypes(
	methodName string,
) ([]string, error)

func (Service) MethodUsesNestedMessages

func (s Service) MethodUsesNestedMessages(
	methodName string,
) (bool, error)

func (Service) NestedMessages

func (s Service) NestedMessages() []Message

NestedMessages returns all of the messages that are nested within any other message in the proto interface

Jump to

Keyboard shortcuts

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