摘要: var Client *elastic.Client var host = "http://XXX.XX.XX.XXX:9200" type ES struct { Index string Type string } // 初始化 func init() { errorLog := log.New 阅读全文
posted @ 2020-06-04 15:40 小酥肉是我 阅读(1216) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-05-22 11:19 小酥肉是我 阅读(0) 评论(0) 推荐(0) 编辑
摘要: package model import ( "github.com/go-redis/redis" "log" "time" ) var RedisClient *redis.Client func InitRedis() { RedisClient = redis.NewClient(&redi 阅读全文
posted @ 2020-04-28 11:44 小酥肉是我 阅读(306) 评论(0) 推荐(0) 编辑
摘要: package ipo import ( "database/sql" "fmt" "ipoCompany/tool" ) type IpoBalance struct { ID int `gorm:"column:id;primary_key;auto_increment;not null"` S 阅读全文
posted @ 2020-04-24 16:51 小酥肉是我 阅读(7206) 评论(0) 推荐(0) 编辑
摘要: package handler import ( "github.com/360EntSecGroup-Skylar/excelize" "github.com/gin-gonic/gin" ) func DownloadExcel(c *gin.Context){ xlsx := excelize 阅读全文
posted @ 2019-12-23 19:25 小酥肉是我 阅读(3290) 评论(0) 推荐(0) 编辑
摘要: package handler import ( "fmt" "git.shannonai.com/public_info_prophet/prophet_risk_aggregation/model" "github.com/360EntSecGroup-Skylar/excelize" "git 阅读全文
posted @ 2019-12-13 14:47 小酥肉是我 阅读(4848) 评论(0) 推荐(0) 编辑
摘要: 要上传图片到aws s3首先需要 知道 aws 的地区 也就是region ,还需要知道储存桶的名字,其次就是Access key ID和Secret access key package handler import ( "bytes" "io/ioutil" "log" "net/http" " 阅读全文
posted @ 2019-09-04 10:06 小酥肉是我 阅读(1161) 评论(0) 推荐(2) 编辑
摘要: router := gin.Default() 第一个参数是api 第二个静态问价的文件夹相对目录 router.StaticFS("/data", http.Dir("./data")) 第一个参数是api 第二个参数是具体的文件名字router.StaticFile("/favicon.ico", "./resources/favicon.ico")这里以第一个为例这是我的项目目录结构 ... 阅读全文
posted @ 2019-09-02 14:26 小酥肉是我 阅读(7679) 评论(0) 推荐(1) 编辑
摘要: 在main.go 里面调用方法即可 阅读全文
posted @ 2019-08-20 17:16 小酥肉是我 阅读(1479) 评论(0) 推荐(0) 编辑
摘要: 没有添加子应用在settings里面! 阅读全文
posted @ 2019-07-16 20:48 小酥肉是我 阅读(583) 评论(0) 推荐(0) 编辑