pkmessage

package
v0.0.0-...-7015509 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFieldLists

func LoadFieldLists(message *protogen.Message) []*protogen.Field

LoadFieldLists returns valid field lists in message.

func LoadValidMessages

func LoadValidMessages(messages []*protogen.Message) []*protogen.Message

LoadValidMessages get a valid message lists recursively from giving message lists.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser for parse the protogen.Message TODO: make it as a standalone package?

func NewParser

func NewParser(message *protogen.Message) *Parser

func (*Parser) Fields

func (x *Parser) Fields() []*protogen.Field

Fields returns all fields except those in "oneof".

func (*Parser) LookupByName

func (x *Parser) LookupByName(name string) (field *protogen.Field, inOneOf bool)

LookupByName get the field by name. returns nil if not found.

Jump to

Keyboard shortcuts

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