form

package
v0.0.0-...-fc59d6d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is form Coder name
	Name = "x-www-form-urlencoded"
)

Variables

This section is empty.

Functions

func DecodeValues

func DecodeValues(msg proto.Message, values url.Values) error

DecodeValues decode url value into proto message.

func EncodeField

func EncodeField(fieldDescriptor protoreflect.FieldDescriptor, value protoreflect.Value) (string, error)

EncodeField encode proto message filed

func EncodeFieldMask

func EncodeFieldMask(m protoreflect.Message) (query string)

EncodeFieldMask return field mask name=paths

func EncodeValues

func EncodeValues(msg interface{}) (url.Values, error)

EncodeValues encode a message into url values.

Types

type Coder

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

func GetCoder

func GetCoder() Coder

func (Coder) Marshal

func (c Coder) Marshal(v interface{}) ([]byte, error)

func (Coder) Name

func (Coder) Name() string

func (Coder) Unmarshal

func (c Coder) Unmarshal(data []byte, v interface{}) error

Jump to

Keyboard shortcuts

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