middleware

package
v0.0.0-...-e998ef4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorization

func Authorization() gin.HandlerFunc

func CSRF

func CSRF(options Options) gin.HandlerFunc

CSRF Middleware validates CSRF token.

func NewServiceDiscoveryClient

func NewServiceDiscoveryClient() *api.Client

func ServiceDiscovery

func ServiceDiscovery() gin.HandlerFunc

func Tracing

func Tracing() gin.HandlerFunc

func Translations

func Translations() gin.HandlerFunc

Types

type LoadBalancer

type LoadBalancer interface {
	Get(addrs []string) string
}

func NewRandom

func NewRandom(seed int64) LoadBalancer

NewRandom returns a load balancer that selects services randomly.

type Options

type Options struct {
	Secret        string
	IgnoreMethods []string
	ErrorFunc     gin.HandlerFunc
	TokenGetter   func(c *gin.Context) string
}

Options stores configurations for a CSRF middleware.

type ServiceCache

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

func NewServiceCache

func NewServiceCache() *ServiceCache

Jump to

Keyboard shortcuts

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