utils

package
v0.0.0-...-b8fd4ec Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2014 License: MIT Imports: 15 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 EncodePassword

func EncodePassword(username string, password string) string

func GeneralKey

func GeneralKey(key string) []byte

func GeneralToken

func GeneralToken(key string) string

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func IsDirExists

func IsDirExists(path string) bool

func IsEmptyValue

func IsEmptyValue(v reflect.Value) 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