repository

package
v0.0.0-...-ba7b321 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package repository defines the api for the pub key stores

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound indicates that the requested key is not known.
	ErrNotFound = errors.New("key not found")
)

Functions

This section is empty.

Types

type Key

type Key struct {
	// PublicKey contains the public key data
	PublicKey string
	// SAName is the optional GCP IAM service-account that has been associated.
	SAName string
	// SADelegateName is the optional GCP IAM service-account to act as an intermediate delegate
	SADelegateName string
}

Key holds data + metadata of a public key entry

type KeyOptions

type KeyOptions struct {
	ServiceAccount         string `json:"service-account"`
	ServiceAccountDelegate string `json:"service-account-delegate"`
}

KeyOptions contain optional settings for a key

type PubKeyRepository

type PubKeyRepository interface {
	// LookupKey retrieves the public key of a device from the repository.
	// An empty string return indicates that no key exists for the given identifier or
	// that the device is blocked.
	LookupKey(ctx context.Context, deviceID string) (*Key, error)
	PublishKey(ctx context.Context, deviceID, publicKey string) error
	// ConfigureKey applies the given opts to the key store.
	ConfigureKey(ctx context.Context, deviceID string, opts KeyOptions) error
}

PubKeyRepository defines the api for the pub key stores

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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