cloud

package
v1.0.43 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 23 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Azure

type Azure struct {
	KvClient keyVaultClient

	BlobClient blobClient
	// contains filtered or unexported fields
}

func (*Azure) DownloadFile added in v0.1.48

func (a *Azure) DownloadFile(ctx context.Context, containerName, blobName string) (string, error)

func (*Azure) EnsureBlob added in v1.0.11

func (a *Azure) EnsureBlob(ctx context.Context) error

func (*Azure) EnsureBucket added in v1.0.20

func (a *Azure) EnsureBucket(ctx context.Context, bucketName string) error

func (*Azure) EnsureKV added in v1.0.11

func (a *Azure) EnsureKV(ctx context.Context) error

func (*Azure) GetPresignedUrl

func (a *Azure) GetPresignedUrl(ctx context.Context, bucketName, path, contentType string, expiry time.Duration) (string, string)

func (*Azure) LoadSecretsIntoEnv

func (a *Azure) LoadSecretsIntoEnv(ctx context.Context) error

func (*Azure) UploadBuffer added in v1.0.13

func (a *Azure) UploadBuffer(ctx context.Context, containerName, blobName string, fileData []byte) (string, error)

Uploads a stream to Azure storage. containerName - Azure Container Name. blobName - Azure path for the object like profile-photos/photo.jpg

type Cloud

type Cloud interface {
	LoadSecretsIntoEnv(ctx context.Context) error
	UploadBuffer(ctx context.Context, bucketName, path string, fileData []byte) (string, error)
	GetPresignedUrl(ctx context.Context, bucketName, path, contentType string, expiry time.Duration) (string, string)
	DownloadFile(ctx context.Context, bucketName, path string) (string, error)
	EnsureBucket(ctx context.Context, bucketName string) error
}

func ProvideAzure added in v1.0.8

func ProvideAzure(c *config.BootConfig) Cloud

func ProvideGCP added in v1.0.8

func ProvideGCP(ccfgg *config.BootConfig) Cloud

ProvideGCP returns a GCP cloud client.

type GCP

type GCP struct {
	Secrets secretManagerClient

	Storage storageClient
	// contains filtered or unexported fields
}

func (*GCP) DownloadFile added in v0.1.48

func (c *GCP) DownloadFile(ctx context.Context, bucketName, blobPath string) (string, error)

DownloadFile downloads a file from GCP bucket and returns the path to the temp file.

func (*GCP) EnsureBucket added in v1.0.28

func (c *GCP) EnsureBucket(ctx context.Context, bucketName string) error

func (*GCP) EnsureSecrets added in v1.0.13

func (c *GCP) EnsureSecrets(ctx context.Context) error

func (*GCP) EnsureStorage added in v1.0.13

func (c *GCP) EnsureStorage(ctx context.Context) error

func (*GCP) GetPresignedUrl

func (c *GCP) GetPresignedUrl(ctx context.Context, bucketName, path, contentType string, expiry time.Duration) (string, string)

func (*GCP) LoadSecretsIntoEnv

func (c *GCP) LoadSecretsIntoEnv(ctx context.Context) error

listSecrets lists all secrets in the given project.

func (*GCP) UploadBuffer added in v1.0.13

func (c *GCP) UploadBuffer(ctx context.Context, bucketName, path string, fileData []byte) (string, error)

Jump to

Keyboard shortcuts

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