helper

package
v1.0.0-dev-2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AuthorizationHeader = "Authorization"
View Source
const BearerPrefix = "Bearer "
View Source
const ContentTypeHeader = "Content-Type"
View Source
const ContentTypeValueJSON = "application/json"
View Source
const XAPIKeyHeader = "X-API-Key" // nolint: gosec

XAPIKeyHeader defines the header name for passing API keys. This is not a credential itself, but a standard HTTP header key.

Variables

This section is empty.

Functions

func APIKey

func APIKey(c echo.Context) string

APIKey extracts the API key from the request headers. It checks headers in the following order of precedence: 1. X-API-Key header (raw value) 2. Authorization header (with "Bearer " prefix removed if present) Returns an empty string if no API key is found.

func FlagSet

func FlagSet(flagsetManager service.FlagsetManager, apiKey string) (*ffclient.GoFeatureFlag, *echo.HTTPError)

FlagSet retrieves the flagset for the given API key from the flagset manager This layer ensure that the flagset manager is initialized and that the API key is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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