shared

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthPluginName = "auth"
)

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "FileButlerPluginKey",
	MagicCookieValue: "ILovePenguins",
}

Functions

This section is empty.

Types

type AuthPlugin

type AuthPlugin struct {
	plugin.Plugin
	Impl Authorizer
}

func (*AuthPlugin) GRPCClient

func (p *AuthPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*AuthPlugin) GRPCServer

func (p *AuthPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

type Authorizer

type Authorizer interface {
	Authorize(context.Context, *authorization.AuthorizeRequest) error
}

type GRPCClient

type GRPCClient struct {
	Client authorization.AuthorizationServiceClient
}

func (*GRPCClient) Authorize

type GRPCServer

type GRPCServer struct {
	Impl Authorizer
}

Jump to

Keyboard shortcuts

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