frames

package
v0.0.0-...-826765a Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFrame

func RegisterFrame(codec Frame)

RegisterFrame registers the provided Frame for use with all Transport clients and servers.

Types

type Frame

type Frame interface {
	Name() string
	Generate(gen *protogen.Plugin, file *protogen.File, g *protogen.GeneratedFile, service *protogen.Service, omitempty bool) error
}

func GetFrame

func GetFrame(name string) Frame

GetFrame gets a registered Frame by content-subtype, or nil if no Frame is registered for the content-subtype.

The content-subtype is expected to be lowercase.

type MethodDesc

type MethodDesc struct {
	*protogen.Method
	// Num方法格式
	Num int
	// Path 请求路由
	Path string
	// MethodName 请求方法
	MethodName string
	// Pname 路径参数名称
	Pnames []camel.Param
	// Params 参数
	Params map[string]protoreflect.Descriptor
	// Body字段值
	Body string
	// 选择器的其他HTTP绑定。嵌套绑定本身不能包含“additional_bindings”字段(即嵌套只能有一层深度)。
	ResponseBody string
	// contains filtered or unexported fields
}

func NewMethodDesc

func NewMethodDesc(m *protogen.Method, rule *annotations.HttpRule) MethodDesc

func (MethodDesc) AddNum

func (m MethodDesc) AddNum(i int) MethodDesc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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