Documentation
¶
Index ¶
- Constants
- Variables
- func DetectContentType(filename string, b []byte) string
- func ResponseFile(w http.ResponseWriter, filename string) error
- 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"
)
Variables ¶
View Source
var ( //ErrUndefinedFormat error ErrUndefinedFormat = errors.New("undefined format") )
Functions ¶
func DetectContentType ¶
func ResponseFile ¶ added in v1.3.3
func ResponseFile(w http.ResponseWriter, filename string) error
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache model
func (*Cache) FromTarGZArchive ¶
FromTarGZArchive ...
func (*Cache) ResponseWrite ¶
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.