image

package
v0.0.0-...-46d964f Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package image is an image uploader

Package image is an image uploader

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

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

Downloader is an image downloader that is content aware

func NewDownloader

func NewDownloader() *Downloader

NewDownloader creates a new image downloader

func (*Downloader) DownloadImage

func (d *Downloader) DownloadImage(i *providerapi.Image) (*[]byte, error)

DownloadImage downloads an image in memory, converting it to png also reads the resolution and sets it on the image struct

type Uploader

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

Uploader is an image uploader to S3

func NewUploader

func NewUploader(m *minio.Client, bucketName string) *Uploader

NewUploader creates a new image uploader

func (*Uploader) UploadImage

func (u *Uploader) UploadImage(mediaID, imageID string, image *[]byte, i *providerapi.Image) error

UploadImage uploads an image to s3

Jump to

Keyboard shortcuts

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