Skip to content

Commit c65a017

Browse files
authored
docs(key_manager): add documentation (scaleway#2709)
1 parent 3c6786e commit c65a017

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

api/key_manager/v1alpha1/key_manager_sdk.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,13 @@ type KeyUsage struct {
448448
// Precisely one of SymmetricEncryption, AsymmetricEncryption, AsymmetricSigning must be set.
449449
SymmetricEncryption *KeyAlgorithmSymmetricEncryption `json:"symmetric_encryption,omitempty"`
450450

451-
// AsymmetricEncryption: default value: unknown_asymmetric_encryption
451+
// AsymmetricEncryption: see the `Key.Algorithm.AsymmetricEncryption` enum for a description of values.
452+
// Default value: unknown_asymmetric_encryption
452453
// Precisely one of SymmetricEncryption, AsymmetricEncryption, AsymmetricSigning must be set.
453454
AsymmetricEncryption *KeyAlgorithmAsymmetricEncryption `json:"asymmetric_encryption,omitempty"`
454455

455-
// AsymmetricSigning: default value: unknown_asymmetric_signing
456+
// AsymmetricSigning: see the `Key.Algorithm.AsymmetricSigning` enum for a description of values.
457+
// Default value: unknown_asymmetric_signing
456458
// Precisely one of SymmetricEncryption, AsymmetricEncryption, AsymmetricSigning must be set.
457459
AsymmetricSigning *KeyAlgorithmAsymmetricSigning `json:"asymmetric_signing,omitempty"`
458460
}
@@ -477,7 +479,7 @@ type Key struct {
477479
// Name: name of the key.
478480
Name string `json:"name"`
479481

480-
// Usage: keys with a usage set to `symmetric_encryption` can encrypt and decrypt data using the `AES-256-GCM` key algorithm. Key Manager currently only supports `AES-256-GCM`.
482+
// Usage: see the `Key.Usage` enum for a description of possible values.
481483
Usage *KeyUsage `json:"usage"`
482484

483485
// State: see the `Key.State` enum for a description of possible values.
@@ -533,7 +535,7 @@ type CreateKeyRequest struct {
533535
// Name: (Optional) Name of the key.
534536
Name *string `json:"name,omitempty"`
535537

536-
// Usage: see the `Key.Algorithm.SymmetricEncryption` enum for a description of values.
538+
// Usage: see the `Key.Usage` enum for a description of possible values.
537539
Usage *KeyUsage `json:"usage,omitempty"`
538540

539541
// Description: (Optional) Description of the key.
@@ -886,7 +888,7 @@ type VerifyResponse struct {
886888
// KeyID: ID of the key used for verification.
887889
KeyID string `json:"key_id"`
888890

889-
// Valid: returns `true` if the signature is valid for the digest and key, `false` otherwise.
891+
// Valid: returns `true` if the signature is valid for the digest and key, and `false` otherwise.
890892
Valid bool `json:"valid"`
891893
}
892894

@@ -906,7 +908,7 @@ func (s *API) Regions() []scw.Region {
906908
return []scw.Region{scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw}
907909
}
908910

909-
// CreateKey: Create a key in a given region specified by the `region` parameter. Keys only support symmetric encryption. You can use keys to encrypt or decrypt arbitrary payloads, or to generate data encryption keys. **Data encryption keys are not stored in Key Manager**.
911+
// CreateKey: Create a key in a given region specified by the `region` parameter. You can use keys to encrypt or decrypt arbitrary payloads, to sign and verify messages or to generate data encryption keys. **Data encryption keys are not stored in Key Manager**.
910912
func (s *API) CreateKey(req *CreateKeyRequest, opts ...scw.RequestOption) (*Key, error) {
911913
var err error
912914

0 commit comments

Comments
 (0)