interceptor

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JournalID a random id used by log journal
	JournalID = "journal-id"
	// Authorization used by auth, both gateway and grpc
	Authorization = "authorization"
	// AuthorizationProxy used by signature, both gateway and grpc
	AuthorizationProxy = "authorization-proxy"
	// Date GMT format
	Date = "date"
	// Method http.XXXMethod
	Method = "method"
	// URI url encoded
	URI = "uri"
	// Body string body
	Body = "body"
	// XForwardedFor forwarded for
	XForwardedFor = "x-forwarded-for"
	// XForwardedHost forwarded host
	XForwardedHost = "x-forwarded-host"
	// OctetStream binary files
	OctetStream = "octet-stream"
)

Variables

This section is empty.

Functions

func FileDescriptorHasResloved added in v1.3.7

func FileDescriptorHasResloved(fullMethod string) bool

func IgnoreFileDescriptor added in v1.5.3

func IgnoreFileDescriptor(fds []protoreflect.FileDescriptor)

IgnoreFileDescriptor ignore some methods

func RegisteAuthorizationProxyValidator added in v1.3.0

func RegisteAuthorizationProxyValidator(name string, handler proposal.SignatureHandler)

RegisteAuthorizationProxyValidator signature handler for interceptor options.authorization_proxy

func RegisteAuthorizationValidator added in v1.3.0

func RegisteAuthorizationValidator(name string, handler proposal.UserinfoHandler)

RegisteAuthorizationValidator userinfo handler for interceptor options.authorization

func RegisteWhitelistingValidator added in v1.3.0

func RegisteWhitelistingValidator(name string, handler proposal.WhitelistingHandler)

RegisteWhitelistingValidator whiteling handler for interceptor options.whitelisting

func ResloveFileDescriptor added in v1.3.0

func ResloveFileDescriptor(role Role)

ResloveFileDescriptor reslove options from FileDescriptor

func StreamClientInterceptor added in v1.3.1

func StreamClientInterceptor(logger *zap.Logger, notify proposal.NotifyHandler, signer proposal.Signer, projectName string) grpc.StreamClientInterceptor

StreamClientInterceptor stream interceptor for client

func StreamGatewayInterceptor added in v1.3.7

func StreamGatewayInterceptor(logger *zap.Logger, notify proposal.NotifyHandler, metrics func(http.Handler), projectName string) grpc.StreamClientInterceptor

StreamGatewayInterceptor stream interceptor for gateway

func StreamServerInterceptor added in v1.3.0

func StreamServerInterceptor(logger *zap.Logger, notify proposal.NotifyHandler, metrics func(http.Handler), projectName string, disableMessageValitator bool) grpc.StreamServerInterceptor

StreamServerInterceptor stream interceptor for server

func UnaryClientInterceptor added in v1.3.1

func UnaryClientInterceptor(logger *zap.Logger, notify proposal.NotifyHandler, signer proposal.Signer, projectName string) grpc.UnaryClientInterceptor

UnaryClientInterceptor unary interceptor for client

func UnaryGatewayInterceptor added in v1.3.0

func UnaryGatewayInterceptor(logger *zap.Logger, notify proposal.NotifyHandler, metrics func(http.Handler), projectName string) grpc.UnaryClientInterceptor

UnaryGatewayInterceptor unary interceptor for gateway

func UnaryServerInterceptor added in v1.3.0

func UnaryServerInterceptor(logger *zap.Logger, notify proposal.NotifyHandler, metrics func(http.Handler), projectName string, disableMessageValitator bool) grpc.UnaryServerInterceptor

UnaryServerInterceptor unary interceptor for server

Types

type Role added in v1.3.7

type Role int
const (
	Gateway Role = iota + 1
	Client
	Server
)

type SessionUserinfo

type SessionUserinfo struct{}

SessionUserinfo mark userinfo in context

type SignatureIdentifier

type SignatureIdentifier struct{}

SignatureIdentifier mark identifier in context

Jump to

Keyboard shortcuts

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