Versions in this module Expand all Collapse all v0 v0.0.1 Nov 5, 2023 Changes in this version + const DefaultDelimiter + var Builtin = BuiltinTypes + func DecodeTypes(in map[string]any) (*config.ConfigNamespace[map[string]MediaTypeConfig, Types], error) + func InitMediaType(m *Type) + type BuiltinTypes struct + AVIType Type + BMPType Type + CSSType Type + CSVType Type + CalendarType Type + GIFType Type + GPPType Type + HTMLType Type + JPEGType Type + JSONType Type + JSXType Type + JavascriptType Type + MP4Type Type + MPEGType Type + MarkdownType Type + OGGType Type + OctetType Type + OpenTypeFontType Type + PDFType Type + PNGType Type + RSSType Type + SASSType Type + SCSSType Type + SVGType Type + TIFFType Type + TOMLType Type + TSXType Type + TextType Type + TrueTypeFontType Type + TypeScriptType Type + WEBMType Type + WEBPType Type + WasmType Type + WebAppManifestType Type + XMLType Type + YAMLType Type + type MediaTypeConfig struct + Delimiter string + Suffixes []string + type SuffixInfo struct + FullSuffix string + Suffix string + type Type struct + Delimiter string + FirstSuffix SuffixInfo + MainType string + SubType string + SuffixesCSV string + Type string + func FromContent(types Types, extensionHints []string, content []byte) Type + func FromString(t string) (Type, error) + func FromStringAndExt(t, ext string) (Type, error) + func MustFromString(t string) Type + func WithDelimiterAndSuffixes(t Type, delimiter, suffixesCSV string) Type + func (m Type) IsText() bool + func (m Type) IsZero() bool + func (m Type) MarshalJSON() ([]byte, error) + func (m Type) String() string + func (m Type) Suffixes() []string + type Types []Type + var DefaultTypes Types + func (t Types) BySuffix(suffix string) []Type + func (t Types) GetByMainSubType(mainType, subType string) (tp Type, found bool) + func (t Types) GetBySuffix(suffix string) (tp Type, si SuffixInfo, found bool) + func (t Types) GetByType(tp string) (Type, bool) + func (t Types) GetFirstBySuffix(suffix string) (Type, SuffixInfo, bool) + func (t Types) IsTextSuffix(suffix string) bool + func (t Types) Len() int + func (t Types) Less(i, j int) bool + func (t Types) Swap(i, j int)