M api/api.go => api/api.go +2 -6
@@ 13,13 13,9 @@ import (
"git.xenrox.net/~xenrox/srhtctl/helpers"
)
-type shortUserStruct struct {
- CName string `json:"canonical_name"`
- Name string `json:"name"`
-}
-
type userStruct struct {
- shortUserStruct
+ CName string `json:"canonical_name"`
+ Name string `json:"name"`
Email string `json:"email"`
URL *string `json:"url"`
Location *string `json:"location"`
M api/builds.go => api/builds.go +8 -8
@@ 27,14 27,14 @@ type taskStruct struct {
}
type buildStruct struct {
- ID int `json:"id"`
- Status string `json:"status"`
- SetupLog string `json:"setup_log"`
- Tasks []taskStruct `json:"tasks"`
- Note string `json:"note"`
- Tags *string `json:"tags"`
- Runner *string `json:"runner"`
- Owner shortUserStruct `json:"owner"`
+ ID int `json:"id"`
+ Status string `json:"status"`
+ SetupLog string `json:"setup_log"`
+ Tasks []taskStruct `json:"tasks"`
+ Note string `json:"note"`
+ Tags *string `json:"tags"`
+ Runner *string `json:"runner"`
+ Owner userStruct `json:"owner"`
}
// BuildNote is a description of a build
M api/meta.go => api/meta.go +13 -13
@@ 26,22 26,22 @@ type metaAuditPagination struct {
}
type sshKeyStruct struct {
- ID int `json:"id"`
- Authorized time.Time `json:"authorized"`
- Comment string `json:"comment"`
- Fingerprint string `json:"fingerprint"`
- Key string `json:"key"`
- Owner shortUserStruct `json:"owner"`
- LastUsed time.Time `json:"last_used"`
+ ID int `json:"id"`
+ Authorized time.Time `json:"authorized"`
+ Comment string `json:"comment"`
+ Fingerprint string `json:"fingerprint"`
+ Key string `json:"key"`
+ Owner userStruct `json:"owner"`
+ LastUsed time.Time `json:"last_used"`
}
type pgpKeyStruct struct {
- ID int `json:"id"`
- Key string `json:"key"`
- KeyID string `json:"key_id"`
- Email string `json:"email"`
- Authorized time.Time `json:"authorized"`
- Owner shortUserStruct `json:"owner"`
+ ID int `json:"id"`
+ Key string `json:"key"`
+ KeyID string `json:"key_id"`
+ Email string `json:"email"`
+ Authorized time.Time `json:"authorized"`
+ Owner userStruct `json:"owner"`
}
// MetaEdit If true, then edit own profile information
M api/paste.go => api/paste.go +4 -4
@@ 16,10 16,10 @@ import (
)
type pasteStruct struct {
- Created string `json:"created"`
- Visibility string `json:"visibilty"`
- SHA string `json:"sha"`
- User shortUserStruct `json:"user"`
+ Created string `json:"created"`
+ Visibility string `json:"visibilty"`
+ SHA string `json:"sha"`
+ User userStruct `json:"user"`
Files []struct {
Filename string `json:"filename"`
BlobID string `json:"blob_id"`