processor

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JPEG = "image/jpeg"
	HEIC = "image/heic"
)

Variables

This section is empty.

Functions

func GetImage

func GetImage(r io.Reader) (*[]byte, error)

GetImage retrieves the byte contents of a specified reader

func GetImageReader

func GetImageReader(ctx context.Context, service S3Service, bucket string, key string) (io.Reader, error)

func GetImgTimeStamp

func GetImgTimeStamp(image *[]byte) (*time.Time, error)

GetImgTimeStamp tries to get the EXIF timestamp for the image the supplied reader refers to. it will return an error and nil Time if the object cannot be retrieved. If there are problems obtaining a meaningful timestamp from the file, it will return the current time.

Types

type S3Service

type S3Service interface {
	GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
	CopyObject(ctx context.Context, params *s3.CopyObjectInput, optFns ...func(*s3.Options)) (*s3.CopyObjectOutput, error)
	DeleteObject(ctx context.Context, params *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
}

S3Service updated for v2 signatures

Jump to

Keyboard shortcuts

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