utils

package
v0.0.0-...-8d38f2a Latest Latest
Warning

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

Go to latest
Published: May 1, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToBytes

func BoolToBytes(boolean bool) []byte

func BytesToBool

func BytesToBool(value []byte) bool

func BytesToInt64

func BytesToInt64(b []byte) int64

func DecodeBasicAuth

func DecodeBasicAuth(authorization string) (username string, password string, err error)

decode the authorization string

func EncodeBasicAuth

func EncodeBasicAuth(username string, password string) string

Encode the authorization string

func EncodeEmail

func EncodeEmail(email string) string

func EncodePassword

func EncodePassword(username string, password string) string

func GeneralKey

func GeneralKey(key string) []byte

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func IsDirExists

func IsDirExists(path string) bool

func IsEmptyValue

func IsEmptyValue(v reflect.Value) bool

func IsFileExists

func IsFileExists(filePath string) (error, bool)

func NowToBytes

func NowToBytes() []byte

func SendEmail

func SendEmail(email *Email) error

func TimeToBytes

func TimeToBytes(now time.Time) []byte

func ToString

func ToString(args ...interface{}) string

Types

type Email

type Email struct {
	Host        string
	Port        int
	User        string
	Password    string
	From        string
	To          string
	Subject     string
	ContentType string
	Body        string
}

Jump to

Keyboard shortcuts

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