Vault | Golang SDK
Algorithm
func (fu *FilterList) Algorithm() *pangea.FilterMatch[string]CreatedAt
func (fu *FilterList) CreatedAt() *pangea.FilterRange[string]DestroyedAt
func (fu *FilterList) DestroyedAt() *pangea.FilterRange[string]Expiration
func (fu *FilterList) Expiration() *pangea.FilterRange[string]Folder
func (fu *FilterList) Folder() *pangea.FilterMatch[string]ID
func (fu *FilterList) ID() *pangea.FilterMatch[string]ItemStated
func (fu *FilterList) ItemStated() *pangea.FilterMatch[string]LastRotated
func (fu *FilterList) LastRotated() *pangea.FilterRange[string]Name
func (fu *FilterList) Name() *pangea.FilterMatch[string]NextRotation
func (fu *FilterList) NextRotation() *pangea.FilterRange[string]Purpose
func (fu *FilterList) Purpose() *pangea.FilterMatch[string]Type
func (fu *FilterList) Type() *pangea.FilterMatch[string]Asymmetric generate
func (v *vault) AsymmetricGenerate(ctx context.Context, input *AsymmetricGenerateRequest) (*pangea.PangeaResponse[AsymmetricGenerateResult], error)Generate an asymmetric key.
input := &vault.AsymmetricGenerateRequest{
Algorithm: vault.AArsa2048_pkcs1v15_sha256,
Purpose: vault.KPsigning,
CommonGenerateRequest: vault.CommonGenerateRequest{
Name: pangea.StringValue("my-very-secret-secret"),
Folder: pangea.StringValue("/personal"),
Metadata: vault.Metadata{
"created_by": pangea.StringValue("John Doe"),
"used_in": pangea.StringValue("Google products"),
},
Tags: vault.Tags{
pangea.StringValue("irs_2023"),
pangea.StringValue("personal"),
},
RotationFrequency: pangea.StringValue("10d"),
RotationState: pangea.StringValue("deactivated"),
DisabledAt: pangea.StringValue("2025-01-01T10:00:00Z"),
},
}
agr, err := vaultcli.AsymmetricGenerate(ctx, input)
Asymmetric store
func (v *vault) AsymmetricStore(ctx context.Context, input *AsymmetricStoreRequest) (*pangea.PangeaResponse[AsymmetricStoreResult], error)Import an asymmetric key.
var PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA8s5JopbEPGBylPBcMK+L5PqHMqPJW/5KYPgBHzZGncc=\n-----END PUBLIC KEY-----"
var PRIVATE_KEY = "private key example"
input := &vault.AsymmetricStoreRequest{
Algorithm: vault.AArsa2048_pkcs1v15_sha256,
PublicKey: vault.EncodedPublicKey(PUBLIC_KEY),
PrivateKey: vault.EncodedPrivateKey(PRIVATE_KEY),
Purpose: vault.KPsigning,
CommonStoreRequest: vault.CommonStoreRequest{
Name: pangea.StringValue("my-very-secret-secret"),
Folder: pangea.StringValue("/personal"),
Metadata: vault.Metadata{
"created_by": pangea.StringValue("John Doe"),
"used_in": pangea.StringValue("Google products"),
},
Tags: vault.Tags{
pangea.StringValue("irs_2023"),
pangea.StringValue("personal"),
},
RotationFrequency: pangea.StringValue("10d"),
RotationState: pangea.StringValue("deactivated"),
DisabledAt: pangea.StringValue("2025-01-01T10:00:00Z"),
},
}
asr, err := vaultcli.AsymmetricStore(ctx, input)
Decrypt
func (v *vault) Decrypt(ctx context.Context, input *DecryptRequest) (*pangea.PangeaResponse[DecryptResult], error)Decrypt a message using a key.
input := &vault.DecryptRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
CipherText: pangea.StringValue("lJkk0gCLux+Q+rPNqLPEYw=="),
Version: pangea.Int(1),
}
dr, err := vaultcli.Decrypt(ctx, input)
Decrypt structured
func (v *vault) DecryptStructured(ctx context.Context, input *EncryptStructuredRequest) (*pangea.PangeaResponse[EncryptStructuredResult], error)Decrypt parts of a JSON object.
data := map[string]interface{}{
"field1": [4]interface{}{1, 2, "kxcbC9E9IlgVaSCChPWUMgUC3ko=", "6FfI/LCzatLRLNAc8SuBK/TDnGxp"},
"field2": "true",
}
decryptedResponse, err := client.DecryptStructured(
ctx,
&vault.EncryptStructuredRequest{
ID: "pvi_[...]",
StructuredData: data,
Filter: "$.field1[2:4]",
},
)
Decrypt transform
func (v *vault) DecryptTransform(ctx context.Context, input *DecryptTransformRequest) (*pangea.PangeaResponse[DecryptTransformResult], error)Decrypt using a format-preserving algorithm (FPE).
decryptedResponse, err := client.DecryptTransform(
ctx,
&vault.DecryptTransformRequest{
ID: "pvi_[...]",
CipherText: "tZB-UKVP-MzTM",
Tweak: "MTIzMTIzMT==",
Alphabet: vault.TAalphanumeric,
},
)
DecryptTransformStructured
func (v *vault) DecryptTransformStructured(ctx context.Context, input *EncryptTransformStructuredRequest) (*pangea.PangeaResponse[EncryptTransformStructuredResult], error)@summary Decrypt structured with FPE
@description Decrypt using a format preserving algorithm (FPE) parts of a JSON object.
@operationId vault_post_v2_decrypt_transform_structured
@example tweak := "MTIzMTIzMT=="
data := map[string]interface{}{
"field1": [4]interface{}{"123-4567-8901",2,"Dbw-618a-KAty","o3ZaE"},
"field2": "true",
}
decryptedResponse, err := client.DecryptTransformStructured(
ctx,
&vault.EncryptTransformStructuredRequest{
ID: key,
StructuredData: encryptedResponse.Result.StructuredData,
Filter: "$.field1[2:4]",
Tweak: &tweak,
Alphabet: vault.TAalphanumeric,
},
)
Delete
func (v *vault) Delete(ctx context.Context, input *DeleteRequest) (*pangea.PangeaResponse[DeleteResult], error)Delete a secret or key.
input := &vault.DeleteRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
}
dr, err := vaultcli.Delete(ctx, input)
Encrypt
func (v *vault) Encrypt(ctx context.Context, input *EncryptRequest) (*pangea.PangeaResponse[EncryptResult], error)Encrypt a message using a key.
msg := "message to encrypt..."
data := base64.StdEncoding.EncodeToString([]byte(msg))
input := &vault.EncryptRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
PlainText: data,
Version: pangea.Int(1),
}
enc, err := vaultcli.Encrypt(ctx, input)
Encrypt structured
func (v *vault) EncryptStructured(ctx context.Context, input *EncryptStructuredRequest) (*pangea.PangeaResponse[EncryptStructuredResult], error)Encrypt parts of a JSON object.
data := map[string]interface{}{
"field1": [4]interface{}{1, 2, "true", "false"},
"field2": "true",
}
encryptedResponse, err := client.EncryptStructured(
ctx,
&vault.EncryptStructuredRequest{
ID: "pvi_[...]",
StructuredData: data,
Filter: "$.field1[2:4]",
},
)
Encrypt transform
func (v *vault) EncryptTransform(ctx context.Context, input *EncryptTransformRequest) (*pangea.PangeaResponse[EncryptTransformResult], error)Encrypt using a format-preserving algorithm (FPE).
encryptedResponse, err := client.EncryptTransform(
ctx,
&vault.EncryptTransformRequest{
ID: "pvi_[...]",
PlainText: "123-4567-8901",
Tweak: "MTIzMTIzMT==",
Alphabet: vault.TAalphanumeric,
},
)
Encrypt structured with FPE
func (v *vault) EncryptTransformStructured(ctx context.Context, input *EncryptTransformStructuredRequest) (*pangea.PangeaResponse[EncryptTransformStructuredResult], error)Encrypt using a format preserving algorithm (FPE) parts of a JSON object.
data := map[string]interface{}{
"field1": [4]interface{}{"123-4567-8901", 2, "123-4567-8901", "false"},
"field2": "true",
}
tweak := "MTIzMTIzMT=="
encryptedResponse, err := client.EncryptTransformStructured(
ctx,
&vault.EncryptTransformStructuredRequest{
ID: key,
StructuredData: data,
Filter: "$.field1[2:4]",
Tweak: &tweak,
Alphabet: vault.TAalphanumeric,
},
)
Export
func (v *vault) Export(ctx context.Context, input *ExportRequest) (*pangea.PangeaResponse[ExportResult], error)Export a symmetric or asymmetric key.
// Generate an exportable key.
generated, err := client.AsymmetricGenerate(ctx,
&vault.AsymmetricGenerateRequest{
CommonGenerateRequest: vault.CommonGenerateRequest{
Name: "a-name-for-the-key",
},
Algorithm: vault.AAed25519,
Purpose: vault.KPsigning,
Exportable: pangea.Bool(true),
})
// Then it can be exported whenever needed.
exported, err := client.Export(ctx, &vault.ExportRequest{id: generated.Result.ID})
Create
func (v *vault) FolderCreate(ctx context.Context, input *FolderCreateRequest) (*pangea.PangeaResponse[FolderCreateResult], error)Creates a folder.
input := &vault.FolderCreateRequest{
Name: "folder_name",
Folder: "parent/folder/name",
}
enc, err := vaultcli.FolderCreate(ctx, input)
Retrieve
func (v *vault) Get(ctx context.Context, input *GetRequest) (*pangea.PangeaResponse[GetResult], error)Retrieve a secret or key, and any associated information.
input := &vault.GetRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
Version: pangea.StringValue(1),
Verbose: pangea.Bool(true),
VersionState: &vault.IVSactive,
}
gr, err := vaultcli.Get(ctx, input)
Get Bulk
func (v *vault) GetBulk(ctx context.Context, input *GetBulkRequest) (*pangea.PangeaResponse[GetBulkResult], error)Retrieve a list of secrets, keys and folders.
filter.Folder().Set(pangea.String("/"))
gbr, err := client.GetBulk(
ctx,
&vault.GetBulkRequest{
Filter: filter.Filter(),
Size: 5,
},
)
JWT Retrieve
func (v *vault) JWKGet(ctx context.Context, input *JWKGetRequest) (*pangea.PangeaResponse[JWKGetResult], error)Retrieve a key in JWK format.
input := &vault.JWKGetRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
}
jr, err := vaultcli.JWKGet(ctx, input)
JWT Sign
func (v *vault) JWTSign(ctx context.Context, input *JWTSignRequest) (*pangea.PangeaResponse[JWTSignResult], error)Sign a JSON Web Token (JWT) using a key.
input := &vault.JWTSignRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
Payload: pangea.StringValue("{\"sub\": \"1234567890\",\"name\": \"John Doe\",\"admin\": true}"),
}
jr, err := vaultcli.JWTSign(ctx, input)
JWT Verify
func (v *vault) JWTVerify(ctx context.Context, input *JWTVerifyRequest) (*pangea.PangeaResponse[JWTVerifyResult], error)Verify the signature of a JSON Web Token (JWT).
input := &vault.JWTVerifyRequest{
JWS: pangea.StringValue("ewogICJhbGciO..."),
}
jr, err := vaultcli.JWTVerify(ctx, input)
Key rotate
func (v *vault) KeyRotate(ctx context.Context, input *KeyRotateRequest) (*pangea.PangeaResponse[KeyRotateResult], error)Manually rotate a symmetric or asymmetric key.
var SYMMETRIC_KEY = "lJkk0gCLux+Q+rPNqLPEYw=="
input := &vault.KeyRotateRequest{
CommonRotateRequest: vault.CommonRotateRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
RotationState: vault.IVSdeactivated,
},
Key: &vault.EncodedSymmetricKey(SYMMETRIC_KEY),
}
krr, err := vaultcli.KeyRotate(ctx, input)
List
func (v *vault) List(ctx context.Context, input *ListRequest) (*pangea.PangeaResponse[ListResult], error)Retrieve a list of secrets, keys and folders, and their associated information.
input := &vault.ListRequest{
Filter: map[string]string{
"folder": "/",
"type": "asymmetric_key",
"name__contains": "test",
"metadata_key1": "value1",
"created_at__lt": "2023-12-12T00:00:00Z",
},
Last: pangea.StringValue("WyIvdGVzdF8yMDdfc3ltbWV0cmljLyJd"),
Size: pangea.IntValue(20),
Order: vault.IOasc,
OrderBy: vault.IOBname,
}
lr, err := vaultcli.List(ctx, input)
Secret rotate
func (v *vault) SecretRotate(ctx context.Context, input *SecretRotateRequest) (*pangea.PangeaResponse[SecretRotateResult], error)Rotate a secret.
input := &vault.SecretRotateRequest{
Secret: pangea.StringValue("12sdfgs4543qv@#%$casd"),
CommonRotateRequest: vault.CommonRotateRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
RotationState vault.IVSdeactivated,
},
}
srr, err := vaultcli.SecretRotate(ctx, input)
Secret store
func (v *vault) SecretStore(ctx context.Context, input *SecretStoreRequest) (*pangea.PangeaResponse[SecretStoreResult], error)Import a secret
input := &vault.SecretStoreRequest{
Secret: pangea.StringValue("12sdfgs4543qv@#%$casd"),
Type: vault.ITsecret
CommonStoreRequest: vault.CommonStoreRequest{
Name: pangea.StringValue("my-very-secret-secret"),
Folder: pangea.StringValue("/personal"),
Metadata: vault.Metadata{
"created_by": pangea.StringValue("John Doe"),
"used_in": pangea.StringValue("Google products"),
},
Tags: vault.Tags{
pangea.StringValue("irs_2023"),
pangea.StringValue("personal"),
},
},
}
ssr, err := vaultcli.SecretStore(ctx, input)
Sign
func (v *vault) Sign(ctx context.Context, input *SignRequest) (*pangea.PangeaResponse[SignResult], error)Sign a message using a key.
msg := "message to sign..."
data := base64.StdEncoding.EncodeToString([]byte(msg))
input := &vault.SignRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
Message: data,
Version: pangea.Int(1),
}
sr, err := vaultcli.Sign(ctx, input)
State change
func (v *vault) StateChange(ctx context.Context, input *StateChangeRequest) (*pangea.PangeaResponse[StateChangeResult], error)Change the state of a specific version of a secret or key.
input := &vault.StateChangeRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
State: vault.IVSdeactivated,
}
scr, err := vaultcli.StateChange(ctx, input)
Symmetric generate
func (v *vault) SymmetricGenerate(ctx context.Context, input *SymmetricGenerateRequest) (*pangea.PangeaResponse[SymmetricGenerateResult], error)Generate a symmetric key.
input := &vault.SymmetricGenerateRequest{
Algorithm: vault.SYAaes128_cfb,
Purpose: vault.KPencryption,
CommonGenerateRequest: vault.CommonGenerateRequest{
Name: pangea.StringValue("my-very-secret-secret"),
Folder: pangea.StringValue("/personal"),
Metadata: vault.Metadata{
"created_by": pangea.StringValue("John Doe"),
"used_in": pangea.StringValue("Google products"),
},
Tags: vault.Tags{
pangea.StringValue("irs_2023"),
pangea.StringValue("personal"),
},
RotationFrequency: pangea.StringValue("10d"),
RotationState: pangea.StringValue("deactivated"),
DisabledAt: pangea.StringValue("2025-01-01T10:00:00Z"),
},
}
sgr, err := vaultcli.SymmetricGenerate(ctx, input)
Symmetric store
func (v *vault) SymmetricStore(ctx context.Context, input *SymmetricStoreRequest) (*pangea.PangeaResponse[SymmetricStoreResult], error)Import a symmetric key.
input := &vault.SymmetricStoreRequest{
Key: vault.EncodedSymmetricKey("lJkk0gCLux+Q+rPNqLPEYw=="),
Algorithm: vault.SYAaes128_cfb,
Purpose: vault.KPencryption,
CommonStoreRequest: vault.CommonStoreRequest{
Name: pangea.StringValue("my-very-secret-secret"),
Folder: pangea.StringValue("/personal"),
Metadata: vault.Metadata{
"created_by": pangea.StringValue("John Doe"),
"used_in": pangea.StringValue("Google products"),
},
Tags: vault.Tags{
pangea.StringValue("irs_2023"),
pangea.StringValue("personal"),
},
RotationFrequency: pangea.StringValue("10d"),
RotationState: pangea.StringValue("deactivated"),
DisabledAt: pangea.StringValue("2025-01-01T10:00:00Z"),
},
}
ssr, err := vaultcli.SymmetricStore(ctx, input)
Update
func (v *vault) Update(ctx context.Context, input *UpdateRequest) (*pangea.PangeaResponse[UpdateResult], error)Update information associated with a secret or key.
input := &vault.Update Request{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
Name: pangea.StringValue("my-very-secret-secret"),
Folder: pangea.StringValue("/personal"),
Metadata: vault.Metadata{
"created_by": pangea.StringValue("John Doe"),
"used_in": pangea.StringValue("Google products"),
},
Tags: vault.Tags{
pangea.StringValue("irs_2023"),
pangea.StringValue("personal"),
},
DisabledAt: pangea.StringValue("2025-01-01T10:00:00Z"),
ItemState: vault.ISdisabled,
}
ur, err := vaultcli.Update(ctx, input)
Verify
func (v *vault) Verify(ctx context.Context, input *VerifyRequest) (*pangea.PangeaResponse[VerifyResult], error)Verify a signature using a key.
input := &vault.VerifyRequest{
ID: pangea.StringValue("pvi_p6g5i3gtbvqvc3u6zugab6qs6r63tqf5"),
Version: pangea.Int(1),
Message: pangea.StringValue("lJkk0gCLux+Q+rPNqLPEYw=="),
Signature: pangea.StringValue("FfWuT2Mq/+cxa7wIugfhzi7ktZxVf926idJNgBDCysF/knY9B7M6wxqHMMPDEBs86D8OsEGuED21y3J7IGOpCQ=="),
}
vr, err := vaultcli.Verify(ctx, input)
Type AsymmetricAlgorithm
type AsymmetricAlgorithm stringtype AsymmetricAlgorithm string
Type AsymmetricGenerateRequest
type AsymmetricGenerateRequest structtype AsymmetricGenerateRequest struct {
CommonGenerateRequest
Algorithm AsymmetricAlgorithm `json:"algorithm,omitempty"` // The algorithm of the key
Purpose KeyPurpose `json:"purpose,omitempty"` // The purpose of the key
Exportable *bool `json:"exportable,omitempty"` // Whether the key is exportable or not.
}
Type AsymmetricGenerateResult
type AsymmetricGenerateResult structtype AsymmetricGenerateResult struct {
ItemData
}
Type AsymmetricStoreRequest
type AsymmetricStoreRequest structtype AsymmetricStoreRequest struct {
CommonStoreRequest
Algorithm AsymmetricAlgorithm `json:"algorithm"` // The algorithm of the key
PublicKey EncodedPublicKey `json:"public_key"` // The public key (in PEM format)
PrivateKey EncodedPrivateKey `json:"private_key"` // The private key (in PEM format)
Purpose KeyPurpose `json:"purpose,omitempty"` // The purpose of the key
Exportable *bool `json:"exportable,omitempty"` // Whether the key is exportable or not.
}
Type AsymmetricStoreResult
type AsymmetricStoreResult structtype AsymmetricStoreResult struct {
ItemData
}
Type Client
type Client interfacetype Client interface {
StateChange(ctx context.Context, req *StateChangeRequest) (*pangea.PangeaResponse[StateChangeResult], error)
Delete(ctx context.Context, req *DeleteRequest) (*pangea.PangeaResponse[DeleteResult], error)
Get(ctx context.Context, req *GetRequest) (*pangea.PangeaResponse[GetResult], error)
JWKGet(ctx context.Context, req *JWKGetRequest) (*pangea.PangeaResponse[JWKGetResult], error)
List(ctx context.Context, req *ListRequest) (*pangea.PangeaResponse[ListResult], error)
Update(ctx context.Context, req *UpdateRequest) (*pangea.PangeaResponse[UpdateResult], error)
SecretStore(ctx context.Context, req *SecretStoreRequest) (*pangea.PangeaResponse[SecretStoreResult], error)
SecretRotate(ctx context.Context, req *SecretRotateRequest) (*pangea.PangeaResponse[SecretRotateResult], error)
SymmetricGenerate(ctx context.Context, req *SymmetricGenerateRequest) (*pangea.PangeaResponse[SymmetricGenerateResult], error)
AsymmetricGenerate(ctx context.Context, req *AsymmetricGenerateRequest) (*pangea.PangeaResponse[AsymmetricGenerateResult], error)
SymmetricStore(ctx context.Context, req *SymmetricStoreRequest) (*pangea.PangeaResponse[SymmetricStoreResult], error)
AsymmetricStore(ctx context.Context, req *AsymmetricStoreRequest) (*pangea.PangeaResponse[AsymmetricStoreResult], error)
KeyRotate(ctx context.Context, req *KeyRotateRequest) (*pangea.PangeaResponse[KeyRotateResult], error)
Encrypt(ctx context.Context, req *EncryptRequest) (*pangea.PangeaResponse[EncryptResult], error)
Decrypt(ctx context.Context, req *DecryptRequest) (*pangea.PangeaResponse[DecryptResult], error)
Sign(ctx context.Context, req *SignRequest) (*pangea.PangeaResponse[SignResult], error)
Verify(ctx context.Context, req *VerifyRequest) (*pangea.PangeaResponse[VerifyResult], error)
JWTSign(ctx context.Context, req *JWTSignRequest) (*pangea.PangeaResponse[JWTSignResult], error)
JWTVerify(ctx context.Context, req *JWTVerifyRequest) (*pangea.PangeaResponse[JWTVerifyResult], error)
FolderCreate(ctx context.Context, req *FolderCreateRequest) (*pangea.PangeaResponse[FolderCreateResult], error)
// Encrypt parts of a JSON object.
EncryptStructured(ctx context.Context, input *EncryptStructuredRequest) (*pangea.PangeaResponse[EncryptStructuredResult], error)
// Decrypt parts of a JSON object.
DecryptStructured(ctx context.Context, input *EncryptStructuredRequest) (*pangea.PangeaResponse[EncryptStructuredResult], error)
// Encrypt using a format-preserving algorithm (FPE).
EncryptTransform(ctx context.Context, input *EncryptTransformRequest) (*pangea.PangeaResponse[EncryptTransformResult], error)
// Decrypt using a format-preserving algorithm (FPE).
DecryptTransform(ctx context.Context, input *DecryptTransformRequest) (*pangea.PangeaResponse[DecryptTransformResult], error)
EncryptTransformStructured(ctx context.Context, input *EncryptTransformStructuredRequest) (*pangea.PangeaResponse[EncryptTransformStructuredResult], error)
DecryptTransformStructured(ctx context.Context, input *EncryptTransformStructuredRequest) (*pangea.PangeaResponse[EncryptTransformStructuredResult], error)
// Export a symmetric or asymmetric key.
Export(ctx context.Context, input *ExportRequest) (*pangea.PangeaResponse[ExportResult], error)
GetBulk(ctx context.Context, input *GetBulkRequest) (*pangea.PangeaResponse[GetBulkResult], error)
// Base service methods
pangea.BaseServicer
}
Type CommonGenerateRequest
type CommonGenerateRequest structtype CommonGenerateRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
Type ItemType `json:"type"` // The type of the item
Name string `json:"name,omitempty"` // The name of this item
Folder string `json:"folder,omitempty"` // The folder where this item is stored
Metadata Metadata `json:"metadata,omitempty"` // User-provided metadata
Tags Tags `json:"tags,omitempty"` // A list of user-defined tags
RotationFrequency string `json:"rotation_frequency,omitempty"` // Period of time between item rotations.
RotationState string `json:"rotation_state,omitempty"` // State to which the previous version should transition upon rotation
DisabledAt string `json:"disabled_at,omitempty"` // Timestamp indicating when the item will be disabled
}
Type CommonRotateRequest
type CommonRotateRequest structtype CommonRotateRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The ID of the key
RotationState ItemVersionState `json:"rotation_state,omitempty"` // State to which the previous version should transition upon rotation
}
Type CommonStoreRequest
type CommonStoreRequest structtype CommonStoreRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
Type ItemType `json:"type"` // The type of the item
Name string `json:"name,omitempty"` // The name of this item
Folder string `json:"folder,omitempty"` // The folder where this item is stored
Metadata Metadata `json:"metadata,omitempty"` // User-provided metadata
Tags Tags `json:"tags,omitempty"` // A list of user-defined tags
RotationFrequency string `json:"rotation_frequency,omitempty"` // Period of time between item rotations.
RotationState ItemVersionState `json:"rotation_state,omitempty"` // State to which the previous version should transition upon rotation
DisabledAt string `json:"disabled_at,omitempty"` // Timestamp indicating when the item will be disabled
}
Type CommonStoreResult
type CommonStoreResult structtype CommonStoreResult struct {
ID string `json:"id"` // The ID of the item
Type string `json:"type"` // The type of the item
Version int `json:"version"` // The item version
}
Type DecryptRequest
type DecryptRequest structtype DecryptRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The item ID
CipherText string `json:"cipher_text"` // A message encrypted by Vault (Base64 encoded)
Version *int `json:"version,omitempty"` // The item version
AdditionalData *string `json:"additional_data,omitempty"` // User provided authentication data
}
Type DecryptResult
type DecryptResult structtype DecryptResult struct {
ID string `json:"id"` // The item ID
Version int `json:"version"` // The item version
Algorithm string `json:"algorithm"` // The algorithm of the key
PlainText string `json:"plain_text"` // The decrypted message
}
Type DecryptTransformRequest
type DecryptTransformRequest structParameters for a decrypt transform request.
type DecryptTransformRequest struct {
pangea.BaseRequest
// The ID of the key to use.
ID string `json:"id"`
// A message encrypted by Vault.
CipherText string `json:"cipher_text"`
// User provided tweak string. If not provided, a random string will be
// generated and returned. The user must securely store the tweak source
// which will be needed to decrypt the data.
Tweak string `json:"tweak"`
// Set of characters to use for format-preserving encryption (FPE).
Alphabet TransformAlphabet `json:"alphabet"`
// The item version. Defaults to the current version.
Version *int `json:"version,omitempty"`
}
Type DecryptTransformResult
type DecryptTransformResult structResult of a decrypt transform request.
type DecryptTransformResult struct {
// The item ID.
ID string `json:"id"`
// Decrypted message.
PlainText string `json:"plain_text"`
// The item version.
Version int `json:"version"`
// The algorithm of the key.
Algorithm string `json:"algorithm"`
}
Type DeleteRequest
type DeleteRequest structtype DeleteRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The item ID
Recursive *bool `json:"recursive,omitempty"` // true for recursive deleting all the items inside a folder. Valid only for folders
}
Type DeleteResult
type DeleteResult structtype DeleteResult struct {
ID string `json:"id"`
}
Type EncodedPrivateKey
type EncodedPrivateKey stringEncodedPrivateKey is a PEM private key, with no further encoding (i.e. no base64). It may be used for example in openssh with no further processing
type EncodedPrivateKey string
Type EncodedPublicKey
type EncodedPublicKey stringEncodedPublicKey is a PEM public key, with no further encoding (i.e. no base64) It may be used for example in openssh with no further processing
type EncodedPublicKey string
Type EncodedSymmetricKey
type EncodedSymmetricKey stringEncodedSymmetricKey is a base64 encoded key
type EncodedSymmetricKey string
Type EncryptRequest
type EncryptRequest structtype EncryptRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The item ID
PlainText string `json:"plain_text"` // A message to be encrypted (Base64 encoded)
Version *int `json:"version,omitempty"` // The item version
AdditionalData *string `json:"additional_data,omitempty"` // User provided authentication data
}
Type EncryptResult
type EncryptResult structtype EncryptResult struct {
ID string `json:"id"` // The item ID
Version int `json:"version"` // The item version
Algorithm string `json:"algorithm"` // The algorithm of the key
CipherText string `json:"cipher_text"` // The encrypted message (Base64 encoded)
}
Type EncryptStructuredRequest
type EncryptStructuredRequest structParameters for an encrypt/decrypt structured request.
type EncryptStructuredRequest struct {
pangea.BaseRequest
// The ID of the key to use. It must be an item of type `symmetric_key` or
// `asymmetric_key` and purpose `encryption`.
ID string `json:"id"`
// Structured data for applying bulk operations.
StructuredData map[string]interface{} `json:"structured_data"`
// A filter expression. It must point to string elements of the
// `StructuredData` field.
Filter string `json:"filter"`
// The item version. Defaults to the current version.
Version *int `json:"version,omitempty"`
// User provided authentication data.
AdditionalData *string `json:"additional_data,omitempty"`
}
Type EncryptStructuredResult
type EncryptStructuredResult structResult of an encrypt/decrypt structured request.
type EncryptStructuredResult struct {
// The ID of the item.
ID string `json:"id"`
// The item version.
Version int `json:"version"`
// The algorithm of the key.
Algorithm string `json:"algorithm"`
// Structured data with filtered fields encrypted/decrypted.
StructuredData map[string]interface{} `json:"structured_data"`
}
Type EncryptTransformRequest
type EncryptTransformRequest structParameters for an encrypt transform request.
type EncryptTransformRequest struct {
pangea.BaseRequest
// The ID of the key to use.
ID string `json:"id"`
// Message to be encrypted.
PlainText string `json:"plain_text"`
// Set of characters to use for format-preserving encryption (FPE).
Alphabet TransformAlphabet `json:"alphabet"`
// User provided tweak string. If not provided, a random string will be
// generated and returned. The user must securely store the tweak source
// which will be needed to decrypt the data.
Tweak *string `json:"tweak,omitempty"`
// The item version. Defaults to the current version.
Version *int `json:"version,omitempty"`
}
Type EncryptTransformResult
type EncryptTransformResult structResult of an encrypt transform request.
type EncryptTransformResult struct {
// The item ID.
ID string `json:"id"`
// The encrypted message.
CipherText string `json:"cipher_text"`
// The item version.
Version int `json:"version"`
// The algorithm of the key.
Algorithm string `json:"algorithm"`
// User provided tweak string. If not provided, a random string will be
// generated and returned. The user must securely store the tweak source
// which will be needed to decrypt the data.
Tweak string `json:"tweak"`
// Set of characters to use for format-preserving encryption (FPE).
Alphabet TransformAlphabet `json:"alphabet"`
}
Type EncryptTransformStructuredRequest
type EncryptTransformStructuredRequest structtype EncryptTransformStructuredRequest struct {
pangea.BaseRequest
// The ID of the key to use. It must be an item of type `symmetric_key` or
// `asymmetric_key` and purpose `encryption`.
ID string `json:"id"`
// Set of characters to use for format-preserving encryption (FPE).
Alphabet TransformAlphabet `json:"alphabet"`
// Structured data for applying bulk operations.
StructuredData map[string]interface{} `json:"structured_data"`
// A filter expression. It must point to string elements of the
// `StructuredData` field.
Filter string `json:"filter"`
// The item version. Defaults to the current version.
Version *int `json:"version,omitempty"`
// User provided authentication data.
AdditionalData *string `json:"additional_data,omitempty"`
// User provided tweak string. If not provided, a random string will be
// generated and returned. The user must securely store the tweak source
// which will be needed to decrypt the data.
Tweak *string `json:"tweak"`
}
Type EncryptTransformStructuredResult
type EncryptTransformStructuredResult structResult of an encrypt/decrypt structured request.
type EncryptTransformStructuredResult struct {
// The ID of the item.
ID string `json:"id"`
// The item version.
Version int `json:"version"`
// The algorithm of the key.
Algorithm string `json:"algorithm"`
// Structured data with filtered fields encrypted/decrypted.
StructuredData map[string]interface{} `json:"structured_data"`
// User provided tweak string. If not provided, a random string will be
// generated and returned. The user must securely store the tweak source
// which will be needed to decrypt the data.
Tweak string `json:"tweak"`
// Set of characters to use for format-preserving encryption (FPE).
Alphabet TransformAlphabet `json:"alphabet"`
}
Type ExportEncryptionAlgorithm
type ExportEncryptionAlgorithm stringAlgorithm of an exported public key.
type ExportEncryptionAlgorithm string
Type ExportEncryptionType
type ExportEncryptionType stringtype ExportEncryptionType string
Type ExportRequest
type ExportRequest structtype ExportRequest struct {
pangea.BaseRequest
ID string `json:"id"` // The ID of the item.
Version *int `json:"version,omitempty"` // The item version.
AsymmetricPublicKey *string `json:"asymmetric_public_key,omitempty"` // Public key in PEM format used to encrypt exported key(s).
AsymmetricAlgorithm *ExportEncryptionAlgorithm `json:"asymmetric_algorithm,omitempty"` // The algorithm of the public key.
KEMPassword *string `json:"kem_password,omitempty"` // This is the password that will be used along with a salt to derive the symmetric key that is used to encrypt the exported key material. Required if encryption_type is kem.
}
Type ExportResult
type ExportResult structtype ExportResult struct {
ID string `json:"id"` // The ID of the item.
Type string `json:"type"` // The type of the key.
Version int `json:"version"` // The item version.
Enabled bool `json:"enabled"` // True if the item is enabled.
Algorithm string `json:"algorithm"` // The algorithm of the key.
PublicKey *string `json:"public_key,omitempty"` // The public key (in PEM format).
PrivateKey *string `json:"private_key,omitempty"` // The private key (in PEM format), it could be encrypted or not based on 'encryption_type' value.
Key *string `json:"key,omitempty"` // The key material.
// Encryption information
EncryptionType string `json:"encryption_type"` // Encryption format of the exported key(s). It could be none if returned in plain text, asymmetric if it is encrypted just with the public key sent in asymmetric_public_key, or kem if it was encrypted using KEM protocol.
AsymmetricAlgorithm string `json:"asymmetric_algorithm,omitempty"` // The algorithm of the public key used to encrypt exported material
SymmetricAlgorithm string `json:"symmetric_algorithm,omitempty"` // The algorithm of the symmetric key used to encrypt exported material
KDF string `json:"kdf,omitempty"` // Key derivation function used to derivate the symmetric key when `encryption_type` is `kem`
HashAlgorithm string `json:"hash_algorithm,omitempty"` // Hash algorithm used to derivate the symmetric key when `encryption_type` is `kem`
IterationCount int `json:"iteration_count,omitempty"` // Iteration count used to derivate the symmetric key when `encryption_type` is `kem`
EncryptedSalt string `json:"encrypted_salt,omitempty"` // Salt used to derivate the symmetric key when `encryption_type` is `kem`, encrypted with the public key provided in `asymmetric_key`
}
Type FilterList
type FilterList structtype FilterList struct {
pangea.FilterBase
_type *pangea.FilterMatch[string]
id *pangea.FilterMatch[string]
algorithm *pangea.FilterMatch[string]
purpose *pangea.FilterMatch[string]
name *pangea.FilterMatch[string]
folder *pangea.FilterMatch[string]
itemState *pangea.FilterMatch[string]
createdAt *pangea.FilterRange[string]
destroyedAt *pangea.FilterRange[string]
expiration *pangea.FilterRange[string]
lastRotated *pangea.FilterRange[string]
nextRotation *pangea.FilterRange[string]
}
Type FolderCreateRequest
type FolderCreateRequest structtype FolderCreateRequest struct {
pangea.BaseRequest
Name string `json:"name"` // The name of this folder
Folder string `json:"folder,omitempty"` // The parent folder where this folder is stored
Metadata Metadata `json:"metadata,omitempty"` // User-provided metadata
Tags Tags `json:"tags,omitempty"` // A list of user-defined tags
RotationFrequency string `json:"rotation_frequency,omitempty"` // Period of time between item rotations, never to disable rotation or inherited to inherit the value from the parent folder or from the default settings (format: a positive number followed by a time period (secs, mins, hrs, days, weeks, months, years) or an abbreviation
RotationState ItemVersionState `json:"rotation_state,omitempty"` // State to which the previous version should transition upon rotation or inherited to inherit the value from the parent folder or from the default settings
RotationGracePeriod string `json:"rotation_grace_period,omitempty"` // Grace period for the previous version of the Pangea Token or inherited to inherit the value from the parent folder or from the default settings (format: a positive number followed by a time period (secs, mins, hrs, days, weeks, months, years) or an abbreviation
}
Type FolderCreateResult
type FolderCreateResult structtype FolderCreateResult struct {
ItemData
}
Type GetBulkRequest
type GetBulkRequest structtype GetBulkRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
Filter pangea.Filter `json:"filter,omitempty"` // A set of filters to help you customize your search
Last string `json:"last,omitempty"` // Internal ID returned in the previous look up response. Used for pagination.
Size int `json:"size,omitempty"` // Maximum number of items in the response
Order ItemOrder `json:"order,omitempty"` // Ordering direction
OrderBy ItemOrderBy `json:"order_by,omitempty"` // Property used to order the results
}
Type GetBulkResult
type GetBulkResult structtype GetBulkResult struct {
Items []ItemData `json:"items"`
Last string `json:"last,omitempty"`
}
Type GetRequest
type GetRequest structtype GetRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"`
Version string `json:"version,omitempty"`
}
Type GetResult
type GetResult structtype GetResult struct {
ItemData
}
Type InheritedSettings
type InheritedSettings structtype InheritedSettings struct {
RotationFrequency string `json:"rotation_frequency,omitempty"`
RotationState string `json:"rotation_state,omitempty"`
RotationGracePeriod string `json:"rotation_grace_period,omitempty"`
}
Type ItemData
type ItemData structtype ItemData struct {
ID string `json:"id"` // The ID of the item
Type string `json:"type"` // The type of the item
NumVersions int `json:"num_versions"` // Latest version number
Enabled bool `json:"enabled"` // True if the item is enabled
Name string `json:"name,omitempty"` // The name of this item
Folder string `json:"folder,omitempty"` // The folder where this item is stored
Metadata Metadata `json:"metadata,omitempty"` // User-provided metadata
Tags Tags `json:"tags,omitempty"` // A list of user-defined tags
RotationFrequency string `json:"rotation_frequency,omitempty"` // Period of time between item rotations.
RotationState string `json:"rotation_state,omitempty"` // State to which the previous version should transition upon rotation
LastRotated string `json:"last_rotated,omitempty"` // Timestamp of the last rotation (if any)
NextRotation string `json:"next_rotation,omitempty"` // Timestamp of the next rotation, if auto rotation is enabled.
DisabledAt string `json:"disabled_at,omitempty"` // Timestamp indicating when the item will be disabled
CreatedAt string `json:"created_at"` // Timestamp indicating when the item was created
Algorithm string `json:"algorithm,omitempty"` // The algorithm of the key
Purpose string `json:"purpose,omitempty"` // The purpose of the key
RotationGracePeriod string `json:"rotation_grace_period,omitempty"` // Grace period for the previous version of the secret
Exportable *bool `json:"exportable,omitempty"` // Whether the key is exportable or not.
ClientID string `json:"client_id,omitempty"`
InheritedSettings *InheritedSettings `json:"inherited_settings,omitempty"` // For settings that inherit a value from a parent folder, the full path of the folder where the value is set
ItemVersions []ItemVersionData `json:"item_versions"`
}
Type ItemOrder
type ItemOrder stringtype ItemOrder string
Type ItemOrderBy
type ItemOrderBy stringtype ItemOrderBy string
Type ItemState
type ItemState stringtype ItemState string
Type ItemType
type ItemType stringtype ItemType string
Type ItemVersionData
type ItemVersionData structtype ItemVersionData struct {
Version int `json:"version"` // The item version
State string `json:"state"` // The state of the item version
CreatedAt string `json:"created_at"` // Timestamp indicating when the item was created
DestroyedAt *string `json:"destroyed_at,omitempty"` // Timestamp indicating when the item version will be destroyed
RotatedAt *string `json:"rotated_at,omitempty"` // Timestamp indicating when the item version will be rotated
PublicKey *EncodedPublicKey `json:"public_key,omitempty"`
Secret *string `json:"secret,omitempty"`
Token *string `json:"token,omitempty"`
ClientSecret *string `json:"client_secret,omitempty"`
ClientSecretID *string `json:"client_secret_id,omitempty"`
}
Type ItemVersionState
type ItemVersionState stringtype ItemVersionState string
Type JWKGetRequest
type JWKGetRequest structtype JWKGetRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The item ID
Version *string `json:"version,omitempty"` // The key version(s). all for all versions, num for a specific version, -num for the num latest versions
}
Type JWKGetResult
type JWKGetResult structtype JWKGetResult struct {
Keys []JWT `json:"keys"` // The JSON Web Key Set (JWKS) object. Fields with key information are base64URL encoded.
}
Type JWT
type JWT structtype JWT struct {
Alg string `json:"alg"`
Kid *string `json:"kid,omitempty"`
Kty string `json:"kty"`
Use *string `json:"use,omitempty"`
Crv *string `json:"crv,omitempty"`
D *string `json:"d,omitempty"`
X *string `json:"x,omitempty"`
Y *string `json:"y,omitempty"`
N *string `json:"n,omitempty"`
E *string `json:"e,omitempty"`
}
Type JWTSignRequest
type JWTSignRequest structtype JWTSignRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The item ID
Payload string `json:"payload"` // The JWT payload (in JSON)
}
Type JWTSignResult
type JWTSignResult structtype JWTSignResult struct {
JWS string `json:"jws"` // The signed JSON Web Token (JWS)
}
Type JWTVerifyRequest
type JWTVerifyRequest structtype JWTVerifyRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
JWS string `json:"jws"` // The signed JSON Web Token (JWS)
}
Type JWTVerifyResult
type JWTVerifyResult structtype JWTVerifyResult struct {
ValidSignature bool `json:"valid_signature"` // Indicates if messages have been verified.
}
Type KEMDecryptInput
type KEMDecryptInput structtype KEMDecryptInput struct {
Cipher []byte
EncryptedSalt []byte
AsymmetricAlgorithm string
AsymmetricPrivateKey cryptorsa.PrivateKey
SymmetricAlgorithm string
Password string
HashAlgorithm KEMhashAlgorithm
IterationCount int
KDF KEMKDF
}
Type KEMKDF
type KEMKDF stringtype KEMKDF string
Type KEMhashAlgorithm
type KEMhashAlgorithm stringtype KEMhashAlgorithm string
Type KeyPurpose
type KeyPurpose stringtype KeyPurpose string
Type KeyRotateRequest
type KeyRotateRequest structtype KeyRotateRequest struct {
CommonRotateRequest
PublicKey *EncodedPublicKey `json:"public_key,omitempty"` // The public key (in PEM format)
PrivateKey *EncodedPrivateKey `json:"private_key,omitempty"` // The private key (in PEM format)
Key *EncodedSymmetricKey `json:"key,omitempty"` // The key material
}
Type KeyRotateResult
type KeyRotateResult structtype KeyRotateResult struct {
ItemData
}
Type ListInclude
type ListInclude stringtype ListInclude string
Type ListItemData
type ListItemData structtype ListItemData struct {
ItemData
CompromisedVersions []ItemVersionData `json:"compromised_versions"`
}
Type ListRequest
type ListRequest structtype ListRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
Filter pangea.Filter `json:"filter,omitempty"` // A set of filters to help you customize your search.
Last string `json:"last,omitempty"` // Internal ID returned in the previous look up response. Used for pagination.
Size int `json:"size,omitempty"` // Maximum number of items in the response
Order ItemOrder `json:"order,omitempty"` // Ordering direction
OrderBy ItemOrderBy `json:"order_by,omitempty"` // Property used to order the results
}
Type ListResult
type ListResult structtype ListResult struct {
Items []ListItemData `json:"items"`
Last string `json:"last,omitempty"` // Internal ID returned in the previous look up response. Used for pagination.
}
Type Metadata
type Metadata map[string]stringtype Metadata map[string]string
Type SecretRotateRequest
type SecretRotateRequest structtype SecretRotateRequest struct {
CommonRotateRequest
RotationGracePeriod string `json:"rotation_grace_period,omitempty"` // Grace period for the previous version of the secret
Secret string `json:"secret,omitempty"`
}
Type SecretRotateResult
type SecretRotateResult structtype SecretRotateResult struct {
ItemData
}
Type SecretStoreRequest
type SecretStoreRequest structtype SecretStoreRequest struct {
CommonStoreRequest
Secret string `json:"secret,omitempty"` // The secret value
Token string `json:"token,omitempty"` // The Pangea Token value
ClientSecret string `json:"client_secret,omitempty"` // The oauth client secret
ClientID string `json:"client_id,omitempty"` // The oauth client ID
ClientSecretID string `json:"client_secret_id,omitempty"` // The oauth client secret ID
RotationGracePeriod string `json:"rotation_grace_period,omitempty"` // Grace period for the previous version of the secret
}
Type SecretStoreResult
type SecretStoreResult structtype SecretStoreResult struct {
ItemData
Secret string `json:"secret,omitempty"` // The secret value
Token string `json:"token,omitempty"` // The Pangea Token value
ClientSecret string `json:"client_secret,omitempty"` // The oauth client secret
ClientID string `json:"client_id,omitempty"` // The oauth client ID
ClientSecretID string `json:"client_secret_id,omitempty"` // The oauth client secret ID
RotationGracePeriod string `json:"rotation_grace_period,omitempty"` // Grace period for the previous version of the secret
}
Type SignRequest
type SignRequest structtype SignRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The ID of the item
Version *int `json:"version,omitempty"` // The item version
Message string `json:"message"` // The message to be signed
}
Type SignResult
type SignResult structtype SignResult struct {
ID string `json:"id"` // The ID of the item
Version int `json:"version"` // The item version
Signature string `json:"signature"` // The signature of the message
Algorithm string `json:"algorithm"` // The algorithm of the key
PublicKey *EncodedPublicKey `json:"public_key,omitempty"` // The public key (in PEM format)
}
Type StateChangeRequest
type StateChangeRequest structtype StateChangeRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The item ID
State ItemVersionState `json:"state"` // The new state of the item version
Version *int `json:"version,omitempty"` // The item version
DestroyPeriod string `json:"destroy_period,omitempty"` // Period of time for the destruction of a compromised key. Only applicable if state=compromised (format: a positive number followed by a time period (secs, mins, hrs, days, weeks, months, years) or an abbreviation
}
Type StateChangeResult
type StateChangeResult structtype StateChangeResult struct {
ItemData
}
Type SymmetricAlgorithm
type SymmetricAlgorithm stringtype SymmetricAlgorithm string
Type SymmetricGenerateRequest
type SymmetricGenerateRequest structtype SymmetricGenerateRequest struct {
CommonGenerateRequest
Algorithm SymmetricAlgorithm `json:"algorithm"` // The algorithm of the key
Purpose KeyPurpose `json:"purpose"` // The purpose of the key
Exportable *bool `json:"exportable,omitempty"` // Whether the key is exportable or not.
}
Type SymmetricGenerateResult
type SymmetricGenerateResult structtype SymmetricGenerateResult struct {
ItemData
}
Type SymmetricStoreRequest
type SymmetricStoreRequest structtype SymmetricStoreRequest struct {
CommonStoreRequest
Key EncodedSymmetricKey `json:"key"`
Algorithm SymmetricAlgorithm `json:"algorithm"` // The algorithm of the key
Purpose KeyPurpose `json:"purpose,omitempty"` // The purpose of the key
Exportable *bool `json:"exportable,omitempty"` // Whether the key is exportable or not.
}
Type SymmetricStoreResult
type SymmetricStoreResult structtype SymmetricStoreResult struct {
ItemData
}
Type Tags
type Tags []stringtype Tags []string
Type TransformAlphabet
type TransformAlphabet stringtype TransformAlphabet string
Type UpdateRequest
type UpdateRequest structtype UpdateRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The item ID
Name string `json:"name,omitempty"` // The name of this item
Folder string `json:"folder,omitempty"` // The parent folder where this item is stored
Metadata Metadata `json:"metadata,omitempty"` // User-provided metadata
Tags Tags `json:"tags,omitempty"` // A list of user-defined tags
DisabledAt string `json:"disabled_at,omitempty"` // Timestamp indicating when the item will be disabled
Enabled *bool `json:"enabled,omitempty"` // True if the item is enabled
RotationFrequency string `json:"rotation_frequency,omitempty"` // Period of time between item rotations, never to disable rotation or inherited to inherit the value from the parent folder or from the default settings (format: a positive number followed by a time period (secs, mins, hrs, days, weeks, months, years) or an abbreviation
RotationState ItemVersionState `json:"rotation_state,omitempty"` // State to which the previous version should transition upon rotation or inherited to inherit the value from the parent folder or from the default settings
RotationGracePeriod string `json:"rotation_grace_period,omitempty"` // Grace period for the previous version of the Pangea Token or inherited to inherit the value from the parent folder or from the default settings (format: a positive number followed by a time period (secs, mins, hrs, days, weeks, months, years) or an abbreviation
}
Type UpdateResult
type UpdateResult structtype UpdateResult struct {
ItemData
}
Type VerifyRequest
type VerifyRequest structtype VerifyRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"` // The ID of the item
Version *int `json:"version,omitempty"` // The item version
Message string `json:"message"` // A message to be verified
Signature string `json:"signature"` // The message signature
}
Type VerifyResult
type VerifyResult structtype VerifyResult struct {
ID string `json:"id"` // The ID of the item
Version int `json:"version"` // The item version
Algorithm string `json:"algorithm"` // The algorithm of the key
ValidSignature bool `json:"valid_signature"` // Indicates if messages have been verified.
}
Type vault
type vault structtype vault struct {
pangea.BaseService
}