common

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash checks if a password hash is the password

func EncodeJSONAndFlush

func EncodeJSONAndFlush(c echo.Context, response interface{}) error

EncodeJSONAndFlush encodes a struct to json and sends it

func Exists

func Exists(filepath string) bool

Exists checks whether a file/directory exists

func HashPassword

func HashPassword(password string) (string, error)

HashPassword hashes a password using bcrypt

func HomeDir

func HomeDir() string

HomeDir returns the home directory

func RandStringBytes

func RandStringBytes(n int) string

RandStringBytes generates a random string of length n

func SpaasName

func SpaasName(name string) string

SpaasName returns name with a prefix such as to more easily define spaas only containers

Types

This section is empty.

Jump to

Keyboard shortcuts

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