github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/mediatypes/media-types-application.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package mediatypes
     4  
     5  import (
     6  	"../mediatype"
     7  	"../protocol"
     8  )
     9  
    10  var (
    11  	ABW mediatype.MediaType
    12  	ARC mediatype.MediaType
    13  	BIN mediatype.MediaType
    14  	BZ  mediatype.MediaType
    15  	BZ2 mediatype.MediaType
    16  	CSH mediatype.MediaType
    17  
    18  	DOC mediatype.MediaType
    19  
    20  	EPUB mediatype.MediaType
    21  
    22  	GZ mediatype.MediaType
    23  
    24  	HTTP         mediatype.MediaType
    25  	HTTPRequest  mediatype.MediaType
    26  	HTTPResponse mediatype.MediaType
    27  
    28  	JAR        mediatype.MediaType
    29  	JavaScript mediatype.MediaType
    30  	JSON       mediatype.MediaType
    31  
    32  	OGX mediatype.MediaType
    33  
    34  	PDF mediatype.MediaType
    35  	// TODO::: Can it be a mediatype?? Due it can't represent its data without schema
    36  	Protobuf mediatype.MediaType
    37  
    38  	RAR mediatype.MediaType
    39  	RTF mediatype.MediaType
    40  
    41  	SRPC   mediatype.MediaType
    42  	Syllab mediatype.MediaType
    43  	SevenZ mediatype.MediaType
    44  	SH     mediatype.MediaType
    45  	SWF    mediatype.MediaType
    46  
    47  	TAR mediatype.MediaType
    48  
    49  	URI mediatype.MediaType
    50  
    51  	WASM mediatype.MediaType
    52  
    53  	XML   mediatype.MediaType
    54  	XHTML mediatype.MediaType
    55  
    56  	ZIP mediatype.MediaType
    57  	ZZ  mediatype.MediaType
    58  )
    59  
    60  // Vendor specific application mediatype
    61  var (
    62  	AZW mediatype.MediaType
    63  
    64  	LOG mediatype.MediaType
    65  
    66  	MPKG mediatype.MediaType
    67  
    68  	ODP mediatype.MediaType
    69  	ODS mediatype.MediaType
    70  	ODT mediatype.MediaType
    71  
    72  	PPT mediatype.MediaType
    73  
    74  	VSD mediatype.MediaType
    75  
    76  	XLS mediatype.MediaType
    77  	XUL mediatype.MediaType
    78  )
    79  
    80  func init() {
    81  	ABW.Init("application/x-abiword")
    82  	ABW.SetFileExtension("abw")
    83  	ABW.SetDetail(protocol.LanguageEnglish, "AbiWord document", "", "", "", "", []string{})
    84  
    85  	ARC.Init("application/octet-stream")
    86  	ARC.SetFileExtension("arc")
    87  	ARC.SetDetail(protocol.LanguageEnglish, "Archive document (multiple files embedded)", "", "", "", "", []string{})
    88  
    89  	BIN.Init("application/octet-stream")
    90  	BIN.SetFileExtension("bin")
    91  	BIN.SetDetail(protocol.LanguageEnglish, "Any kind of binary data", "", "", "", "", []string{})
    92  
    93  	BZ.Init("application/x-bzip")
    94  	BZ.SetFileExtension("bz")
    95  	BZ.SetDetail(protocol.LanguageEnglish, "BZip archive", "", "", "", "", []string{})
    96  
    97  	BZ2.Init("application/x-bzip2")
    98  	BZ.SetFileExtension("bz2")
    99  	BZ.SetDetail(protocol.LanguageEnglish, "BZip2 archive", "", "", "", "", []string{})
   100  
   101  	CSH.Init("application/x-csh")
   102  	CSH.SetFileExtension("csh")
   103  	CSH.SetDetail(protocol.LanguageEnglish, "C-Shell script", "", "", "", "", []string{})
   104  
   105  	DOC.Init("application/msword")
   106  	DOC.SetFileExtension("doc")
   107  	DOC.SetDetail(protocol.LanguageEnglish, "Microsoft Word", "", "", "", "", []string{})
   108  
   109  	EPUB.Init("application/epub+zip")
   110  	EPUB.SetFileExtension("epub")
   111  	EPUB.SetDetail(protocol.LanguageEnglish, "Electronic publication", "", "", "", "", []string{})
   112  
   113  	GZ.Init("application/gzip")
   114  	GZ.SetFileExtension("gz")
   115  	GZ.SetDetail(protocol.LanguageEnglish, "",
   116  		"strictly speaking under MIME gzip would only be used as an encoding, not a content-type, but it's common to have .gz files",
   117  		"",
   118  		"",
   119  		"",
   120  		[]string{})
   121  
   122  	HTTP.Init("application/http")
   123  	HTTP.SetInfo(protocol.Software_PreAlpha, 0, "https://www.iana.org/assignments/media-types/application/http")
   124  	HTTP.SetFileExtension("http")
   125  	HTTP.SetDetail(protocol.LanguageEnglish, "Hypertext Transfer Protocol",
   126  		"An application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information",
   127  		"",
   128  		"",
   129  		"",
   130  		[]string{})
   131  
   132  	HTTPRequest.Init("application/http; request")
   133  	HTTPRequest.SetFileExtension("reqhttp")
   134  	HTTPRequest.SetDetail(protocol.LanguageEnglish, "Hypertext Transfer Protocol Request", "", "", "", "", []string{})
   135  
   136  	HTTPResponse.Init("application/http; response")
   137  	HTTPResponse.SetFileExtension("reshttp")
   138  	HTTPResponse.SetDetail(protocol.LanguageEnglish, "Hypertext Transfer Protocol Response", "", "", "", "", []string{})
   139  
   140  	JAR.Init("application/java-archive")
   141  	JAR.SetFileExtension("jar")
   142  	JAR.SetDetail(protocol.LanguageEnglish, "Java Archive", "", "", "", "", []string{})
   143  
   144  	JavaScript.Init("application/javascript")
   145  	JavaScript.SetFileExtension("js")
   146  	JavaScript.SetDetail(protocol.LanguageEnglish, "JavaScript (ECMAScript) programming language", "", "", "", "", []string{})
   147  
   148  	JSON.Init("application/json")
   149  	JSON.SetFileExtension("json")
   150  	JSON.SetDetail(protocol.LanguageEnglish, "JavaScript Object Notation format", "", "", "", "", []string{})
   151  
   152  	OGX.Init("application/ogg")
   153  	OGX.SetFileExtension("ogx")
   154  	OGX.SetDetail(protocol.LanguageEnglish, "OGG", "", "", "", "", []string{})
   155  
   156  	PDF.Init("application/pdf")
   157  	PDF.SetFileExtension("pdf")
   158  	PDF.SetDetail(protocol.LanguageEnglish, "Adobe Portable Document Format", "", "", "", "", []string{})
   159  
   160  	Protobuf.Init("application/protobuf")
   161  	Protobuf.SetFileExtension("protobuf")
   162  	Protobuf.SetInfo(protocol.Software_PreAlpha, 0, "https://datatracker.ietf.org/doc/html/draft-rfernando-protocol-buffers-00")
   163  	Protobuf.SetDetail(protocol.LanguageEnglish, "", "", "", "", "", []string{})
   164  
   165  	RAR.Init("application/x-rar-compressed")
   166  	RAR.SetFileExtension("rar")
   167  	RAR.SetDetail(protocol.LanguageEnglish, "RAR archive", "", "", "", "", []string{})
   168  
   169  	RTF.Init("application/rtf")
   170  	RTF.SetFileExtension("rtf")
   171  	RTF.SetDetail(protocol.LanguageEnglish, "Rich Text Format", "", "", "", "", []string{})
   172  
   173  	SRPC.Init("application/srpc")
   174  	SRPC.SetFileExtension("srpc")
   175  	SRPC.SetDetail(protocol.LanguageEnglish, "Syllab Remote procedure call protocol", "", "", "", "", []string{})
   176  
   177  	Syllab.Init("application/syllab")
   178  	Syllab.SetFileExtension("syllab")
   179  	Syllab.SetDetail(protocol.LanguageEnglish, "Syllab codec protocol", "", "", "", "", []string{})
   180  
   181  	SevenZ.Init("application/x-7z-compressed")
   182  	SevenZ.SetFileExtension("7z")
   183  	SevenZ.SetDetail(protocol.LanguageEnglish, "7-zip archive", "", "", "", "", []string{})
   184  
   185  	SH.Init("application/x-sh")
   186  	SH.SetFileExtension("sh")
   187  	SH.SetDetail(protocol.LanguageEnglish, "Bourne shell script", "", "", "", "", []string{})
   188  
   189  	SWF.Init("application/x-shockwave-flash")
   190  	SWF.SetFileExtension("swf")
   191  	SWF.SetDetail(protocol.LanguageEnglish, "Small web format (SWF) or Adobe Flash document", "", "", "", "", []string{})
   192  
   193  	TAR.Init("application/tar")
   194  	TAR.SetFileExtension("tar")
   195  	TAR.SetDetail(protocol.LanguageEnglish, "Tape Archive", "", "", "", "", []string{})
   196  
   197  	URI.Init("application/uri")
   198  	URI.SetFileExtension("uri")
   199  	URI.SetDetail(protocol.LanguageEnglish, "URI", "", "", "", "", []string{})
   200  
   201  	WASM.Init("application/wasm")
   202  	WASM.SetFileExtension("wasm")
   203  	WASM.SetDetail(protocol.LanguageEnglish, "WebAssembly",
   204  		"WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine",
   205  		"", "", "",
   206  		[]string{})
   207  
   208  	XML.Init("application/xml")
   209  	XML.SetFileExtension("xml")
   210  	XML.SetDetail(protocol.LanguageEnglish, "XML format", "", "", "", "", []string{})
   211  
   212  	XHTML.Init("application/xhtml+xml")
   213  	XHTML.SetFileExtension("xhtml")
   214  	XHTML.SetDetail(protocol.LanguageEnglish, "", "", "", "", "", []string{})
   215  
   216  	ZIP.Init("application/zip")
   217  	ZIP.SetFileExtension("zip")
   218  	ZIP.SetDetail(protocol.LanguageEnglish, "ZIP archive", "", "", "", "", []string{})
   219  
   220  	ZZ.Init("application/defalate")
   221  	ZZ.SetFileExtension("zz") // https://fileinfo.com/extension/zz
   222  	ZZ.SetDetail(protocol.LanguageEnglish, "zlib archive", "", "", "", "", []string{})
   223  
   224  	// Vendor specific application mediatype
   225  
   226  	AZW.Init("application/vnd.amazon.ebook")
   227  	AZW.SetFileExtension("azw")
   228  	AZW.SetDetail(protocol.LanguageEnglish, "Amazon Kindle eBook format", "", "", "", "", []string{})
   229  
   230  	LOG.Init("application/vnd.log.protocol+syllab")
   231  	LOG.SetFileExtension("log")
   232  
   233  	MPKG.Init("application/vnd.apple.installer+xml")
   234  	MPKG.SetFileExtension("mpkg")
   235  	MPKG.SetDetail(protocol.LanguageEnglish, "Apple Installer Package", "", "", "", "", []string{})
   236  
   237  	ODP.Init("application/vnd.oasis.opendocument.presentation")
   238  	ODP.SetFileExtension("odp")
   239  	ODP.SetDetail(protocol.LanguageEnglish, "OpenDocument presentation document", "", "", "", "", []string{})
   240  
   241  	ODS.Init("application/vnd.oasis.opendocument.spreadsheet")
   242  	ODS.SetFileExtension("ods")
   243  	ODS.SetDetail(protocol.LanguageEnglish, "OpenDocument spreadsheet document", "", "", "", "", []string{})
   244  
   245  	ODT.Init("application/vnd.oasis.opendocument.text")
   246  	ODT.SetFileExtension("odt")
   247  	ODT.SetDetail(protocol.LanguageEnglish, "OpenDocument text document", "", "", "", "", []string{})
   248  
   249  	PPT.Init("application/vnd.ms-powerpoint")
   250  	PPT.SetFileExtension("ppt")
   251  	PPT.SetDetail(protocol.LanguageEnglish, "Microsoft PowerPoint", "", "", "", "", []string{})
   252  
   253  	VSD.Init("application/vnd.visio")
   254  	VSD.SetFileExtension("vsd")
   255  	VSD.SetDetail(protocol.LanguageEnglish, "Microsoft Visio", "", "", "", "", []string{})
   256  
   257  	XLS.Init("application/vnd.ms-excel")
   258  	XLS.SetFileExtension("xls")
   259  	XLS.SetDetail(protocol.LanguageEnglish, "Microsoft Excel", "", "", "", "", []string{})
   260  
   261  	XUL.Init("application/vnd.mozilla.xul+xml")
   262  	XUL.SetFileExtension("xul")
   263  }