s3

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAWSRegion = "eu-west-1" // Default AWS region.
)

Variables

View Source
var (
	ErrReportsBucketNotDefined = errors.New("reports bucket must be defined")
	ErrLogsBucketNotDefined    = errors.New("logs bucket must be defined")
	ErrLinkBaseNotDefined      = errors.New("link base must be defined or S3 link enabled")
	ErrUnsupportedKind         = errors.New("unsupported kind")
)

Functions

This section is empty.

Types

type Writer

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

Writer defines an AWS S3 writer.

func NewWriter

func NewWriter(cfg config.S3Writer, l log.Logger) (*Writer, error)

NewWriter creates a new S3 writer.

func (*Writer) UploadCheckData

func (w *Writer) UploadCheckData(checkID, kind string, startedAt time.Time, content []byte) (string, error)

Upload uploads the provided byte array data as a file to an S3 bucket.

Jump to

Keyboard shortcuts

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