From 210cc365612b9a612ae5b5d8cf364f5787ecca3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Sun, 16 Jun 2024 22:58:53 +0200 Subject: [PATCH] Add types --- types.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 types.go diff --git a/types.go b/types.go new file mode 100644 index 0000000..884eab2 --- /dev/null +++ b/types.go @@ -0,0 +1,25 @@ +package main + +type APIResponse struct { + Page int `json:"page"` + PerPage int `json:"perPage"` + TotalItems int `json:"totalItems"` + TotalPages int `json:"totalPages"` + Items []APIItem `json:"items"` +} + +type APIItem struct { + CollectionId string `json:"collectionId"` + CollectionName string `json:"collectionName"` + Created string `json:"created"` + Downloaded bool `json:"downloaded"` + Id string `json:"id"` + Link string `json:"link"` + Updated string `json:"updated"` +} + +type PBEvent struct { + ClientId string `json:"clientId"` + Action string `json:"action"` + Record APIItem `json:"record"` +}