MasterKey is a HuaweiCloud KMS key used to encrypt and decrypt SOPS' data key.
| 41 | |
| 42 | // MasterKey is a HuaweiCloud KMS key used to encrypt and decrypt SOPS' data key. |
| 43 | type MasterKey struct { |
| 44 | // KeyID is the full key identifier in format "region:key-uuid" |
| 45 | KeyID string |
| 46 | // Region is the HuaweiCloud region (e.g., "tr-west-1") |
| 47 | Region string |
| 48 | // KeyUUID is the UUID of the KMS key |
| 49 | KeyUUID string |
| 50 | // EncryptedKey stores the data key in its encrypted form. |
| 51 | EncryptedKey string |
| 52 | // CreationDate is when this MasterKey was created. |
| 53 | CreationDate time.Time |
| 54 | |
| 55 | // credentials contains the HuaweiCloud credentials used by the KMS client. |
| 56 | // It can be injected by a (local) keyservice.KeyServiceServer using |
| 57 | // Credentials.ApplyToMasterKey. |
| 58 | // If nil, the default credential provider chain is used. |
| 59 | credentials auth.ICredential |
| 60 | } |
| 61 | |
| 62 | // NewMasterKey creates a new MasterKey from a region:key-id string, setting |
| 63 | // the creation date to the current date. |
nothing calls this directly
no outgoing calls
no test coverage detected