Merge pull request #32 from rdelval/moreResponses
Adding Job Update Summaries response extractor so that we can write l…
This commit is contained in:
commit
211319238e
1 changed files with 7 additions and 3 deletions
|
@ -24,20 +24,24 @@ import (
|
|||
|
||||
// Get key from a response created by a StartJobUpdate call
|
||||
func JobUpdateKey(resp *aurora.Response) *aurora.JobUpdateKey {
|
||||
return resp.Result_.StartJobUpdateResult_.GetKey()
|
||||
return resp.GetResult_().GetStartJobUpdateResult_().GetKey()
|
||||
}
|
||||
|
||||
func JobUpdateDetails(resp *aurora.Response) []*aurora.JobUpdateDetails {
|
||||
return resp.Result_.GetJobUpdateDetailsResult_.DetailsList
|
||||
return resp.GetResult_().GetGetJobUpdateDetailsResult_().GetDetailsList()
|
||||
}
|
||||
|
||||
func ScheduleStatusResult(resp *aurora.Response) *aurora.ScheduleStatusResult_ {
|
||||
return resp.GetResult_().GetScheduleStatusResult_()
|
||||
}
|
||||
|
||||
func JobUpdateSummaries(resp *aurora.Response) []*aurora.JobUpdateSummary {
|
||||
return resp.GetResult_().GetGetJobUpdateSummariesResult_().GetUpdateSummaries()
|
||||
}
|
||||
|
||||
func ResponseCodeCheck(resp *aurora.Response) (*aurora.Response, error) {
|
||||
if resp == nil {
|
||||
return resp, errors.New("Got nil Response")
|
||||
return resp, errors.New("Response is nil")
|
||||
}
|
||||
if resp.GetResponseCode() != aurora.ResponseCode_OK {
|
||||
return resp, errors.New(CombineMessage(resp))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue