Documentation ¶
Index ¶
- type APIKey
- type Config
- type Conn
- func (c *Conn) Create(ctx context.Context, name string, value []byte) error
- func (c *Conn) Delete(ctx context.Context, name string) error
- func (c *Conn) Get(ctx context.Context, name string) ([]byte, error)
- func (c *Conn) List(ctx context.Context) (kms.Iter, error)
- func (c *Conn) Status(ctx context.Context) (kms.State, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey string
APIKey is a Fortanix API key for authenticating to a Fortanix SDKMS instance.
type Config ¶ added in v0.22.0
type Config struct { // Endpoint is the Fortanix SDKMS instance endpoint. Endpoint string // GroupID is ID of the Fortanix SDKMS group newly created // keys will belong to. // // Fortanix SDKMS uses groups as collection of (security) objects. // Typically, applications can access some/all objects within groups // the application is assigned to. GroupID string // APIKey is the application's Fortanix SDKMS API key used to authenticate // operations. It is sent on each request as part of the request headers. APIKey APIKey // CAPath is an optional path to a CA certificate or directory // containing CA certificates. // // If not empty, the KeyStore will use the specified CAs to // verify the Fortanix SDKMS server certificate. CAPath string }
Config is a structure containing configuration options for connecting to a Fortanix SDKMS server.
type Conn ¶ added in v0.22.0
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection to a Fortanix SDKMS server.
func Connect ¶ added in v0.22.0
Connect establishes and returns a Conn to a Fortanix SDKMS server using the given config.
func (*Conn) Create ¶ added in v0.22.0
Create stors the given key at the Fortanix SDKMS if and only if no entry with the given name exists.
If no such entry exists, Create returns kes.ErrKeyExists.
func (*Conn) Delete ¶ added in v0.22.0
Delete deletes the key associated with the given name from the Fortanix SDKMS. It may not return an error if no entry for the given name exists.
func (*Conn) Get ¶ added in v0.22.0
Get returns the key associated with the given name.
If there is no such entry, Get returns kes.ErrKeyNotFound.