photos

package
v0.0.0-...-6797358 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Photos

type Photos struct {
	PathMaker func(ext string) string
	// contains filtered or unexported fields
}

func NewPhotos

func NewPhotos(fs dfs.Dfs) *Photos

func (*Photos) Close

func (s *Photos) Close() error

func (*Photos) Delete

func (s *Photos) Delete(keys ...string) error

func (*Photos) Resize

func (s *Photos) Resize(file io.Reader, fileName string, size []int) (*bytes.Buffer, error)

func (*Photos) Upload

func (s *Photos) Upload(file io.ReadSeeker, root, fileName string, contentType string, crop []int, sizes [][]int) (UploadPhotoResult, error)

Upload upload image & size, return [raw , resizes images]

type UploadPhotoResult

type UploadPhotoResult struct {
	Raw     string
	Cropped string
	Resized []string
}

Jump to

Keyboard shortcuts

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