lib

module
v0.0.0-...-1272ae6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: GPL-3.0

README

golang lib

自用的 golang lib

获取
go get -u -v github.com/gkzy/lib

包括了
1. mem cache
2. config
3. logy 使用logrus
4. oauth 包括:wechat qq apple
5. pay 包括:wechat alipay apple iap
6. sms 
7. oss
8. gopdf sdk
9. conn 包括:mysql redis nsq rpc ..

Directories

Path Synopsis
使用方法: 查看cache_test.go
使用方法: 查看cache_test.go
conn
nsq
//init pu,err:=NewProducer("192.168.0.197",4150) if err!=nil{ //error } b,_:=json.Marshal(obj) //发送 err = pu.Publish("topic",b) if err!=nil{ //error }
//init pu,err:=NewProducer("192.168.0.197",4150) if err!=nil{ //error } b,_:=json.Marshal(obj) //发送 err = pu.Publish("topic",b) if err!=nil{ //error }
redis
使用方法: 1.
使用方法: 1.
rpc
使用方法: client,err:=NewClient("182.168.0.197",10000) ...
使用方法: client,err:=NewClient("182.168.0.197",10000) ...
oauth
qq
wechat
微信第三方登录相关 公众号支付相关 全局token相关 client:=NewClient(appId,secret) client.SetApiKey("支付的apiKey") ....
微信第三方登录相关 公众号支付相关 全局token相关 client:=NewClient(appId,secret) client.SetApiKey("支付的apiKey") ....
pay
wepay
基础通讯业务实现 sam
基础通讯业务实现 sam
AES CBC PKCS5Padding加/解密 使用 hex.Encode 查看测试文件: aes_cbc_test.go
AES CBC PKCS5Padding加/解密 使用 hex.Encode 查看测试文件: aes_cbc_test.go
http
http client 使用github.com/imroc/req库 返回string,如果需要到struct,需要自己反序列化
http client 使用github.com/imroc/req库 返回string,如果需要到struct,需要自己反序列化
str

Jump to

Keyboard shortcuts

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