binding

package
v2.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 20 Imported by: 896

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BindForm

func BindForm(req *http.Request, target interface{}) error

BindForm bind form parameters to target.

func BindVars

func BindVars(vars map[string]string, target interface{}) error

BindVars bind map parameters to target.

func EncodePath

func EncodePath(method string, pathPattern string, msg proto.Message) string

EncodePath binds proto message to url path

Types

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Sub  *Sub   `protobuf:"bytes,2,opt,name=sub,proto3" json:"sub,omitempty"`
	// contains filtered or unexported fields
}

The request message containing the user's name.

func (*HelloRequest) Descriptor deprecated

func (*HelloRequest) Descriptor() ([]byte, []int)

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

func (*HelloRequest) GetSub

func (x *HelloRequest) GetSub() *Sub

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

func (x *HelloRequest) ProtoReflect() protoreflect.Message

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type Sub

type Sub struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Sub) Descriptor deprecated

func (*Sub) Descriptor() ([]byte, []int)

Deprecated: Use Sub.ProtoReflect.Descriptor instead.

func (*Sub) GetName

func (x *Sub) GetName() string

func (*Sub) ProtoMessage

func (*Sub) ProtoMessage()

func (*Sub) ProtoReflect

func (x *Sub) ProtoReflect() protoreflect.Message

func (*Sub) Reset

func (x *Sub) Reset()

func (*Sub) String

func (x *Sub) String() string

Jump to

Keyboard shortcuts

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