imageinfo

package
v2.16.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

package imageinfo is used to upload image info JSON files to S3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, region, bucket, distributionID string, log *slog.Logger) (*Uploader, CloseFunc, error)

New creates a new Uploader.

Types

type CloseFunc

type CloseFunc func(ctx context.Context) error

CloseFunc is a function that closes the client.

type Uploader

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

Uploader uploads image info to S3.

func (*Uploader) Close

func (a *Uploader) Close(ctx context.Context) error

Close closes the uploader. It invalidates the CDN cache for all uploaded files.

func (*Uploader) Upload

func (a *Uploader) Upload(ctx context.Context, imageInfo versionsapi.ImageInfo) (string, error)

Upload marshals the image info to JSON and uploads it to S3.

Jump to

Keyboard shortcuts

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