content

package
v1.239.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TypeKey for HTTP headers.
	TypeKey = "Content-Type"

	// ErrInvalidMarshaller for content.
	ErrInvalidMarshaller = errors.New("invalid marshaller")
)

Functions

This section is empty.

Types

type Type

type Type struct {
	Media string
	Kind  string
}

Type for content.

func NewFromMedia

func NewFromMedia(mediaType string) *Type

NewFromMedia for content.

func NewFromRequest

func NewFromRequest(req *http.Request) *Type

NewFromRequest for content.

func (*Type) IsText

func (t *Type) IsText() bool

IsText for type.

func (*Type) Marshaller

func (t *Type) Marshaller(mar *marshaller.Map) (marshaller.Marshaller, error)

Marshaller for type.

Jump to

Keyboard shortcuts

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