Initial commit

This commit is contained in:
Björn Benouarets
2025-11-20 22:47:28 +01:00
commit 08055398c4
10 changed files with 319 additions and 0 deletions

19
app/utils/res/http.go Normal file
View File

@@ -0,0 +1,19 @@
package res
type HTTPResponse struct {
Code int `json:"code"`
Body interface{} `json:"body"`
ODataContext string `json:"@odata.context"`
ODataCount int `json:"@odata.count"`
ODataNextLink string `json:"@odata.nextLink"`
}
func (res *HTTPResponse) JSON() map[string]interface{} {
return map[string]interface{}{
"code": res.Code,
"body": res.Body,
"@odata.context": res.ODataContext,
"@odata.count": res.ODataCount,
"@odata.nextLink": res.ODataNextLink,
}
}