Versions in this module Expand all Collapse all v1 v1.0.0 Aug 4, 2020 Changes in this version + var Log = logrus.New() + func AesDecrypt(cryted string, key string) string + func AesEncrypt(orig string, key string) string + func GetRandomString(length int) string + func InitLog(stdout bool, path string, prefix string, level string) + func PKCS7Padding(ciphertext []byte, blocksize int) []byte + func PKCS7UnPadding(origData []byte) []byte + type AMQPPrx struct + func SetupQMAPPrx(uri, tag string) *AMQPPrx + func (prx *AMQPPrx) Publish(excName, key string, body []byte) error + func (prx *AMQPPrx) PublishEx(excName, key string, mandatory, immediate bool, mimeType string, body []byte) error + func (prx *AMQPPrx) SetupConsume(queueName, routeKey, excName string) (<-chan amqp.Delivery, error) + func (prx *AMQPPrx) SetupConsumeEx(queueName, routeKey, excName string, ...) (<-chan amqp.Delivery, error) + func (prx *AMQPPrx) SetupPublish(excName, excType string, durable, autoDelete, noWait bool) error + type ConfigPrx struct + func SetupConfigPrx(fname string, ftype string) *ConfigPrx + func (conf *ConfigPrx) GetSection(name string) map[string]interface{} + type MQTTPrx struct + ClientID string + MsgChn chan MQTT.Message + Passwd string + URI string + User string + func SetupMQTTPrx(uri, user, passwd, cliid string) *MQTTPrx + func (prx *MQTTPrx) Pub(topic string, qos byte, payload interface{}) error + func (prx *MQTTPrx) Sub(topic string, qos byte) error + type MongoPrx struct + DB *mongo.Database + func SetupMongoPrx(connstr string, dbname string) *MongoPrx + type TokenPrx struct + func SetupTokenPrx(redisAddr string, redisPasswd string, db int) *TokenPrx + func (prx *TokenPrx) CheckToken(token string) bool + func (prx *TokenPrx) DelToken(token string) + func (prx *TokenPrx) GenToken(data string, seconds int) string + func (prx *TokenPrx) GetTokenData(token string) string