cluster

package
v0.6.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterIDKey  clusterIDKeyType  = "cluster_auth_cluster_id"
	SharedKeysKey sharedKeysKeyType = "cluster_auth_shared_keys"
)

Variables

This section is empty.

Functions

func AuthorizedID

func AuthorizedID(c *gin.Context) string

func AuthorizedIDFromIncomingContext added in v0.6.0

func AuthorizedIDFromIncomingContext(ctx context.Context) (string, bool)

func AuthorizedKeys

func AuthorizedKeys(c *gin.Context) *keyring.SharedKeys

func AuthorizedOutgoingContext added in v0.6.0

func AuthorizedOutgoingContext(ctx context.Context) context.Context

func StreamAuthorizedID added in v0.5.4

func StreamAuthorizedID(ctx context.Context) string

func StreamAuthorizedKeys added in v0.5.4

func StreamAuthorizedKeys(ctx context.Context) *keyring.SharedKeys

Types

type ClusterMiddleware

type ClusterMiddleware struct {
	ClusterMiddlewareOptions
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, keyringStore storage.KeyringStoreBroker, headerKey string, opts ...ClusterMiddlewareOption) (*ClusterMiddleware, error)

func (*ClusterMiddleware) Handle

func (m *ClusterMiddleware) Handle(c *gin.Context)

func (*ClusterMiddleware) StreamServerInterceptor added in v0.5.4

func (m *ClusterMiddleware) StreamServerInterceptor() grpc.StreamServerInterceptor

func (*ClusterMiddleware) UnaryServerInterceptor added in v0.5.4

func (m *ClusterMiddleware) UnaryServerInterceptor() grpc.UnaryServerInterceptor

func (*ClusterMiddleware) VerifyKeyring added in v0.5.4

func (m *ClusterMiddleware) VerifyKeyring(authHeader string, msgBody []byte) (int, string, *keyring.SharedKeys)

type ClusterMiddlewareOption added in v0.5.4

type ClusterMiddlewareOption func(*ClusterMiddlewareOptions)

func WithExcludeGRPCMethodsFromAuth added in v0.5.4

func WithExcludeGRPCMethodsFromAuth(methods ...string) ClusterMiddlewareOption

type ClusterMiddlewareOptions added in v0.5.4

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

Jump to

Keyboard shortcuts

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