service

package
v0.0.0-...-67d91c4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketFiles

func BucketFiles(bucketName string) []string

func BucketList

func BucketList() ([]string, error)

func GetFile

func GetFile(w http.ResponseWriter, bucket, obj, compact, width, height string)

GetFile 请求文件的参数介绍 use : ?compact=5&width=500&height=500 compact 压缩等级; 优先级最高 width,height 指定图片宽高,必须都指定; 优先级第2高

func ImgCompress

func ImgCompress(img image.Image, width, height int, outType string) []byte

图片压缩,尺寸调整

Nearest-neighbor interpolation

NearestNeighbor InterpolationFunction = iota

Bilinear interpolation

Bilinear

Bicubic interpolation (with cubic hermite spline)

Bicubic

Mitchell-Netravali interpolation

MitchellNetravali

Lanczos interpolation (a=2)

Lanczos2

Lanczos interpolation (a=3)

Lanczos3

func MakeBucket

func MakeBucket(bucketName string) error

func UploadFile

func UploadFile(bucket string, file multipart.File, fileStat *multipart.FileHeader) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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