cloud

package
v0.1.46 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct{}

func (*AWS) GetPresignedUrl

func (c *AWS) GetPresignedUrl(bucketName, path, contentType string, expiry time.Duration) (string, string)

Returns pre-signed upload Url and download URL.

func (*AWS) LoadSecretsIntoEnv

func (c *AWS) LoadSecretsIntoEnv()

func (*AWS) UploadStream

func (c *AWS) UploadStream(bucketName, path string, imageData bytes.Buffer) (chan string, chan error)

type Azure

type Azure struct{}

func (*Azure) GetPresignedUrl

func (c *Azure) GetPresignedUrl(bucketName, path, contentType string, expiry time.Duration) (string, string)

func (*Azure) LoadSecretsIntoEnv

func (c *Azure) LoadSecretsIntoEnv()

func (*Azure) UploadStream

func (c *Azure) UploadStream(containerName, path string, imageData bytes.Buffer) (chan string, chan error)

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

type Cloud

type Cloud interface {
	LoadSecretsIntoEnv()
	UploadStream(bucketName, path string, imageData bytes.Buffer) (chan string, chan error)
	GetPresignedUrl(bucketName, path, contentType string, expiry time.Duration) (string, string)
}

type GCP

type GCP struct{}

func (*GCP) GetPresignedUrl

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

func (*GCP) LoadSecretsIntoEnv

func (c *GCP) LoadSecretsIntoEnv()

listSecrets lists all secrets in the given project.

func (*GCP) UploadStream

func (c *GCP) UploadStream(bucketName, path string, imageData bytes.Buffer) (chan string, chan error)

Jump to

Keyboard shortcuts

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