Add JSON identifies to JobManager structs for api package 79/161679/1
authorAlexander Mazuruk <a.mazuruk@samsung.com>
Fri, 24 Nov 2017 15:35:29 +0000 (16:35 +0100)
committerAlexander Mazuruk <a.mazuruk@samsung.com>
Fri, 24 Nov 2017 15:36:46 +0000 (16:36 +0100)
Change-Id: Iedc8a8f9b75062a9ce0d4c1bbbf388a8b6a09fa9

jobmanager.go

index 472c679..17fdd56 100644 (file)
@@ -50,18 +50,18 @@ const (
 // JobInfo contains Job information available for public API.
 type JobInfo struct {
        // JobID is a unique Job identifier.
-       JobID JobID
+       JobID JobID                     `json:"jobid"`
        // Name is the Job name acquired from yaml file during Job creation.
-       Name string
+       Name string                     `json:"name"`
        // Created is the Job creation time in UTC.
-       Created time.Time
+       Created time.Time       `json:"created"`
        // Updated is the time of latest Job status modification.
-       Updated time.Time
+       Updated time.Time       `json:"updated"`
        // Status specifies current state of the Job.
-       Status JobStatus
+       Status JobStatus        `json:"status"`
        // Info provides additional information about current state,
        // e.g. cause of failure.
-       Info string
+       Info string                     `json:"info"`
 }
 
 // JobManager interface defines API for actions that can be called on Weles Jobs