s3

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeJPEG = "image/jpeg"
	ContentTypePNG  = "image/png"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	S3 *s3.Client
}

func Connect

func Connect() (*Client, error)

Connect initializes a new S3 client

func (*Client) GeneratePresignedURL

func (c *Client) GeneratePresignedURL(bucketName, key string, contentType string, expiry time.Duration) (string, error)

GeneratePresignedURL creates a pre-signed URL for uploading an image to S3 The contentType parameter should be either image/jpeg or image/png

Jump to

Keyboard shortcuts

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