fileserver

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DynamicResourcePath = "system/"

Variables

View Source
var ValidExtensions = map[string]struct{}{
	".jpg":  {},
	".jpeg": {},
	".png":  {},
	".gif":  {},
	".bmp":  {},
	".svg":  {},
	".webp": {},
	".webm": {},
}

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*Handler, error)

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type Option

type Option func(*Options)

func WithCacheTimeout

func WithCacheTimeout(timeout int) Option

func WithContainer

func WithContainer(container types.Container) Option

type Options

type Options struct {
	Container    types.Container
	CacheTimeout int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL