keystore

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keystore

type Keystore interface {
	Sign(ctx context.Context, keyID []byte, data []byte) ([]byte, error)
	SignBatch(ctx context.Context, keyID []byte, data [][]byte) ([][]byte, error)
	Verify(ctx context.Context, keyID []byte, data []byte) (bool, error)
	VerifyBatch(ctx context.Context, keyID []byte, data [][]byte) ([]bool, error)

	ListKeys(ctx context.Context, tags []string) ([][]byte, error)

	// RunUDF executes a user-defined function (UDF) on the keystore.
	// This method is designed to provide flexibility by allowing users to define custom
	// logic that can be executed without breaking the existing interface. While it enables
	// future extensibility, developers should ensure that UDF implementations are safe
	// and do not compromise the security of the keystore or the integrity of the data.
	RunUDF(ctx context.Context, name string, keyID []byte, data []byte) ([]byte, error)
}

Keystore This interface is exposed to keystore consumers

type Management

type Management interface {
	AddPolicy(ctx context.Context, policy []byte) (string, error)
	RemovePolicy(ctx context.Context, policyID string) error
	ListPolicy(ctx context.Context) []byte

	ImportKey(ctx context.Context, keyType string, data []byte, tags []string) ([]byte, error)
	ExportKey(ctx context.Context, keyID []byte) ([]byte, error)

	CreateKey(ctx context.Context, keyType string, tags []string) ([]byte, error)
	DeleteKey(ctx context.Context, keyID []byte) error

	AddTag(ctx context.Context, keyID []byte, tag string) error
	RemoveTag(ctx context.Context, keyID []byte, tag string) error
	ListTags(ctx context.Context, keyID []byte) ([]string, error)
}

Management Core node exclusive

Jump to

Keyboard shortcuts

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