예제 #1
0
파일: main.go 프로젝트: jonbalbarin/tracker
func estimateStory(storyID string, estimate int, config config.Config) {
	req, reqErr := storyupdate.Req(storyID, storyupdate.None, config.UserID, estimate)
	if reqErr != nil {
		panic("cant make request for estimating story")
	}
	req.Header.Add("X-TrackerToken", config.Token)
	sendUpdateRequest(req, http.StatusOK, fmt.Sprintf("story estimated at %v points", estimate))
}
예제 #2
0
파일: main.go 프로젝트: jonbalbarin/tracker
func startStory(storyID string, config config.Config) {
	req, reqErr := storyupdate.Req(storyID, storyupdate.Started, config.UserID, 0)
	if reqErr != nil {
		panic("cant make request for starting story")
	}
	req.Header.Add("X-TrackerToken", config.Token)
	sendUpdateRequest(req, http.StatusOK, "story started")
}
예제 #3
0
파일: main.go 프로젝트: jonbalbarin/tracker
func deliverStory(storyID string, config config.Config) {
	req, reqErr := storyupdate.Req(storyID, storyupdate.Delivered, 0, 0)
	if reqErr != nil {
		panic("cant make request for delivering story")
	}
	req.Header.Add("X-TrackerToken", config.Token)
	sendUpdateRequest(req, http.StatusOK, "story delivered")
}