middleware

package
v0.0.1-alpha5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chi

type Chi struct {
	AuthService *auth.AuthService
}

func (*Chi) AuthMiddleware

func (c *Chi) AuthMiddleware(next http.Handler) http.Handler

func (*Chi) GetUserID

func (c *Chi) GetUserID(ctx context.Context) string

type RouterStrategy

type RouterStrategy struct {
	Strategy Strategy
}

func (*RouterStrategy) AuthMiddleware

func (s *RouterStrategy) AuthMiddleware(next http.Handler) http.Handler

func (*RouterStrategy) GetUserID

func (s *RouterStrategy) GetUserID(ctx context.Context) string

type Strategy

type Strategy interface {
	GetUserID(ctx context.Context) string
	AuthMiddleware(next http.Handler) http.Handler
}

Jump to

Keyboard shortcuts

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