auth

package
v0.14.10 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("auth error")

Error is the default auth error class

Functions

func GetAPIKey

func GetAPIKey(ctx context.Context) ([]byte, bool)

GetAPIKey returns api key from context is exists

func ValidateAPIKey

func ValidateAPIKey(ctx context.Context, actualKey []byte) (err error)

ValidateAPIKey compares the context api key with the key passed in as an argument

func WithAPIKey

func WithAPIKey(ctx context.Context, key []byte) context.Context

WithAPIKey creates context with api key

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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