hostkey

package
v0.0.0-...-1c5d739 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MAPPING is the elastic mapping for the docker registry
	MAPPING, _ = elastic.NewMapping(mappingString)
)

Functions

func DecodeKey

func DecodeKey(id string) (string, error)

func Key

func Key(id string) datastore.Key

Types

type HostKey

type HostKey struct {
	PEM string
	datastore.VersionedEntity
}

Entity containing a PEM-encoded RSA public key

func (*HostKey) ValidEntity

func (rsaKey *HostKey) ValidEntity() error

type Store

type Store interface {
	// Get an RSA Key by host id.  Return ErrNoSuchEntity if not found
	Get(ctx datastore.Context, id string) (*HostKey, error)

	// Put adds/updates an RSA Key to the registry
	Put(ctx datastore.Context, id string, val *HostKey) error

	// Delete removes an RSA Key from the registry
	Delete(ctx datastore.Context, id string) error
}

Store is the database for the RSA keys per host

func NewStore

func NewStore() Store

NewStore creates a new RSA Key store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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