New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add maintain/reset api #144
Conversation
Error will occur when get hostgroup info by id: sql: Scan error on column index 5: converting driver.Value type int64 ("1497951907") to a uint16: value out of range
|
||
//maintain | ||
hostr.POST("/host/maintain", SetMaintain) | ||
hostr.POST("/host/reset", UnsetMaintain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hostr.DELETE("/host/maintain", UnsetMaintain)
用这个url更清晰
``` | ||
{ | ||
"ids": [1,2,3,4], | ||
"maintain_begin": 1497951907, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里fmt一下缩进格式吧:)
MaintainBegin uint16 `json:"maintain_begin" gorm:"column:maintain_begin"` | ||
MaintainEnd uint16 `json:"maintain_end" gorm:"column:maintain_end"` | ||
MaintainBegin int64 `json:"maintain_begin" gorm:"column:maintain_begin"` | ||
MaintainEnd int64 `json:"maintain_end" gorm:"column:maintain_end"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么要修改为int64呢:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error will occur when get hostgroup info by id:
sql: Scan error on column index 5: converting driver.Value type int64 ("1497951907") to a uint16: value out of range
编译环境: centos 6 + golang 1.8.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
接口里的维护时间拿不出来
新加上api看起来没有什么问题 @sawater 就是文件format的问题, 你修正一下吧. |
56eeaf1
to
1a6feb6
Compare
try to add maintain/reset api