utils

package
v0.0.0-...-7e1f343 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteURL

func ExecuteURL(blob Blob, url string) string

ExecuteURL ExecuteURL.

func ExistBucket

func ExistBucket(buckets map[string]string, target string) bool

ExistBucket ExistBucket

func GetExt

func GetExt(fileName string) string

GetExt get extension of the file

func GetMD5ByMultipart

func GetMD5ByMultipart(file *multipart.FileHeader) (string, error)

GetMD5ByMultipart get file digest value through file stream TODO: change it to sha256

func ReplaceAttr

func ReplaceAttr(blob Blob, blobTemplate, subFilePath, dst string) (*bytes.Buffer, error)

ReplaceAttr replace label properties.

func Scale

func Scale(in io.Reader, out io.Writer, width, height, quality int) error

Scale Scale

func Split

func Split(str string, sep string) (string, string)

Split Split

func URLQueryEscape

func URLQueryEscape(origin string) string

URLQueryEscape escapes the original string.

Types

type Blob

type Blob struct {
	AppID    string
	MD5      string
	FileName string
}

Blob parsing structure.

Jump to

Keyboard shortcuts

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