aboutsummaryrefslogtreecommitdiff
path: root/backend/studip/responses.go
diff options
context:
space:
mode:
authorMichael Tews <michael@tews.dev>2026-03-31 03:58:18 +0200
committerMichael Tews <michael@tews.dev>2026-03-31 04:00:09 +0200
commit459bac344ef41fa4e4e122ce21a78d8077ec59fc (patch)
tree7e62043326ff06276390b810532a1e7bd7e2b95b /backend/studip/responses.go
parent74b0f535de0b021951744425f32e0182e40e6a9d (diff)
feat: server-side movetest/integration-test-suite
Diffstat (limited to 'backend/studip/responses.go')
-rw-r--r--backend/studip/responses.go47
1 files changed, 41 insertions, 6 deletions
diff --git a/backend/studip/responses.go b/backend/studip/responses.go
index d328ec9..93fef28 100644
--- a/backend/studip/responses.go
+++ b/backend/studip/responses.go
@@ -30,12 +30,7 @@ type StudIPFoldersData struct {
IsSubfolderAllowed bool `json:"is-subfolder-allowed"`
} `json:"attributes"`
Relationships struct {
- Parent struct {
- Data struct {
- Type string `json:"type"`
- ID string `json:"id"`
- } `json:"data"`
- } `json:"parent"`
+ Parent StudIPRelationship `json:"parent"`
} `json:"relationships"`
}
@@ -70,6 +65,46 @@ type StudIPFiles struct {
} `json:"data"`
}
+type StudIPResourceIdentifier struct {
+ Type string `json:"type"`
+ ID string `json:"id"`
+}
+
+type StudIPRelationship struct {
+ Data StudIPResourceIdentifier `json:"data"`
+}
+
+type StudIPNullableRelationship struct {
+ Data *StudIPResourceIdentifier `json:"data"`
+}
+
+type StudIPFileRefData struct {
+ Type string `json:"type"`
+ ID string `json:"id"`
+ Attributes struct {
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Mkdate time.Time `json:"mkdate"`
+ Chdate time.Time `json:"chdate"`
+ Downloads int `json:"downloads"`
+ Filesize int64 `json:"filesize"`
+ MimeType string `json:"mime-type"`
+ IsReadable bool `json:"is-readable"`
+ IsDownloadable bool `json:"is-downloadable"`
+ IsEditable bool `json:"is-editable"`
+ IsWritable bool `json:"is-writable"`
+ } `json:"attributes"`
+ Relationships struct {
+ File StudIPRelationship `json:"file"`
+ Parent StudIPRelationship `json:"parent"`
+ TermsOfUse StudIPNullableRelationship `json:"terms-of-use"`
+ } `json:"relationships"`
+}
+
+type StudIPFileRef struct {
+ Data StudIPFileRefData `json:"data"`
+}
+
type StudIPCourses struct {
Data struct {
Type string `json:"type"`