contenttype

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// CloudEventContentType is the content type for cloud event.
	CloudEventContentType = "application/cloudevents+json"
	// JSONContentType is the content type for JSON.
	JSONContentType = "application/json"
	// ProtobufContentType is the MIME media type for Protobuf.
	ProtobufContentType = "application/x-protobuf"
	// This is the MIME media type for CloudEvent Protobuf.
	CloudEventProtobufContentType = "application/cloudevents+protobuf"
)

Variables

This section is empty.

Functions

func IsBinaryContentType

func IsBinaryContentType(contentType string) bool

IsBinaryContentType determines if content type is byte[].

func IsCloudEventContentType

func IsCloudEventContentType(contentType string) bool

IsCloudEventContentType checks for content type.

func IsCloudEventProtobuf

func IsCloudEventProtobuf(contentType string, data []byte) bool

func IsJSONContentType

func IsJSONContentType(contentType string) bool

IsJSONContentType checks for content type.

func IsStringContentType

func IsStringContentType(contentType string) bool

IsStringContentType determines if content type is string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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