utils

package
v0.0.0-...-05462b1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Headers for requests
	Headers = map[string]string{
		"Content-Type": "application/x-www-form-urlencoded",
		"PddToken":     pdd.Token,
	}

	// RequestOptions include headers and body params
	RequestOptions = &grequests.RequestOptions{
		Headers: Headers,
		Params:  map[string]string{},
	}
)

Functions

func ErrorCheck

func ErrorCheck(status, message string, err error) error

ErrorCheck helper for rendered results. Checks status in response and error.

func GeneratePassword

func GeneratePassword(n int) string

GeneratePassword for email account. Accept int - length password. Return password string.

func IsAccount

func IsAccount(flag string) bool

IsAccount check input flag. Return true if flag is account. Return false if flag is a domain name.

func RandomInt

func RandomInt(n int) string

RandomInt generate and return random string from ints. Accept int - length password.

func ReadStdIn

func ReadStdIn(stringToPrint string) string

ReadStdIn helper for read string.

func SplitAccount

func SplitAccount(account string) error

SplitAccount on login and and domain name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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