measurementsuploader

package
v2.19.3 Latest Latest
Warning

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

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

Documentation

Overview

package measurementsuploader is used to upload measurements (v2) JSON files (and signatures) 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, rawMeasurement, signature io.ReadSeeker) (string, string, error)

Upload uploads the measurements v2 JSON file and its signature to S3.

Jump to

Keyboard shortcuts

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