hel

package
v0.0.0-...-bd72e36 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	ID     string
	Name   string
	Device string
}

Info is information transmitted by helgrind via the request headers.

type Verifier

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

A Verifier is used to verify and parse the information received from the gateway.

func NewVerifier

func NewVerifier(secret string) (verifier *Verifier, err error)

NewVerifier creates a new Verifier using the given base64 encoded secret to verify the helgrind headers.

func (Verifier) ParseInfo

func (v Verifier) ParseInfo(header http.Header) (info Info, valid bool)

ParseInfo extracts the information from the helgrind gateway in the given headers and verifies the signature for it.

Jump to

Keyboard shortcuts

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