api

package
v0.5.94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KmsCreateKeyV1Request added in v0.5.9

type KmsCreateKeyV1Request struct {
	// KeyUsage is the usage of the key. Can be either sign-verify or encrypt-decrypt
	KeyUsage string `json:"keyUsage"`

	// Description is the description of the key.
	Description string `json:"description"`

	// Name is the name of the key.
	Name string `json:"name"`

	// EncryptionAlgorithm is the algorithm that will be used for the key itself.
	// `sign-verify algorithms`: `rsa-4096`, `ecc-nist-p256`
	// `encrypt-decrypt algorithms`: `aes-256-gcm`, `aes-128-gcm`
	EncryptionAlgorithm string `json:"encryptionAlgorithm"`

	// ProjectId is the project ID that the key will be created in.
	ProjectId string `json:"projectId"`
}

type KmsCreateKeyV1Response added in v0.5.9

type KmsCreateKeyV1Response struct {
	Key KmsKey `json:"key"`
}

func CallKmsCreateKeyV1 added in v0.5.9

func CallKmsCreateKeyV1(httpClient *resty.Client, request KmsCreateKeyV1Request) (KmsCreateKeyV1Response, error)

type KmsDecryptDataV1Request

type KmsDecryptDataV1Request struct {
	KeyId      string
	Ciphertext string `json:"ciphertext"`
}

type KmsDecryptDataV1Response

type KmsDecryptDataV1Response struct {
	Plaintext string `json:"plaintext"`
}

func CallKmsDecryptDataV1

func CallKmsDecryptDataV1(httpClient *resty.Client, request KmsDecryptDataV1Request) (KmsDecryptDataV1Response, error)

type KmsDeleteKeyV1Request added in v0.5.9

type KmsDeleteKeyV1Request struct {
	KeyId string
}

type KmsDeleteKeyV1Response added in v0.5.9

type KmsDeleteKeyV1Response struct {
	Key KmsKey `json:"key"`
}

func CallKmsDeleteKeyV1 added in v0.5.9

func CallKmsDeleteKeyV1(httpClient *resty.Client, request KmsDeleteKeyV1Request) (KmsDeleteKeyV1Response, error)

type KmsEncryptDataV1Request

type KmsEncryptDataV1Request struct {
	KeyId     string
	Plaintext string `json:"plaintext"`
}

type KmsEncryptDataV1Response

type KmsEncryptDataV1Response struct {
	Ciphertext string `json:"ciphertext"`
}

func CallKmsEncryptDataV1

func CallKmsEncryptDataV1(httpClient *resty.Client, request KmsEncryptDataV1Request) (KmsEncryptDataV1Response, error)

type KmsGetKeyByNameV1Request added in v0.5.9

type KmsGetKeyByNameV1Request struct {
	KeyName   string
	ProjectId string
}

type KmsGetKeyV1Response added in v0.5.9

type KmsGetKeyV1Response struct {
	Key KmsKey `json:"key"`
}

func CallKmsGetKeyByNameV1 added in v0.5.9

func CallKmsGetKeyByNameV1(httpClient *resty.Client, request KmsGetKeyByNameV1Request) (KmsGetKeyV1Response, error)

type KmsGetPublicKeyV1Request added in v0.5.9

type KmsGetPublicKeyV1Request struct {
	KeyId string
}

type KmsGetPublicKeyV1Response added in v0.5.9

type KmsGetPublicKeyV1Response struct {
	PublicKey string `json:"publicKey"`
}

func CallKmsGetPublicKeyV1 added in v0.5.9

func CallKmsGetPublicKeyV1(httpClient *resty.Client, request KmsGetPublicKeyV1Request) (KmsGetPublicKeyV1Response, error)

type KmsKey added in v0.5.9

type KmsKey struct {
	KeyId               string `json:"id"`
	Description         string `json:"description"`
	IsDisabled          bool   `json:"isDisabled"`
	OrgId               string `json:"orgId"`
	Name                string `json:"name"`
	ProjectId           string `json:"projectId"`
	KeyUsage            string `json:"keyUsage"`
	Version             int    `json:"version"`
	EncryptionAlgorithm string `json:"encryptionAlgorithm"`
}

type KmsListSigningAlgorithmsV1Request added in v0.5.9

type KmsListSigningAlgorithmsV1Request struct {
	KeyId string
}

type KmsListSigningAlgorithmsV1Response added in v0.5.9

type KmsListSigningAlgorithmsV1Response struct {
	SigningAlgorithms []string `json:"signingAlgorithms"`
}

func CallKmsGetSigningAlgorithmsV1 added in v0.5.9

func CallKmsGetSigningAlgorithmsV1(httpClient *resty.Client, request KmsListSigningAlgorithmsV1Request) (KmsListSigningAlgorithmsV1Response, error)

type KmsSignDataV1Request added in v0.5.9

type KmsSignDataV1Request struct {
	KeyId            string
	Data             string `json:"data"`
	SigningAlgorithm string `json:"signingAlgorithm"`
	IsDigest         bool   `json:"isDigest"`
}

type KmsSignDataV1Response added in v0.5.9

type KmsSignDataV1Response struct {
	Signature        string `json:"signature"`
	KeyId            string `json:"keyId"`
	SigningAlgorithm string `json:"signingAlgorithm"`
}

func CallKmsSignDataV1 added in v0.5.9

func CallKmsSignDataV1(httpClient *resty.Client, request KmsSignDataV1Request) (KmsSignDataV1Response, error)

type KmsVerifyDataV1Request added in v0.5.9

type KmsVerifyDataV1Request struct {
	KeyId            string
	Data             string `json:"data"` // Data must be base64 encoded
	Signature        string `json:"signature"`
	SigningAlgorithm string `json:"signingAlgorithm"`
	IsDigest         bool   `json:"isDigest"`
}

type KmsVerifyDataV1Response added in v0.5.9

type KmsVerifyDataV1Response struct {
	SignatureValid   bool   `json:"signatureValid"`
	KeyId            string `json:"keyId"`
	SigningAlgorithm string `json:"signingAlgorithm"`
}

func CallKmsVerifyDataV1 added in v0.5.9

func CallKmsVerifyDataV1(httpClient *resty.Client, request KmsVerifyDataV1Request) (KmsVerifyDataV1Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL