types

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 微软 Office Word 格式(Microsoft Word 97 - 2004 document)
	EXT_DOC = ".doc"
	CT_DOC  = "application/msword"
	// 微软 Office Word 文档格式
	EXT_DOCX = ".docx"
	CT_DOCX  = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
	// 微软 Office Excel 格式(Microsoft Excel 97 - 2004 Workbook)
	EXT_XLS = ".xls"
	CT_XLS  = "application/vnd.ms-excel"
	// 微软 Office Excel 文档格式
	EXT_XLSX = ".xlsx"
	CT_XLSX  = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
	// 微软 Office PowerPoint 格式(Microsoft PowerPoint 97 - 2003 演示文稿)
	EXT_PPT = ".ppt"
	CT_PPT  = "application/vnd.ms-powerpoint"
	// 微软 Office PowerPoint 文稿格式
	EXT_PPTX = ".pptx"
	CT_PPTX  = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
	// GZ 压缩文件格式
	EXT_GZ   = ".gz"
	CT_GZ    = "application/x-gzip"
	EXT_GZIP = ".gzip"
	CT_GZIP  = CT_GZ
	// ZIP 压缩文件格式
	EXT_ZIP  = ".zip"
	CT_ZIP   = "application/zip"
	EXT_7ZIP = ".7zip"
	CT_7ZIP  = CT_ZIP
	// RAR 压缩文件格式
	EXT_RAR = ".rar"
	CT_RAR  = "application/rar"
	// TAR 压缩文件格式
	EXT_TAR = ".tar"
	CT_TAR  = "application/x-tar"
	EXT_TGZ = ".tgz"
	CT_TGZ  = CT_TAR
	// PDF 是 Portable Document Format 的简称,即便携式文档格式
	EXT_PDF = ".pdf"
	CT_PDF  = "application/pdf"
	// RTF 是指 Rich Text Format,即通常所说的富文本格式
	EXT_RTF = ".rtf"
	CT_RTF  = "application/rtf"
	// GIF 图像格式
	EXT_GIF = ".gif"
	CT_GIF  = "image/gif"
	// JPG(JPEG) 图像格式
	EXT_JPEG = ".jpeg"
	CT_JPEG  = "image/jpeg"
	EXT_JPG  = ".jpg"
	CT_JPG   = CT_JPEG
	// JPG2 图像格式
	EXT_JPG2 = ".jpg2"
	CT_JPG2  = "image/jp2"
	// PNG 图像格式
	EXT_PNG = ".png"
	CT_PNG  = "image/png"
	// TIF(TIFF) 图像格式
	EXT_TIFF = ".tiff"
	CT_TIFF  = "image/tiff"
	EXT_TIF  = ".tif"
	CT_TIF   = CT_TIFF
	// BMP 图像格式(位图格式)
	EXT_BMP = ".bmp"
	CT_BMP  = "image/bmp"
	// SVG 图像格式
	EXT_SVG  = ".svg"
	CT_SVG   = "image/svg+xml"
	EXT_SVGZ = ".svgz"
	CT_SVGZ  = CT_SVG
	// WebP 图像格式
	EXT_WEBP = ".webp"
	CT_WEBP  = "image/webp"
	// ico 图像格式,通常用于浏览器 Favicon 图标
	EXT_ICO = ".ico"
	CT_ICO  = "image/x-icon"
	// 金山 Office 文字排版文件格式
	EXT_WPS = ".wps"
	CT_WPS  = "application/kswps"
	// 金山 Office 表格文件格式
	EXT_ET = ".et"
	CT_ET  = "application/kset"
	// 金山 Office 演示文稿格式
	EXT_DPS = ".dps"
	CT_DPS  = "application/ksdps"
	// Photoshop 源文件格式
	EXT_PSD = ".psd"
	CT_PSD  = "application/x-photoshop"
	// Coreldraw 源文件格式
	EXT_CDR = ".cdr"
	CT_CDR  = "application/x-coreldraw"
	// Adobe Flash 源文件格式
	EXT_SWF = ".swf"
	CT_SWF  = "application/x-shockwave-flash"
	// 普通文本格式
	EXT_TXT = ".txt"
	CT_TXT  = "text/plain"
	EXT_MD  = ".md"
	CT_MD   = CT_TXT
	// Javascript 文件类型
	EXT_JS = ".js"
	CT_JS  = "application/x-javascript"
	// 表示 CSS 样式表
	EXT_CSS = ".css"
	CT_CSS  = "text/css"
	// csv
	EXT_CSV = ".csv"
	CT_CSV  = "text/csv"
	// HTML 文件格式
	EXT_HTML  = ".html"
	CT_HTML   = "text/html"
	EXT_HTM   = ".htm"
	CT_HTM    = CT_HTML
	EXT_SHTML = ".shtml"
	CT_SHTML  = CT_HTML
	// XHTML 文件格式
	EXT_XHTML = ".xhtml"
	CT_XHTML  = "application/xhtml+xml"
	EXT_XHT   = ".xht"
	CT_XHT    = CT_XHTML
	// XML 文件格式
	EXT_XML = ".xml"
	CT_XML  = "text/xml"
	// VCF 文件格式
	EXT_VCF = ".vcf"
	CT_VCF  = "text/x-vcard"
	// PHP 文件格式
	EXT_PHP   = ".php"
	CT_PHP    = "application/x-httpd-php"
	EXT_PHP3  = ".php3"
	CT_PHP3   = CT_PHP
	EXT_PHP4  = ".php4"
	CT_PHP4   = CT_PHP
	EXT_PHTML = ".phtml"
	CT_PHTML  = CT_PHP
	// Java 归档文件格式
	EXT_JAR = ".jar"
	CT_JAR  = "application/java-archive"
	// Android 平台包文件格式
	EXT_APK = ".apk"
	CT_APK  = "application/vnd.android.package-archive"
	// Windows 系统可执行文件格式
	EXT_EXE = ".exe"
	CT_EXE  = "application/octet-stream"
	// PEM 文件格式
	EXT_PEM  = ".pem"
	CT_PEM   = "application/x-x509-user-cert"
	EXT_CERT = ".cert"
	CT_CERT  = CT_PEM
	// mpeg 音频格式
	EXT_MP3 = ".mp3"
	CT_MP3  = "audio/mpeg"
	// mid 音频格式
	EXT_MID  = ".mid"
	CT_MID   = "audio/midi"
	EXT_MIDI = ".midi"
	CT_MIDI  = CT_MID
	// wav 音频格式
	EXT_WAV = ".wav"
	CT_WAV  = "audio/x-wav"
	// m3u 音频格式
	EXT_M3U = ".m3u"
	CT_M3U  = "audio/x-mpegurl"
	// m4a 音频格式
	EXT_M4A = ".m4a"
	CT_M4A  = "audio/x-m4a"
	// ogg 音频格式
	EXT_OGG = ".ogg"
	CT_OGG  = "audio/ogg"
	// Real Audio 音频格式
	EXT_RA = ".ra"
	CT_RA  = "audio/x-realaudio"
	// mp4 视频格式
	EXT_MP4 = ".mp4"
	CT_MP4  = "video/mp4"
	// mpeg 视频格式
	EXT_MPEG = ".mpeg"
	CT_MPEG  = "video/mpeg"
	EXT_MPG  = ".mpg"
	CT_MPG   = CT_MPEG
	EXT_MPE  = ".mpe"
	CT_MPE   = CT_MPEG
	// QuickTime 视频格式
	EXT_MOV = ".mov"
	CT_MOV  = "video/quicktime"
	EXT_QT  = ".qt"
	CT_QT   = CT_MOV
	// m4v 视频格式
	EXT_M4V = ".m4v"
	CT_M4V  = "video/x-m4v"
	// wmv 视频格式(Windows 操作系统上的一种视频格式)
	EXT_WMV = ".wmv"
	CT_WMV  = "video/x-ms-wmv"
	// avi 视频格式
	EXT_AVI = ".avi"
	CT_AVI  = "video/x-msvideo"
	// webm 视频格式
	EXT_WEBM = ".webm"
	CT_WEBM  = "video/webm"
	// 一种基于 flash 技术的视频格式
	EXT_FLV = ".flv"
	CT_FLV  = "video/x-flv"
)

Variables

View Source
var (
	ErrNilZipFile      = errors.New("the input zip file is nil")
	ErrEmptyRID        = errors.New("the rId is empty")
	ErrNonePart        = errors.New("the document part resolves failed or not exists")
	ErrNoSlide         = errors.New("the specified slide is not found")
	ErrNoSheet         = errors.New("the specified sheet is not found")
	ErrNoSharedStrings = errors.New("the sharedStrings.xml file is not found")
	ErrNoDocument      = errors.New("the document.xml file is not found")
	ErrNoComments      = errors.New("the comments.xml file is not found")
	ErrNoEndnotes      = errors.New("the endnotes.xml file is not found")
	ErrNoFootnotes     = errors.New("the footnotes.xml file is not found")
)

Functions

This section is empty.

Types

type Image

type Image struct {
	Raw    image.Image
	Name   string
	Format string
}

type OCR

type OCR interface {
	Run(r io.Reader) (string, error)
	Close() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL