Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Encryption API client
func (*Client) DecryptMessageContent ¶
func (c *Client) DecryptMessageContent(encryptionKeyURL string, encryptedContent string) (string, error)
DecryptMessageContent attempts to decrypt message content using encryption key URL
func (*Client) DecryptText ¶
DecryptText decrypts JWE encrypted text using a KMS key
type Config ¶
type Config struct {
// HTTPTimeout is the timeout for HTTP requests to the KMS service
HTTPTimeout time.Duration
// DefaultCluster is the default KMS cluster to use when not specified
DefaultCluster string
// DisableCache disables the key caching mechanism
DisableCache bool
}
Config holds the configuration for the Encryption plugin
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default configuration for the Encryption plugin
type JWK ¶
type JWK struct {
Kty string `json:"kty"` // Key type
Crv string `json:"crv,omitempty"` // Curve (for EC keys)
X string `json:"x,omitempty"` // X coordinate (for EC keys)
Y string `json:"y,omitempty"` // Y coordinate (for EC keys)
D string `json:"d,omitempty"` // Private key (for EC keys)
N string `json:"n,omitempty"` // Modulus (for RSA keys)
E string `json:"e,omitempty"` // Exponent (for RSA keys)
Kid string `json:"kid,omitempty"` // Key ID
Alg string `json:"alg,omitempty"` // Algorithm
}
JWK represents a JSON Web Key
type KMSMessage ¶
type KMSMessage struct {
Method string `json:"method,omitempty"` // Method to perform (retrieve, create, etc.)
URI string `json:"uri,omitempty"` // URI of the key
ResourceURI string `json:"resourceUri,omitempty"` // URI of the resource
RequestID string `json:"requestId,omitempty"` // ID of the request
Status string `json:"status,omitempty"` // Status of the response
Key *Key `json:"key,omitempty"` // Key in the response
Keys []*Key `json:"keys,omitempty"` // Multiple keys in the response
UserIDs []string `json:"userIds,omitempty"` // User IDs for key creation
KeyURIs []string `json:"keyUris,omitempty"` // Key URIs for batch operations
Resource map[string]interface{} `json:"resource,omitempty"` // Resource data
}
KMSMessage represents a message to/from the KMS service
Click to show internal directories.
Click to hide internal directories.