awscloud

package
v0.0.0-...-32d7a98 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config aws.Config
}

Client store aws info

func New

func New(profile string) *Client

New init aws client session

func (*Client) KmsClient

func (client *Client) KmsClient(region string) *KMSClient

KmsClient return kms client

func (*Client) LambdaClient

func (client *Client) LambdaClient(region string) *LambdaClient

LambdaClient return AWS Lambda client

type KMSClient

type KMSClient struct {
	Client *kms.Client
}

KMSClient store aws info

func (*KMSClient) KmsDecrypt

func (cl *KMSClient) KmsDecrypt(ciphertextBlob []byte, encryptionContext map[string]string) ([]byte, string, error)

KmsDecrypt allow to decrypt data AWS KMS

func (*KMSClient) KmsDecryptText

func (cl *KMSClient) KmsDecryptText(text string) ([]byte, error)

KmsDecryptText allow to decrypt text by AWS KMS

func (*KMSClient) KmsEncrypt

func (cl *KMSClient) KmsEncrypt(keyID string, ciphertextBlob []byte, encryptionContext map[string]string) ([]byte, error)

KmsEncrypt allow to encrypt data by AWS KMS

func (*KMSClient) KmsEncryptText

func (cl *KMSClient) KmsEncryptText(keyID string, text []byte) (string, error)

KmsEncryptText allow to encrypt text by AWS KMS

func (*KMSClient) Read

func (cl *KMSClient) Read(p []byte) (n int, err error)

Read method for io.Reader interface

type LambdaClient

type LambdaClient struct {
	Client *lambda.Client
}

LambdaClient store aws info

func (*LambdaClient) LambdaInvoke

func (cl *LambdaClient) LambdaInvoke(funcName string, payload []byte, timeout int) ([]byte, error)

LambdaInvoke allow to call AWS Lambda

Jump to

Keyboard shortcuts

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