middleware

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	Key         string
	TimeCreated time.Time
	Expiration  float64
	Expired     bool
}

func GenerateKey

func GenerateKey(name string, seconds float64) APIKey

type Authenticator

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

func NewAuthenticator

func NewAuthenticator(key *APIKey, handler http.Handler) *Authenticator

func (*Authenticator) ServeHTTP

func (a *Authenticator) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Logger

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

func NewLogger

func NewLogger(handler http.Handler) *Logger

func (*Logger) ServeHTTP

func (l *Logger) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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