shorts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogInfo = true

LogInfo log only error or everything

Functions

func Check

func Check(err error)

Check Print error if exists

func ConnectPostgreSQL

func ConnectPostgreSQL(host, port, ssl, database, username, password string) *sql.DB

ConnectPostgreSQL Connection to postgresql database

func Decrypt

func Decrypt(text string, key []byte) string

Decrypt text with key

func Encrypt

func Encrypt(text string, key []byte) string

Encrypt text with key

func FormatTimeDay

func FormatTimeDay(time time.Time) string

FormatTimeDay Format time.Time to dd-MM-yyyy

func FormatTimeDayHour

func FormatTimeDayHour(time time.Time) string

FormatTimeDayHour Format time.Time to dd-MM-yyyy hh:mm

func FormatTimeDayName

func FormatTimeDayName(time time.Time) string

FormatTimeDayName Get the name of the day

func FormatTimeDaySecond

func FormatTimeDaySecond(time time.Time) string

FormatTimeDaySecond Format time.Time to dd-MM-yyyy hh:mm:ss

func FormatTimeMonthName

func FormatTimeMonthName(time time.Time) string

FormatTimeMonthName Get the name of the day

func FormatTimeYear

func FormatTimeYear(time time.Time) string

FormatTimeYear Format time.Time to yyyy

func GenerateKey

func GenerateKey(key string) []byte

GenerateKey generate AES key

func Hash

func Hash(input string) string

Hash return SHA-3 512 hash string

func UUID

func UUID() string

UUID generate random uuid and return it as a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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