utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

View Source
const PasswordLength = 24

Must be a multiple of 4

View Source
const UsernameLength = 13

Must be a multiple of 4 plus 1 Must be <= 16 because mysql

Variables

This section is empty.

Functions

func BuildLogger added in v1.0.0

func BuildLogger(logLevel, component string) lager.Logger

func DBUsername added in v1.0.0

func DBUsername(requestedUsername, instanceID, appID, engine string, shared bool) string

requestedUsername should have already been tested for validity

func Decrypt added in v1.0.0

func Decrypt(src, key, iv []byte) (string, error)

func Encrypt added in v1.0.0

func Encrypt(msg string, key, iv []byte) ([]byte, error)

func IsSimpleIdentifier added in v1.0.0

func IsSimpleIdentifier(arg string) bool

func IsValidExtensionName added in v1.0.0

func IsValidExtensionName(arg string) bool

func RandIV added in v1.0.0

func RandIV() ([]byte, error)

func RandPassword added in v1.0.0

func RandPassword() (string, error)

func RandString added in v1.0.0

func RandString(length int) (string, error)

func RandUsername added in v1.0.0

func RandUsername() (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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