add the new StaticEmbeddedGzip on the Party interface, it works within multiple levels like the StaticEmbedded, so why not

Former-commit-id: f62c863344a06277935730449d5466fecbc64993
This commit is contained in:
Gerasimos Maropoulos 2018-03-15 23:15:10 +02:00
parent 89022c7051
commit 87036fdb6c

View File

@ -188,7 +188,15 @@ type Party interface {
// //
// Example: https://github.com/kataras/iris/tree/master/_examples/file-server/embedding-files-into-app // Example: https://github.com/kataras/iris/tree/master/_examples/file-server/embedding-files-into-app
StaticEmbedded(requestPath string, vdir string, assetFn func(name string) ([]byte, error), namesFn func() []string) *Route StaticEmbedded(requestPath string, vdir string, assetFn func(name string) ([]byte, error), namesFn func() []string) *Route
// StaticEmbeddedGzip registers a route which can serve embedded gziped files
// that are embedded using the https://github.com/kataras/bindata tool and only.
// It's 8 times faster than the `StaticEmbeddedHandler` with `go-bindata` but
// it sends gzip response only, so the client must be aware that is expecting a gzip body
// (browsers and most modern browsers do that, so you can use it without fair).
//
//
// Example: https://github.com/kataras/iris/tree/master/_examples/file-server/embedding-gziped-files-into-app
StaticEmbeddedGzip(requestPath string, vdir string, gzipAssetFn func(name string) ([]byte, error), gzipNamesFn func() []string) *Route
// Favicon serves static favicon // Favicon serves static favicon
// accepts 2 parameters, second is optional // accepts 2 parameters, second is optional
// favPath (string), declare the system directory path of the __.ico // favPath (string), declare the system directory path of the __.ico