restapi

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const KeyHeader = "x-api-key" // Header for API key

Variables

View Source
var (
	ErrInvalidApiKey = errors.New("invalid api key")
	ErrInvalidAction = errors.New("invalid action")
)

Functions

func ValidateApiKey

func ValidateApiKey(r *http.Request, apiKey string) bool

ValidateApiKey checks if the provided API key matches the one in the request header.

Types

This section is empty.

Jump to

Keyboard shortcuts

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