cosign

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 mock provides an in-memory implementation of a secret store suitable for unit testing.

Index

Constants

View Source
const PluginKey = plugins.PluginInterface + ".porter.cosign"

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(c *portercontext.Context, rawCfg interface{}) (plugin.Plugin, error)

Types

type Cosign

type Cosign struct {
	PublicKey        string
	PrivateKey       string
	RegistryMode     string
	Experimental     bool
	InsecureRegistry bool
}

Signer implements an in-memory signer for testing.

func NewSigner

func NewSigner(c *portercontext.Context, cfg PluginConfig) *Cosign

func (*Cosign) Connect

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

func (*Cosign) Sign

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

func (*Cosign) Verify

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

type Plugin

type Plugin struct {
	signing.Signer
}

Plugin is the plugin wrapper for accessing secrets from a local filesystem.

type PluginConfig

type PluginConfig struct {
	//theses are paths
	PublicKey        string `mapstructure:"publickey,omitempty"`
	PrivateKey       string `mapstructure:"privatekey,omitempty"`
	RegistryMode     string `mapstructure:"registrymode,omitempty"`
	Experimental     bool   `mapstructure:"experimental,omitempty"`
	InsecureRegistry bool   `mapstructure:"insecureregistry,omitempty"`
}

Jump to

Keyboard shortcuts

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