middleware

package
v0.0.0-...-bf8aa72 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module contains all the dependencies that power api middleware

Functions

func Recover

func Recover(next http.Handler) http.HandlerFunc

Recover is simple middle ware for recovering from a panic that may occur downstream in the application

Types

type Logger

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

func NewLogger

func NewLogger(log *zap.Logger) *Logger

func (*Logger) LogRequests

func (l *Logger) LogRequests(next http.Handler) http.Handler

type SlackVerifier

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

SlackVerifier is used to ensure requests are from Slack

func NewSlackVerifier

func NewSlackVerifier(
	settings config.SlackSettings,
	log *zap.Logger,
) *SlackVerifier

func (*SlackVerifier) Verify

Verify is a method that serves as a middle for requests handlers from Slack. Slack signs all requests with the application issued signing key, and this middleware verifies the request is legit, sending back an http error and returning before handling control to the next middleware

Jump to

Keyboard shortcuts

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