Documentation ¶
Index ¶
Constants ¶
const (
// DefaultMaxAge is 60 days.
DefaultMaxAge = 86400
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentFunc ¶
ContentFunc is an alias for the Asset method of the generated bindata.go file.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the base struct used to serve the bindata.
func NewGzipHandler ¶
func NewGzipHandler(contentFn ContentFunc, namesFn NamesFunc, level int) (*Handler, error)
NewGzipHandler return a handler that compress the assets. The level parameter is the compression level used by gzip, see: https://golang.org/pkg/compress/gzip/#pkg-constants
func NewHandler ¶
func NewHandler(contentFn ContentFunc, namesFn NamesFunc) *Handler
NewHandler create a new Handler. contentFn is the Asset method and namesFn is the AssetNames method from the generated bindata.go.
func (*Handler) AddIndexes ¶
AddIndexes adds possible indexes. For example if there are one or more directories that contains an index.html file that you want to serve when the directory name is requested then add "index.html".
func (*Handler) Register ¶
func (h *Handler) Register(r *gin.RouterGroup)
Register adds the static handlers to the gin.RouterGroup.