contenttype

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 12

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 added in v1.11.0

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