apiform

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(value any, writer *multipart.Writer) error

Marshal encodes a value as multipart form data.

func MarshalWithSettings

func MarshalWithSettings(value any, writer *multipart.Writer, arrayFormat FormFormat) error

MarshalWithSettings encodes a value with a custom array format.

Types

type FormFormat

type FormFormat int
const (
	// FormatRepeat uses repeated keys.
	FormatRepeat FormFormat = iota
	// FormatComma joins values with commas.
	FormatComma
	// FormatBrackets uses key[].
	FormatBrackets
	// FormatIndicesDots uses key.0 and key.1.
	FormatIndicesDots
	// FormatIndicesBrackets uses key[0] and key[1].
	FormatIndicesBrackets
)

type Marshaler

type Marshaler interface {
	MarshalMultipart() ([]byte, string, error)
}

Jump to

Keyboard shortcuts

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