s3

package
v0.10.0 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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Directory = "/tmp/images"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

S3Client wraps the AWS SDK client

func New

func New(c Config, ctx context.Context) (*Client, error)

New initializes a new S3 client

func (*Client) GetURL

func (c *Client) GetURL(imageKey string) string

GetURL returns the URL of an image in S3

func (*Client) IsS3URL added in v0.3.0

func (c *Client) IsS3URL(url string) bool

IsS3URL checks if a URL is an S3 URL

func (*Client) Pull

func (c *Client) Pull(ctx context.Context, imageKey string) (string, error)

Pull fetches an image from S3 and stores it locally

func (*Client) ValidURL added in v0.3.0

func (c *Client) ValidURL(url string) error

type Config

type Config struct {
	HTTP       bool
	BucketName string
	Region     string
	Timeout    time.Duration
}

Jump to

Keyboard shortcuts

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