httpadapter

package
v0.0.0-...-00694c9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileFieldPath

func CompileFieldPath(desc protoreflect.MessageDescriptor, selector string) ([]protoreflect.FieldDescriptor, error)

func MethodKey

func MethodKey(serviceGoName, methodGoName string) string

Types

type HTTPBinding

type HTTPBinding struct {
	Method                string
	Path                  string
	PathParams            []PathParam
	Body                  string
	BodyFieldPath         []protoreflect.FieldDescriptor
	ResponseBody          string
	ResponseBodyFieldPath []protoreflect.FieldDescriptor
}

type MessageFactory

type MessageFactory func() proto.Message

type MethodSpec

type MethodSpec struct {
	ServiceName     string
	ServiceGoName   string
	Name            string
	GoName          string
	Procedure       string
	ConnectPath     string
	HTTPBindings    []HTTPBinding
	RequestFactory  MessageFactory
	ResponseFactory MessageFactory
	UnaryInvoker    UnaryInvoker
	ClientStreaming bool
	ServerStreaming bool
}

func (MethodSpec) Key

func (m MethodSpec) Key() string

type PathParam

type PathParam struct {
	Name          string
	Field         string
	FieldPath     []protoreflect.FieldDescriptor
	Template      string
	TemplateParts []string
	Names         []string
}

type ServiceSpec

type ServiceSpec struct {
	Name        string
	GoName      string
	ConnectPath string
	Methods     []MethodSpec
}

func CompileServiceSpec

func CompileServiceSpec(spec ServiceSpec) (ServiceSpec, error)

type UnaryInvoker

type UnaryInvoker func(context.Context, proto.Message) (proto.Message, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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