Documentation ¶
Index ¶
- func DiscoveryMimeType(compression string) string
- func GUnzippedType(mimeType string) string
- func IsDiscovery(mimeType string) bool
- func IsGZipCompressed(mimeType string) bool
- func IsOpenAPIv2(mimeType string) bool
- func IsOpenAPIv3(mimeType string) bool
- func IsPrintableType(mimeType string) bool
- func IsProto(mimeType string) bool
- func IsZipArchive(mimeType string) bool
- func KindForMimeType(mimeType string) string
- func MessageForKind(kind string) (proto.Message, error)
- func MessageForMimeType(mimeType string) (proto.Message, error)
- func MessageTypeForMimeType(protoType string) (string, error)
- func MimeTypeForKind(kind string) string
- func MimeTypeForMessageType(protoType string) string
- func OpenAPIMimeType(compression, version string) string
- func ProtobufMimeType(compression string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoveryMimeType ¶
DiscoveryMimeType returns a MIME type for a Discovery description of an API.
func GUnzippedType ¶ added in v0.6.10
GUnzippedType returns an equivalent uncompressed MIME type for a compressed type.
func IsDiscovery ¶
IsDiscovery returns true if a MIME type represents a Google API Discovery document.
func IsGZipCompressed ¶
IsGZipCompressed returns true if a MIME type represents a type compressed with GZip encoding.
func IsOpenAPIv2 ¶
IsOpenAPIv2 returns true if a MIME type represents an OpenAPI v2 spec.
func IsOpenAPIv3 ¶
IsOpenAPIv3 returns true if a MIME type represents an OpenAPI v3 spec.
func IsPrintableType ¶
IsPrintableType returns true if the corresponding contents can be treated as a string.
func IsProto ¶
IsProto returns true if a MIME type represents a Protocol Buffers Language API description.
func IsZipArchive ¶
IsZipArchive returns true if a MIME type represents a type stored as a multifile Zip archive.
func KindForMimeType ¶
KindForMimeType returns the name to be used as the "kind" of an exported artifact.
func MessageForKind ¶
MessageForKind returns an instance of the message that represents the specified kind.
func MessageForMimeType ¶
MessageForMimeType returns an instance of the message that represents the specified MIME type.
func MessageTypeForMimeType ¶
MessageTypeForMimeType returns the Protocol Buffer message type represented by a MIME type.
func MimeTypeForKind ¶
MimeTypeForKind returns the mime type that corresponds to a kind.
func MimeTypeForMessageType ¶
MimeTypeForMessageType returns a MIME type that represents a Protocol Buffer message type.
func OpenAPIMimeType ¶
OpenAPIMimeType returns a MIME type for an OpenAPI description of an API.
func ProtobufMimeType ¶
ProtobufMimeType returns a MIME type for a Protocol Buffers description of an API.
Types ¶
This section is empty.