gitea: code.gitea.io/gitea/modules/public Index | Files

package public

import "code.gitea.io/gitea/modules/public"

Index

Package Files

dynamic.go public.go

func Custom Uses

func Custom(opts *Options) macaron.Handler

Custom implements the macaron static handler for serving custom assets.

func GenerateETag Uses

func GenerateETag(fileSize, fileName, modTime string) string

GenerateETag generates an ETag based on size, filename and file modification time

func Static Uses

func Static(opts *Options) macaron.Handler

Static implements the macaron static handler for serving assets.

func StaticHandler Uses

func StaticHandler(dir string, opts *Options) macaron.Handler

StaticHandler sets up a new middleware for serving static files in the

type Options Uses

type Options struct {
    Directory   string
    IndexFile   string
    SkipLogging bool
    // if set to true, will enable caching. Expires header will also be set to
    // expire after the defined time.
    ExpiresAfter time.Duration
    FileSystem   http.FileSystem
    Prefix       string
}

Options represents the available options to configure the macaron handler.

Package public imports 9 packages (graph) and is imported by 3 packages. Updated 2019-09-03. Refresh now. Tools for package owners.