module

package
v0.0.0-...-0bbe525 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterArchModule

func RegisterArchModule(exts []string, funcArchFiles func(r ReaderAt) []string, funcArchRead func(r ReaderAt, vpath string) *File)

func RegisterImageModule

func RegisterImageModule(exts []string, funcImageRead func(r Reader) *File)

func SupportType

func SupportType() map[ModuleType][]string

Types

type File

type File struct {
	Data io.ReadCloser
	Mime string
	Size int64
}

type FileReader

type FileReader struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

func (*FileReader) Size

func (o *FileReader) Size() int64

type FileReaderAt

type FileReaderAt struct {
	// contains filtered or unexported fields
}

func (*FileReaderAt) Size

func (o *FileReaderAt) Size() int64

type Module

type Module struct {
	Type ModuleType
	// archive type
	FuncArchFiles func(r ReaderAt) []string
	FuncArchRead  func(r ReaderAt, vpath string) *File
	// image type
	FuncImageRead func(r Reader) *File
	// contains filtered or unexported fields
}

func GetSupportModule

func GetSupportModule(path string) *Module

type ModuleType

type ModuleType int
const (
	MODULE_IMAGE ModuleType = iota
	MODULE_ARCH
)

type Reader

type Reader interface {
	Close() error
	Read(p []byte) (n int, err error)
	Size() int64
}

func NewReader

func NewReader(file io.ReadCloser, size int64) (r Reader, err error)

type ReaderAt

type ReaderAt interface {
	Reader
	ReadAt(p []byte, off int64) (n int, err error)
}

func NewReaderAt

func NewReaderAt(path string) (r ReaderAt, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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