diff options
Diffstat (limited to 'modules/lfs/shared.go')
-rw-r--r-- | modules/lfs/shared.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/lfs/shared.go b/modules/lfs/shared.go index 70b76d7512..9abbf85fbd 100644 --- a/modules/lfs/shared.go +++ b/modules/lfs/shared.go @@ -45,7 +45,7 @@ type BatchResponse struct { // ObjectResponse is object metadata as seen by clients of the LFS server. type ObjectResponse struct { Pointer - Actions map[string]*Link `json:"actions"` + Actions map[string]*Link `json:"actions,omitempty"` Error *ObjectError `json:"error,omitempty"` } @@ -53,7 +53,7 @@ type ObjectResponse struct { type Link struct { Href string `json:"href"` Header map[string]string `json:"header,omitempty"` - ExpiresAt time.Time `json:"expires_at,omitempty"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` } // ObjectError defines the JSON structure returned to the client in case of an error @@ -67,3 +67,10 @@ type PointerBlob struct { Hash string Pointer } + +// ErrorResponse describes the error to the client. +type ErrorResponse struct { + Message string + DocumentationURL string `json:"documentation_url,omitempty"` + RequestID string `json:"request_id,omitempty"` +} |