importable

package
v0.0.0-...-c69faac Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptGoTypeToProto

func AdaptGoTypeToProto(f *types.Var) string

func AdaptNameToProto

func AdaptNameToProto(name string) string

func IsRepeated

func IsRepeated(f *types.Var) bool

func LoadPackages

func LoadPackages(pwd string, pkgs []string) ([]*packages.Package, error)

func NormalizeType

func NormalizeType(name string) string

func SplitNameHelper

func SplitNameHelper(f *types.Var) string

func WriteToFile

func WriteToFile(version int, msgs []*ProtoMessage, path string, outputFileName string) error

Types

type ArrFlags

type ArrFlags []string

func (*ArrFlags) Set

func (i *ArrFlags) Set(value string) error

func (*ArrFlags) String

func (i *ArrFlags) String() string

type MessageField

type MessageField struct {
	Name       string
	TypeName   string
	Order      int
	IsRepeated bool
}

type ProtoFileTemplateData

type ProtoFileTemplateData struct {
	Version  int
	Messages []*ProtoMessage
}

type ProtoMessage

type ProtoMessage struct {
	Name   string
	Fields []*MessageField
}

func GetMessages

func GetMessages(pkgs []*packages.Package, filter string) []*ProtoMessage

func StructToProto

func StructToProto(out []*ProtoMessage, t types.Object, s *types.Struct) []*ProtoMessage

Jump to

Keyboard shortcuts

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