Skip to main content

s3client

import "github.com/Ask-Atlas/AskAtlas/api/internal/s3"

Index

type Client

Client wraps the AWS S3 SDK client for file operations.

type Client struct {
// contains filtered or unexported fields
}

func New

func New(ctx context.Context, bucket string) (*Client, error)

New creates a Client by loading AWS credentials from the environment.

func (*Client) DeleteObject

func (c *Client) DeleteObject(ctx context.Context, key string) error

DeleteObject removes the object at the given S3 key.

func (*Client) GeneratePresignedPutURL

func (c *Client) GeneratePresignedPutURL(ctx context.Context, key, contentType string, contentLength int64) (string, error)

GeneratePresignedPutURL creates a presigned S3 PUT URL for uploading a file.

Generated by gomarkdoc