form

package
v0.0.0-...-701ed72 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is form codec 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 Codec

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

Codec is form codec

func (Codec) Marshal

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

Marshal form data

func (Codec) Name

func (Codec) Name() string

Name is form codec name

func (Codec) Unmarshal

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

Unmarshal form data

Jump to

Keyboard shortcuts

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