utils

package
v1.0.4-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentEnvironment string
View Source
var ImageSizes map[string][2]int
View Source
var SuportedMimeTypes map[string][]string

Functions

func Contains

func Contains(stringSlice []string, stringToSearch string) bool

func ContainsKey

func ContainsKey(thisMap interface{}, key string) bool

func CropImage

func CropImage(img io.Reader, imgMimeType string, target string, anchorCoord [2]int) (image.Image, error)

func DetectMimeType

func DetectMimeType(file io.Reader) (string, error)

func EncodePassword

func EncodePassword(rawPassword string, salt string) (encodedPassword string)

EncodePassword ...

func GetRandomString

func GetRandomString(amount int) (randomString string)

GetRandomString ...

func MergeMaps

func MergeMaps(map1 map[string]string, map2 map[string]string) map[string]string

func PBKDF2

func PBKDF2(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte

PBKDF2 http://code.google.com/p/go/source/browse/pbkdf2/pbkdf2.go?repo=crypto

func SessionInit

func SessionInit(env string)

SessionInit ...

func UploadImage

func UploadImage(target string, img image.Image) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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