descriptor

package
v0.0.0-...-692e367 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Method                   *Method
	Index                    int
	RpcMethod                string
	RpcPath                  string
	Service                  string
	HttpMethod               string
	HttpPath                 string
	RawBody                  string
	HttpParams               []string
	Middlewares              []string
	ExcludeGlobalMiddlewares []string
	RequestType              *Message
	ResponseType             *Message
	Stream                   bool
	Websocket                bool
	WebsocketProxy           bool
	AdditionalBinding        bool
}

type Descriptor

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

func NewDescriptor

func NewDescriptor() *Descriptor

func (*Descriptor) FindFile

func (d *Descriptor) FindFile(name string) (*File, error)

func (*Descriptor) LoadFromPlugin

func (d *Descriptor) LoadFromPlugin(gen *protogen.Plugin) error

func (*Descriptor) ReserveGoPackageAlias

func (d *Descriptor) ReserveGoPackageAlias(alias, pkgpath string) error

type Enum

type Enum struct {
	*descriptorpb.EnumDescriptorProto
	File   *File
	Outers []string
	Index  int
}

func (*Enum) FullyName

func (e *Enum) FullyName() string

type Field

type Field struct {
	*descriptorpb.FieldDescriptorProto
	Message      *Message
	FieldMessage *Message
}

type File

type File struct {
	*descriptorpb.FileDescriptorProto
	GeneratedFilenamePrefix string
	GoPkg                   GoPackage
	Messages                []*Message
	Enums                   []*Enum
	Services                []*Service
}

func (*File) Pkg

func (f *File) Pkg() string

type GoPackage

type GoPackage struct {
	Path  string
	Name  string
	Alias string
}

func (GoPackage) Standard

func (p GoPackage) Standard() bool

func (GoPackage) String

func (p GoPackage) String() string

type Message

type Message struct {
	*descriptorpb.DescriptorProto
	File   *File
	Fields []*Field
	Outers []string
	Index  int
}

func (*Message) FullyName

func (m *Message) FullyName() string

func (*Message) GoName

func (m *Message) GoName() string

func (*Message) GoType

func (m *Message) GoType(currentPackage string) string

type Method

type Method struct {
	*descriptorpb.MethodDescriptorProto
	Service          *Service
	RequestType      *Message
	ResponseType     *Message
	Name             string
	IsWebsocket      bool
	IsWebsocketProxy bool
	Bindings         []*Binding
}

func (*Method) FullyName

func (m *Method) FullyName() string

type Plugin

type Plugin struct {
	Prefix   string
	Plugin   string
	Pkg      string
	IsGlobal bool
}

type ResponseFile

type ResponseFile struct {
	*pluginpb.CodeGeneratorResponse_File
	GoPkg   GoPackage
	Rewrite bool
}

type Service

type Service struct {
	*descriptorpb.ServiceDescriptorProto
	File                    *File
	Methods                 []*Method
	Plugins                 map[string][]*Plugin
	HTTPMiddlewares         []string
	UseGRPCServer           bool
	UseHTTPServer           bool
	UseWebsocketProxyServer bool
	UseWebsocketServer      bool
}

func (*Service) FullyName

func (s *Service) FullyName() string

Jump to

Keyboard shortcuts

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