[minor/bug] add missing json tags to LoaderEntry

This commit is contained in:
Aaron Meihm 2016-05-26 10:46:26 -05:00
Родитель 45c5b8fc10
Коммит b3802e9f98
2 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -883,12 +883,12 @@ GET /api/v1/loader
{
"name": "loader",
"value": {
"AgentName": "corbomite.internal",
"Enabled": true,
"ID": 12,
"Key": "",
"LastSeen": "2016-05-17T14:10:03.041024-05:00",
"Name": "corbomite.internal"
"agentname": "corbomite.internal",
"enabled": true,
"id": 12,
"key": "",
"lastseen": "2016-05-17T14:10:03.041024-05:00",
"name": "corbomite.internal"
}
}
],
@ -1018,12 +1018,12 @@ GET /api/v1/manifest/loaders/
{
"name": "loader",
"value": {
"AgentName": "kirk.host",
"Enabled": true,
"ID": 6,
"Key": "",
"LastSeen": "2016-05-17T14:17:30.987222-05:00",
"Name": "kirk"
"agentname": "kirk.host",
"enabled": true,
"id": 6,
"key": "",
"lastseen": "2016-05-17T14:17:30.987222-05:00",
"name": "kirk"
}
}
],
@ -1034,12 +1034,12 @@ GET /api/v1/manifest/loaders/
{
"name": "loader",
"value": {
"AgentName": "khan.host",
"Enabled": true,
"ID": 8,
"Key": "",
"LastSeen": "2016-05-14T19:50:35.258066-05:00",
"Name": "khan"
"agentname": "khan.host",
"enabled": true,
"id": 8,
"key": "",
"lastseen": "2016-05-14T19:50:35.258066-05:00",
"name": "khan"
}
}
],

Просмотреть файл

@ -14,12 +14,12 @@ import (
// Describes a loader entry stored in the database
type LoaderEntry struct {
ID float64 // Loader ID
Name string // Loader name
Key string // Loader key (only populated during creation)
AgentName string // Loader environment, agent name
LastSeen time.Time // Last time loader was used
Enabled bool // Loader entry is active
ID float64 `json:"id"` // Loader ID
Name string `json:"name"` // Loader name
Key string `json:"key"` // Loader key (only populated during creation)
AgentName string `json:"agentname"` // Loader environment, agent name
LastSeen time.Time `json:"lastseen"` // Last time loader was used
Enabled bool `json:"enabled"` // Loader entry is active
}
func (le *LoaderEntry) Validate() error {