Skip to main content

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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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).

required parameters

context.Context
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,
},

)

required parameters

context.Context

Delete

func (v *vault) Delete(ctx context.Context, input *DeleteRequest) (*pangea.PangeaResponse[DeleteResult], error)

Delete a secret or key.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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).

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
// 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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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).

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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.

required parameters

context.Context
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 string
type AsymmetricAlgorithm string

Type AsymmetricGenerateRequest

type AsymmetricGenerateRequest struct

required parameters

AsymmetricAlgorithm `json:"algorithm,omitempty"`
*bool `json:"exportable,omitempty"`
type 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 struct
type AsymmetricGenerateResult struct {
	ItemData
}

Type AsymmetricStoreRequest

type AsymmetricStoreRequest struct

required parameters

AsymmetricAlgorithm `json:"algorithm"`
*bool `json:"exportable,omitempty"`
type 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 struct
type AsymmetricStoreResult struct {
	ItemData
}

Type Client

type Client interface

required parameters

func(ctx context.Context, req *StateChangeRequest) (*pangea.PangeaResponse[StateChangeResult], error)
context.Context
func(ctx context.Context, req *DeleteRequest) (*pangea.PangeaResponse[DeleteResult], error)
context.Context
func(ctx context.Context, req *GetRequest) (*pangea.PangeaResponse[GetResult], error)
context.Context
func(ctx context.Context, req *JWKGetRequest) (*pangea.PangeaResponse[JWKGetResult], error)
context.Context
func(ctx context.Context, req *ListRequest) (*pangea.PangeaResponse[ListResult], error)
context.Context
func(ctx context.Context, req *UpdateRequest) (*pangea.PangeaResponse[UpdateResult], error)
context.Context
func(ctx context.Context, req *SecretStoreRequest) (*pangea.PangeaResponse[SecretStoreResult], error)
context.Context
func(ctx context.Context, req *SecretRotateRequest) (*pangea.PangeaResponse[SecretRotateResult], error)
context.Context
func(ctx context.Context, req *SymmetricGenerateRequest) (*pangea.PangeaResponse[SymmetricGenerateResult], error)
context.Context
func(ctx context.Context, req *AsymmetricGenerateRequest) (*pangea.PangeaResponse[AsymmetricGenerateResult], error)
context.Context
func(ctx context.Context, req *SymmetricStoreRequest) (*pangea.PangeaResponse[SymmetricStoreResult], error)
context.Context
func(ctx context.Context, req *AsymmetricStoreRequest) (*pangea.PangeaResponse[AsymmetricStoreResult], error)
context.Context
func(ctx context.Context, req *KeyRotateRequest) (*pangea.PangeaResponse[KeyRotateResult], error)
context.Context
func(ctx context.Context, req *EncryptRequest) (*pangea.PangeaResponse[EncryptResult], error)
context.Context
func(ctx context.Context, req *DecryptRequest) (*pangea.PangeaResponse[DecryptResult], error)
context.Context
func(ctx context.Context, req *SignRequest) (*pangea.PangeaResponse[SignResult], error)
context.Context
func(ctx context.Context, req *VerifyRequest) (*pangea.PangeaResponse[VerifyResult], error)
context.Context
func(ctx context.Context, req *JWTSignRequest) (*pangea.PangeaResponse[JWTSignResult], error)
context.Context
func(ctx context.Context, req *JWTVerifyRequest) (*pangea.PangeaResponse[JWTVerifyResult], error)
context.Context
func(ctx context.Context, req *FolderCreateRequest) (*pangea.PangeaResponse[FolderCreateResult], error)
context.Context
func(ctx context.Context, input *EncryptStructuredRequest) (*pangea.PangeaResponse[EncryptStructuredResult], error)

Encrypt parts of a JSON object.

context.Context
func(ctx context.Context, input *EncryptStructuredRequest) (*pangea.PangeaResponse[EncryptStructuredResult], error)

Decrypt parts of a JSON object.

context.Context
func(ctx context.Context, input *EncryptTransformRequest) (*pangea.PangeaResponse[EncryptTransformResult], error)

Encrypt using a format-preserving algorithm (FPE).

context.Context
func(ctx context.Context, input *DecryptTransformRequest) (*pangea.PangeaResponse[DecryptTransformResult], error)

Decrypt using a format-preserving algorithm (FPE).

context.Context
func(ctx context.Context, input *EncryptTransformStructuredRequest) (*pangea.PangeaResponse[EncryptTransformStructuredResult], error)
context.Context
func(ctx context.Context, input *EncryptTransformStructuredRequest) (*pangea.PangeaResponse[EncryptTransformStructuredResult], error)
context.Context
func(ctx context.Context, input *ExportRequest) (*pangea.PangeaResponse[ExportResult], error)

