middlewares

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

Index

Constants

This section is empty.

Variables

View Source
var IndexFile = ""

Functions

func AuthHandler

func AuthHandler() gin.HandlerFunc

func GenerateToken

func GenerateToken(k []byte, userId string) (string, error)

func Security

func Security(tlsFingerprint string) gin.HandlerFunc

func Serve

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

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

func ServeStatic

func ServeStatic(url, root, index string) gin.HandlerFunc

func Static

func Static(root, index string) *localFileSystem

func ValidateToken

func ValidateToken(t string, k string) (*jwt.Token, error)

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