apimiddleware

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyAuth

func APIKeyAuth(config APIKeyConfig) echo.MiddlewareFunc

Types

type APIKeyCache

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

func NewAPIKeyCache

func NewAPIKeyCache(userStor stor.UserStor) *APIKeyCache

func (*APIKeyCache) DeleteUserByAPIKey

func (c *APIKeyCache) DeleteUserByAPIKey(apikey string)

func (*APIKeyCache) GetUserByAPIKey

func (c *APIKeyCache) GetUserByAPIKey(apikey string) (*mcmodel.User, error)

type APIKeyConfig

type APIKeyConfig struct {
	Skipper         middleware.Skipper
	Keyname         string
	GetUserByAPIKey GetUserByAPIKeyFN
}

type GetUserByAPIKeyFN

type GetUserByAPIKeyFN func(string) (*mcmodel.User, error)

Jump to

Keyboard shortcuts

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