зеркало из https://github.com/mozilla/mig.git
[minor/bug] add missing json tags to LoaderEntry
This commit is contained in:
Родитель
45c5b8fc10
Коммит
b3802e9f98
36
doc/api.rst
36
doc/api.rst
|
@ -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"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
12
loader.go
12
loader.go
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче