util

package
v5.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTLSEmptyCertOrPK  = errors.New("when TLS is enabled, server certificate chain & server private key parameters are mandatory")
	ErrTLSInvalidVersion = errors.New("invalid TLS version")
)

Functions

func GetClientKey

func GetClientKey(apikey string) (string, error)

GetClientKey accepts an apikey and extracts the "client-key" portion of it

func GetMetadata

func GetMetadata(proxy bool, ipAddressEnabled bool) dtos.Metadata

GetMetadata wrapps metadata

func HashAPIKey

func HashAPIKey(apikey string) uint32

HashAPIKey hashes apikey

func TLSConfigForServer added in v5.3.0

func TLSConfigForServer(cfg *conf.TLS) (*tls.Config, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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