Export a symmetric or asymmetric key.

context.Context
func(ctx context.Context, input *GetBulkRequest) (*pangea.PangeaResponse[GetBulkResult], error)
context.Context
pangea.BaseServicer

Base service methods

type 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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"name,omitempty"`
string `json:"folder,omitempty"`
string `json:"rotation_frequency,omitempty"`
string `json:"rotation_state,omitempty"`
string `json:"disabled_at,omitempty"`
type 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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
type 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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"name,omitempty"`
string `json:"folder,omitempty"`
string `json:"rotation_frequency,omitempty"`
string `json:"disabled_at,omitempty"`
type 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 struct

required parameters

string `json:"id"`
string `json:"type"`
int `json:"version"`
type 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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
string `json:"cipher_text"`
*int `json:"version,omitempty"`
*string `json:"additional_data,omitempty"`
type 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 struct

required parameters

string `json:"id"`
int `json:"version"`
string `json:"algorithm"`
string `json:"plain_text"`
type 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 struct

Parameters for a decrypt transform request.

required parameters

string `json:"id"`

The ID of the key to use.

string `json:"cipher_text"`

A message encrypted by Vault.

string `json:"tweak"`

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.

Set of characters to use for format-preserving encryption (FPE).

*int `json:"version,omitempty"`

The item version. Defaults to the current version.

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 struct

Result of a decrypt transform request.

required parameters

string `json:"id"`

The item ID.

string `json:"plain_text"`

Decrypted message.

int `json:"version"`

The item version.

string `json:"algorithm"`

The algorithm of the key.

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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
*bool `json:"recursive,omitempty"`
type 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 struct

required parameters

string `json:"id"`
type DeleteResult struct {
	ID string `json:"id"`
}

Type EncodedPrivateKey

type EncodedPrivateKey string

EncodedPrivateKey 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 string

EncodedPublicKey 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 string

EncodedSymmetricKey is a base64 encoded key

type EncodedSymmetricKey string

Type EncryptRequest

type EncryptRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
string `json:"plain_text"`
*int `json:"version,omitempty"`
*string `json:"additional_data,omitempty"`
type 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 struct

required parameters

string `json:"id"`
int `json:"version"`
string `json:"algorithm"`
string `json:"cipher_text"`
type 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 struct

Parameters for an encrypt/decrypt structured request.

required parameters

string `json:"id"`

The ID of the key to use. It must be an item of type symmetric_key or asymmetric_key and purpose encryption.

map[string]interface{} `json:"structured_data"`

Structured data for applying bulk operations.

string `json:"filter"`

A filter expression. It must point to string elements of the StructuredData field.

*int `json:"version,omitempty"`

The item version. Defaults to the current version.

*string `json:"additional_data,omitempty"`

User provided authentication data.

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 struct

Result of an encrypt/decrypt structured request.

required parameters

string `json:"id"`

The ID of the item.

int `json:"version"`

The item version.

string `json:"algorithm"`

The algorithm of the key.

map[string]interface{} `json:"structured_data"`

Structured data with filtered fields encrypted/decrypted.

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 struct

Parameters for an encrypt transform request.

required parameters

string `json:"id"`

The ID of the key to use.

string `json:"plain_text"`

Message to be encrypted.

Set of characters to use for format-preserving encryption (FPE).

