common

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
	Alpha    = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
	Number   = "0123456789"
)
View Source
const (
	JsonEngine = CopyEngine("json")
	GobEngine  = CopyEngine("gob")
)
View Source
const (
	ScriptLangTs         = ScriptLang("ts")
	ScriptLangCoffee     = ScriptLang("coffeescript")
	ScriptLangJavascript = ScriptLang("javascript")
)
View Source
const (
	FlowElementsPrototypeDefault        = FlowElementsPrototypeType("default")
	FlowElementsPrototypeMessageHandler = FlowElementsPrototypeType("MessageHandler")
	FlowElementsPrototypeMessageEmitter = FlowElementsPrototypeType("MessageEmitter")
	FlowElementsPrototypeTask           = FlowElementsPrototypeType("Task")
	FlowElementsPrototypeGateway        = FlowElementsPrototypeType("Gateway")
	FlowElementsPrototypeFlow           = FlowElementsPrototypeType("Flow")
)
View Source
const (
	Enabled  = StatusType("enabled")
	Disabled = StatusType("disabled")
	Frozen   = StatusType("frozen")
)
View Source
const (
	PrototypeTypeText   = PrototypeType("text")
	PrototypeTypeImage  = PrototypeType("image")
	PrototypeTypeDevice = PrototypeType("device")
)
View Source
const (
	LogLevelEmergency = LogLevel("Emergency")
	LogLevelAlert     = LogLevel("Alert")
	LogLevelCritical  = LogLevel("Critical")
	LogLevelError     = LogLevel("Error")
	LogLevelWarning   = LogLevel("Warning")
	LogLevelNotice    = LogLevel("Notice")
	LogLevelInfo      = LogLevel("Info")
	LogLevelDebug     = LogLevel("Debug")
)

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func ComputeHmac256

func ComputeHmac256() string

func Copy

func Copy(to, from interface{}, params ...CopyEngine) (err error)

func CopyFile

func CopyFile(f, t string)

func FileExist

func FileExist(path string) (exist bool)

func GetFileSize

func GetFileSize(name string) (int64, error)

func GetFullPath

func GetFullPath(name string) string

func GetLinkPath

func GetLinkPath(name string) string

func HashPassword

func HashPassword(password string) (string, error)

func ParseHmacToken

func ParseHmacToken(tokenString string, key []byte) (jwt.MapClaims, error)

func RandInt

func RandInt(min int, max int) int

func RandStr

func RandStr(strSize int, dictionary string) string

func RandomString

func RandomString(l int) string

func StoragePath

func StoragePath() string

func Strtomd5

func Strtomd5(s string) string

create md5 string

Types

type CopyEngine

type CopyEngine string

type DeviceType

type DeviceType string

type FlowElementsPrototypeType

type FlowElementsPrototypeType string

type LogLevel

type LogLevel string

type PrototypeType

type PrototypeType string

type ScriptLang

type ScriptLang string

type StatusType

type StatusType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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