Documentation ¶
Index ¶
- Constants
- Variables
- func DetectContentType(filename string, b []byte) string
- type Cache
- func (c *Cache) FromBase64TarGZ(v string) error
- func (c *Cache) FromDir(dir string) error
- func (c *Cache) FromFile(filename string) error
- func (c *Cache) FromTarArchive(r io.Reader) error
- func (c *Cache) FromTarGZArchive(r io.Reader) error
- func (c *Cache) Get(filename string) ([]byte, string)
- func (c *Cache) List() []string
- func (c *Cache) Reset()
- func (c *Cache) ResponseWrite(w http.ResponseWriter, filename string) error
- func (c *Cache) Set(filename string, v []byte)
- func (c *Cache) ToBase64TarGZ() (string, error)
- func (c *Cache) ToFile(filename string) error
- func (c *Cache) ToTarArchive(w io.Writer) error
- func (c *Cache) ToTarGZArchive(w io.Writer) error
- type Reader
Constants ¶
View Source
const ( OctetStream = "application/octet-stream" TextPlain = "text/plain; charset=utf-8" )
Variables ¶
View Source
var ( //ErrUndefinedFormat error ErrUndefinedFormat = errors.New("undefined format") )
Functions ¶
func DetectContentType ¶ added in v1.0.6
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache model
func (*Cache) FromTarGZArchive ¶
FromTarGZArchive ...
func (*Cache) ResponseWrite ¶ added in v1.1.1
func (c *Cache) ResponseWrite(w http.ResponseWriter, filename string) error
ResponseWrite write file to response
Click to show internal directories.
Click to hide internal directories.