*string `json:"tweak,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.

*int `json:"version,omitempty"`

The item version. Defaults to the current version.

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 struct

Result of an encrypt transform request.

required parameters

string `json:"id"`

The item ID.

string `json:"cipher_text"`

The encrypted message.

int `json:"version"`

The item version.

string `json:"algorithm"`

The algorithm of the key.

string `json:"tweak"`

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.

Set of characters to use for format-preserving encryption (FPE).

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 struct

required parameters

string `json:"id"`

The ID of the key to use. It must be an item of type symmetric_key or asymmetric_key and purpose encryption.

Set of characters to use for format-preserving encryption (FPE).

map[string]interface{} `json:"structured_data"`

Structured data for applying bulk operations.

string `json:"filter"`

A filter expression. It must point to string elements of the StructuredData field.

*int `json:"version,omitempty"`

The item version. Defaults to the current version.

*string `json:"additional_data,omitempty"`

User provided authentication data.

*string `json:"tweak"`

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.

type 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 struct

Result of an encrypt/decrypt structured request.

required parameters

string `json:"id"`

The ID of the item.

int `json:"version"`

The item version.

string `json:"algorithm"`

The algorithm of the key.

map[string]interface{} `json:"structured_data"`

Structured data with filtered fields encrypted/decrypted.

string `json:"tweak"`

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.

Set of characters to use for format-preserving encryption (FPE).

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 string

Algorithm of an exported public key.

type ExportEncryptionAlgorithm string

Type ExportEncryptionType

type ExportEncryptionType string
type ExportEncryptionType string

Type ExportRequest

type ExportRequest struct

required parameters

string `json:"id"`
*int `json:"version,omitempty"`
*string `json:"asymmetric_public_key,omitempty"`
*string `json:"kem_password,omitempty"`
type 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 struct

required parameters

string `json:"id"`
string `json:"type"`
int `json:"version"`
bool `json:"enabled"`
string `json:"algorithm"`
*string `json:"public_key,omitempty"`
*string `json:"private_key,omitempty"`
*string `json:"key,omitempty"`
string `json:"encryption_type"`

Encryption information

string `json:"asymmetric_algorithm,omitempty"`
string `json:"symmetric_algorithm,omitempty"`
string `json:"kdf,omitempty"`
string `json:"hash_algorithm,omitempty"`
int `json:"iteration_count,omitempty"`
string `json:"encrypted_salt,omitempty"`
type 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 struct

required parameters

*pangea.FilterMatch[string]
*pangea.FilterMatch[string]
*pangea.FilterMatch[string]
*pangea.FilterMatch[string]
*pangea.FilterMatch[string]
*pangea.FilterMatch[string]
*pangea.FilterMatch[string]
*pangea.FilterRange[string]
*pangea.FilterRange[string]
*pangea.FilterRange[string]
*pangea.FilterRange[string]
*pangea.FilterRange[string]
type 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 struct

required parameters

string `json:"name"`
string `json:"folder,omitempty"`
string `json:"rotation_frequency,omitempty"`
string `json:"rotation_grace_period,omitempty"`
type 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 struct
type FolderCreateResult struct {
	ItemData
}

Type GetBulkRequest

type GetBulkRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

pangea.Filter `json:"filter,omitempty"`
string `json:"last,omitempty"`
int `json:"size,omitempty"`
type 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 struct

required parameters

[]ItemData `json:"items"`
string `json:"last,omitempty"`
type GetBulkResult struct {
	Items	[]ItemData	`json:"items"`
	Last	string		`json:"last,omitempty"`
}

Type GetRequest

type GetRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
string `json:"version,omitempty"`
type 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 struct
type GetResult struct {
	ItemData
}

Type InheritedSettings

type InheritedSettings struct

required parameters

string `json:"rotation_frequency,omitempty"`
string `json:"rotation_state,omitempty"`
string `json:"rotation_grace_period,omitempty"`
type 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 struct

required parameters

string `json:"id"`
string `json:"type"`
int `json:"num_versions"`
bool `json:"enabled"`
string `json:"name,omitempty"`
string `json:"folder,omitempty"`
string `json:"rotation_frequency,omitempty"`
string `json:"rotation_state,omitempty"`
string `json:"last_rotated,omitempty"`
string `json:"next_rotation,omitempty"`
string `json:"disabled_at,omitempty"`
string `json:"created_at"`
string `json:"algorithm,omitempty"`
string `json:"purpose,omitempty"`
string `json:"rotation_grace_period,omitempty"`
*bool `json:"exportable,omitempty"`
string `json:"client_id,omitempty"`
type 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 string
type ItemOrder string

Type ItemOrderBy

type ItemOrderBy string
type ItemOrderBy string

Type ItemState

type ItemState string
type ItemState string

Type ItemType

type ItemType string
type ItemType string

Type ItemVersionData

type ItemVersionData struct

required parameters

int `json:"version"`
string `json:"state"`
string `json:"created_at"`
*string `json:"destroyed_at,omitempty"`
*string `json:"rotated_at,omitempty"`
*string `json:"secret,omitempty"`
*string `json:"token,omitempty"`
*string `json:"client_secret,omitempty"`
*string `json:"client_secret_id,omitempty"`
type 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 string
type ItemVersionState string

Type JWKGetRequest

type JWKGetRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
*string `json:"version,omitempty"`
type 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 struct

required parameters

[]JWT `json:"keys"`
type JWKGetResult struct {
	Keys []JWT `json:"keys"`	// The JSON Web Key Set (JWKS) object. Fields with key information are base64URL encoded.
}

Type JWT

type JWT struct

required parameters

string `json:"alg"`
*string `json:"kid,omitempty"`
string `json:"kty"`
*string `json:"use,omitempty"`
*string `json:"crv,omitempty"`
*string `json:"d,omitempty"`
*string `json:"x,omitempty"`
*string `json:"y,omitempty"`
*string `json:"n,omitempty"`
*string `json:"e,omitempty"`
type 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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
string `json:"payload"`
type 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 struct

required parameters

string `json:"jws"`
type JWTSignResult struct {
	JWS string `json:"jws"`	// The signed JSON Web Token (JWS)
}

Type JWTVerifyRequest

type JWTVerifyRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"jws"`
type 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 struct

