Documentation
¶
Index ¶
- type Azure
- func (a *Azure) DownloadFile(ctx context.Context, containerName, blobName string) (string, error)
- func (a *Azure) EnsureBlob(ctx context.Context) error
- func (a *Azure) EnsureBucket(ctx context.Context, bucketName string) error
- func (a *Azure) EnsureKV(ctx context.Context) error
- func (a *Azure) GetPresignedUrl(ctx context.Context, bucketName, path, contentType string, ...) (string, string)
- func (a *Azure) LoadSecretsIntoEnv(ctx context.Context) error
- func (a *Azure) UploadBuffer(ctx context.Context, containerName, blobName string, fileData []byte) (string, error)
- type Cloud
- type GCP
- func (c *GCP) DownloadFile(ctx context.Context, bucketName, blobPath string) (string, error)
- func (c *GCP) EnsureBucket(ctx context.Context, bucketName string) error
- func (c *GCP) EnsureSecrets(ctx context.Context) error
- func (c *GCP) EnsureStorage(ctx context.Context) error
- func (c *GCP) GetPresignedUrl(ctx context.Context, bucketName, path, contentType string, ...) (string, string)
- func (c *GCP) LoadSecretsIntoEnv(ctx context.Context) error
- func (c *GCP) UploadBuffer(ctx context.Context, bucketName, path string, fileData []byte) (string, error)
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 (*Azure) EnsureBucket ¶ added in v1.0.20
func (*Azure) GetPresignedUrl ¶
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
DownloadFile downloads a file from GCP bucket and returns the path to the temp file.
func (*GCP) EnsureBucket ¶ added in v1.0.28
func (*GCP) GetPresignedUrl ¶
func (*GCP) LoadSecretsIntoEnv ¶
listSecrets lists all secrets in the given project.
Click to show internal directories.
Click to hide internal directories.