webserver

package
v0.0.0-...-46663fa Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-26

Package webserver Created by RTT. Author: teocci@yandex.com on 2021-Nov-03

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-27

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-26

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func HandleIndex

func HandleIndex(c *gin.Context)

func LocalFile

func LocalFile(root string, indexes bool) *localFileSystem

func Serve

func Serve(urlPrefix string, fs ServeFileSystem) gin.HandlerFunc

Serve returns a middleware handler that serves static files in the given directory.

func ServeRoot

func ServeRoot(urlPrefix, root string) gin.HandlerFunc

func Start

func Start()

Types

type ServeFileSystem

type ServeFileSystem interface {
	http.FileSystem
	Exists(prefix string, path string) bool
}

Jump to

Keyboard shortcuts

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