Documentation ¶
Index ¶
- Variables
- 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
- 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
- type MQTTPrx
- type MongoPrx
- type TokenPrx
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = logrus.New()
Log :
Functions ¶
func PKCS7Padding ¶
PKCS7Padding : 补码,AES加密数据块分组长度必须为128bit(byte[16]),密钥长度可以是128bit(byte[16])、192bit(byte[24])、256bit(byte[32])中的任意一个。
Types ¶
type AMQPPrx ¶
type AMQPPrx struct {
// contains filtered or unexported fields
}
AMQPPrx :
func SetupQMAPPrx ¶
SetupQMAPPrx 创建Rabbitmq链接和通道,并返回操作代理
func (*AMQPPrx) PublishEx ¶
func (prx *AMQPPrx) PublishEx(excName, key string, mandatory, immediate bool, mimeType string, body []byte) error
PublishEx :
func (*AMQPPrx) SetupConsume ¶
SetupConsume :
type MQTTPrx ¶
type MQTTPrx struct { MQTT.Client URI string User string Passwd string ClientID string MsgChn chan MQTT.Message }
MQTTPrx :
type TokenPrx ¶
type TokenPrx struct {
*redis.Client
}
TokenPrx :
func SetupTokenPrx ¶
SetupTokenPrx :
func (*TokenPrx) CheckToken ¶
CheckToken : 获取Token
func (*TokenPrx) GetTokenData ¶
GetTokenData : 获取Token
Click to show internal directories.
Click to hide internal directories.