Namespace: go.std.mime
v1.0Contents
Summary
Provides a low-level interface to the mime package.
Package mime implements parts of the MIME spec.
Index
- *WordDecoder
- *WordEncoder
- AddExtensionType
- BEncoding
- ErrInvalidMediaParameter
- ExtensionsByType
- QEncoding
- TypeByExtension
- WordDecoder
- WordEncoder
- arrayOfWordDecoder
- arrayOfWordEncoder
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
BEncoding
GoObject v1.0BEncoding represents Base64 encoding scheme as defined by RFC 2045.
-
ErrInvalidMediaParameter
Var v1.0ErrInvalidMediaParameter is returned by ParseMediaType if
the media type value was found but there was an error parsing
the optional parameters
-
QEncoding
GoObject v1.0QEncoding represents the Q-encoding scheme as defined by RFC 2047.
Functions, Macros, and Special Forms
-
AddExtensionType
Function v1.0(AddExtensionType ext typ)
AddExtensionType sets the MIME type associated with
the extension ext to typ. The extension should begin with
a leading dot, as in ".html".
Go input arguments: (ext string, typ string)
Go returns: error
Joker input arguments: [^String ext, ^String typ]
Joker returns: ^Error -
ExtensionsByType
Function v1.0(ExtensionsByType typ)
ExtensionsByType returns the extensions known to be associated with the MIME
type typ. The returned extensions will each begin with a leading dot, as in
".html". When typ has no associated extensions, ExtensionsByType returns an
nil slice.
Go input arguments: (typ string)
Go returns: ([]string, error)
Joker input arguments: [^String typ]
Joker returns: [^arrayOfString, ^Error] -
TypeByExtension
Function v1.0(TypeByExtension ext)
TypeByExtension returns the MIME type associated with the file extension ext.
The extension ext should begin with a leading dot, as in ".html".
When ext has no associated type, TypeByExtension returns "".
Extensions are looked up first case-sensitively, then case-insensitively.
The built-in table is small but on unix it is augmented by the local
system's MIME-info database or mime.types file(s) if available under one or
more of these names:
/usr/local/share/mime/globs2
/usr/share/mime/globs2
/etc/mime.types
/etc/apache2/mime.types
/etc/apache/mime.types
On Windows, MIME types are extracted from the registry.
Text types have the charset parameter set to "utf-8" by default.
Go input arguments: (ext string)
Go returns: string
Joker input arguments: [^String ext]
Joker returns: ^String
Types
-
*WordDecoder
Concrete Type v1.0A WordDecoder decodes MIME headers containing RFC 2047 encoded-words.
-
Decode
Receiver for *WordDecoder v1.0([word])
Decode decodes an RFC 2047 encoded-word.
-
DecodeHeader
Receiver for *WordDecoder v1.0([header])
DecodeHeader decodes all encoded-words of the given string. It returns an
error if and only if CharsetReader of d returns an error.
-
*WordEncoder
Concrete Type v1.0A WordEncoder is an RFC 2047 encoded-word encoder.
-
WordDecoder
Concrete Type v1.0A WordDecoder decodes MIME headers containing RFC 2047 encoded-words.
-
WordEncoder
Concrete Type v1.0A WordEncoder is an RFC 2047 encoded-word encoder.
-
Encode
Receiver for WordEncoder v1.0([charset s])
Encode returns the encoded-word form of s. If s is ASCII without special
characters, it is returned unchanged. The provided charset is the IANA
charset name of s. It is case insensitive.
-
arrayOfWordDecoder
Concrete Type v1.0A WordDecoder decodes MIME headers containing RFC 2047 encoded-words.
-
arrayOfWordEncoder
Concrete Type v1.0A WordEncoder is an RFC 2047 encoded-word encoder.