required parameters

bool `json:"valid_signature"`
type JWTVerifyResult struct {
	ValidSignature bool `json:"valid_signature"`	// Indicates if messages have been verified.
}

Type KEMDecryptInput

type KEMDecryptInput struct

required parameters

[]byte
[]byte
string
cryptorsa.PrivateKey
string
string
KEMhashAlgorithm
int
type 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 string
type KEMKDF string

Type KEMhashAlgorithm

type KEMhashAlgorithm string
type KEMhashAlgorithm string

Type KeyPurpose

type KeyPurpose string
type KeyPurpose string

Type KeyRotateRequest

type KeyRotateRequest struct

required parameters

*EncodedPublicKey `json:"public_key,omitempty"`
type 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 struct
type KeyRotateResult struct {
	ItemData
}

Type ListInclude

type ListInclude string
type ListInclude string

Type ListItemData

type ListItemData struct

required parameters

[]ItemVersionData `json:"compromised_versions"`
type ListItemData struct {
	ItemData
	CompromisedVersions	[]ItemVersionData	`json:"compromised_versions"`
}

Type ListRequest

type ListRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

pangea.Filter `json:"filter,omitempty"`
string `json:"last,omitempty"`
int `json:"size,omitempty"`
type 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 struct

required parameters

[]ListItemData `json:"items"`
string `json:"last,omitempty"`
type 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]string
type Metadata map[string]string

Type SecretRotateRequest

type SecretRotateRequest struct

required parameters

string `json:"rotation_grace_period,omitempty"`
string `json:"secret,omitempty"`
type 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 struct
type SecretRotateResult struct {
	ItemData
}

Type SecretStoreRequest

type SecretStoreRequest struct

required parameters

string `json:"secret,omitempty"`
string `json:"token,omitempty"`
string `json:"client_secret,omitempty"`
string `json:"client_id,omitempty"`
string `json:"client_secret_id,omitempty"`
string `json:"rotation_grace_period,omitempty"`
type 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 struct

required parameters

string `json:"secret,omitempty"`
string `json:"token,omitempty"`
string `json:"client_secret,omitempty"`
string `json:"client_id,omitempty"`
string `json:"client_secret_id,omitempty"`
string `json:"rotation_grace_period,omitempty"`
type 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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
*int `json:"version,omitempty"`
string `json:"message"`
type 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 struct

required parameters

string `json:"id"`
int `json:"version"`
string `json:"signature"`
string `json:"algorithm"`
type 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 struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
*int `json:"version,omitempty"`
string `json:"destroy_period,omitempty"`
type 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 struct
type StateChangeResult struct {
	ItemData
}

Type SymmetricAlgorithm

type SymmetricAlgorithm string
type SymmetricAlgorithm string

Type SymmetricGenerateRequest

type SymmetricGenerateRequest struct

required parameters

SymmetricAlgorithm `json:"algorithm"`
*bool `json:"exportable,omitempty"`
type 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 struct
type SymmetricGenerateResult struct {
	ItemData
}

Type SymmetricStoreRequest

type SymmetricStoreRequest struct

required parameters

EncodedSymmetricKey `json:"key"`
*bool `json:"exportable,omitempty"`
type 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 struct
type SymmetricStoreResult struct {
	ItemData
}

Type Tags

type Tags []string
type Tags []string

Type TransformAlphabet

type TransformAlphabet string
type TransformAlphabet string

Type UpdateRequest

type UpdateRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
string `json:"name,omitempty"`
string `json:"folder,omitempty"`
string `json:"disabled_at,omitempty"`
*bool `json:"enabled,omitempty"`
string `json:"rotation_frequency,omitempty"`
string `json:"rotation_grace_period,omitempty"`
type 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 struct
type UpdateResult struct {
	ItemData
}

Type VerifyRequest

type VerifyRequest struct

required parameters

pangea.BaseRequest

Base request has ConfigID for multi-config projects

string `json:"id"`
*int `json:"version,omitempty"`
string `json:"message"`
string `json:"signature"`
type 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 struct

required parameters

string `json:"id"`
int `json:"version"`
string `json:"algorithm"`
bool `json:"valid_signature"`
type 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 struct
type vault struct {
	pangea.BaseService
}