README ¶ http-common Golang net/http common types Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Variables type Dir func NewDir(name string, reader func(count int) (items []os.FileInfo, err error)) *Dir func (f *Dir) Close() error func (f *Dir) Read(p []byte) (n int, err error) func (f *Dir) Readdir(count int) (items []os.FileInfo, err error) func (f *Dir) Seek(offset int64, whence int) (int64, error) func (f *Dir) Stat() (os.FileInfo, error) type File func NewFile(info os.FileInfo, open func() (iocommon.ReadSeekCloser, error)) *File func (f *File) Close() error func (f *File) Read(p []byte) (n int, err error) func (f *File) Readdir(count int) ([]os.FileInfo, error) func (f *File) Seek(offset int64, whence int) (n int64, err error) func (f *File) Stat() (os.FileInfo, error) Constants ¶ This section is empty. Variables ¶ View Source var ( ErrIsDir = errors.New("is directory") ErrIsFile = errors.New("is file") ) Functions ¶ This section is empty. Types ¶ type Dir ¶ type Dir struct { Name string Reader func(count int) (items []os.FileInfo, err error) } func NewDir ¶ func NewDir(name string, reader func(count int) (items []os.FileInfo, err error)) *Dir func (*Dir) Close ¶ func (f *Dir) Close() error func (*Dir) Read ¶ func (f *Dir) Read(p []byte) (n int, err error) func (*Dir) Readdir ¶ func (f *Dir) Readdir(count int) (items []os.FileInfo, err error) func (*Dir) Seek ¶ func (f *Dir) Seek(offset int64, whence int) (int64, error) func (*Dir) Stat ¶ func (f *Dir) Stat() (os.FileInfo, error) type File ¶ type File struct { FileInfo os.FileInfo // contains filtered or unexported fields } func NewFile ¶ func NewFile(info os.FileInfo, open func() (iocommon.ReadSeekCloser, error)) *File func (*File) Close ¶ func (f *File) Close() error func (*File) Read ¶ func (f *File) Read(p []byte) (n int, err error) func (*File) Readdir ¶ func (f *File) Readdir(count int) ([]os.FileInfo, error) func (*File) Seek ¶ func (f *File) Seek(offset int64, whence int) (n int64, err error) func (*File) Stat ¶ func (f *File) Stat() (os.FileInfo, error) Source Files ¶ View all Source files dir.goerrors.gohttpcommon.go Click to show internal directories. Click to hide internal directories.