common

package
v0.0.0-...-b5a72d0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentDir

func CurrentDir() string

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue. https://elithrar.github.io/article/generating-secure-random-numbers-crypto-rand/

func GenerateRandomString

func GenerateRandomString(s int) (string, error)

GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue. https://elithrar.github.io/article/generating-secure-random-numbers-crypto-rand/

Types

type AuthEntry

type AuthEntry struct {
	Username string `json:"username" mapstructure:"username"`
	Password string `json:"password" mapstructure:"password"`
}

type TestEmail

type TestEmail struct {
	RecipientEmail string `json:"recipient_email" mapstructure:"recipient_email"`
	TestString     string `json:"test_string" mapstructure:"test_string"`
}

Jump to

Keyboard shortcuts

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