pluginstore

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package pluginstore is an internal Porter package that implements the plugins.SigningPlugin interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSigningPluginConfig

func NewSigningPluginConfig() pluggable.PluginTypeConfig

NewSigningPluginConfig for signing sources.

Types

type GClient

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

GClient is a gRPC implementation of the signing client.

func NewClient

func NewClient(client proto.SigningProtocolClient) *GClient

func (*GClient) Connect

func (m *GClient) Connect(ctx context.Context) error

func (*GClient) Sign

func (m *GClient) Sign(ctx context.Context, ref string) error

func (*GClient) Verify

func (m *GClient) Verify(ctx context.Context, ref string) error

type GServer

type GServer struct {
	proto.UnsafeSigningProtocolServer
	// contains filtered or unexported fields
}

GServer is a gRPC wrapper around a SecretsProtocol plugin

func (*GServer) Connect

func (m *GServer) Connect(ctx context.Context, request *proto.ConnectRequest) (*proto.ConnectResponse, error)

func (*GServer) Sign

func (m *GServer) Sign(ctx context.Context, request *proto.SignRequest) (*proto.SignResponse, error)

func (*GServer) Verify

func (m *GServer) Verify(ctx context.Context, request *proto.VerifyRequest) (*proto.VerifyResponse, error)

type Plugin

type Plugin struct {
	plugin.Plugin
	// contains filtered or unexported fields
}

Plugin is the shared implementation of a storage plugin wrapper.

func NewPlugin

NewPlugin creates an instance of a storage plugin.

func (Plugin) GRPCClient

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

func (Plugin) GRPCServer

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

type Signer

type Signer struct {
	*config.Config
	// contains filtered or unexported fields
}

Signer is a plugin-backed source of signing. It resolves the appropriate plugin based on Porter's config and implements the plugins.SigningProtocol interface using the backing plugin.

Connects just-in-time, but you must call Close to release resources.

func NewSigner

func NewSigner(c *config.Config) *Signer

func (*Signer) Close

func (s *Signer) Close() error

func (*Signer) Connect

func (s *Signer) Connect(ctx context.Context) error

Connect initializes the plugin for use. The plugin itself is responsible for ensuring it was called. Close is called automatically when the plugin is used by Porter.

func (*Signer) Sign

func (s *Signer) Sign(ctx context.Context, ref string) error

func (*Signer) Verify

func (s *Signer) Verify(ctx context.Context, ref string) error

Jump to

Keyboard shortcuts

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