From 41817dc0a3daf4e4967e2fd6365a4be8c63d32bb Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Sat, 15 Jan 2022 13:49:28 -0800 Subject: [PATCH] more code layout changes --- net/server/internal/model_asset.go | 19 ---------- net/server/internal/model_authenticate.go | 17 --------- net/server/internal/model_card.go | 23 ------------- net/server/internal/model_card_data.go | 23 ------------- net/server/internal/model_card_profile.go | 27 --------------- net/server/internal/model_card_view.go | 21 ------------ net/server/internal/models.go | 42 +++++++++++++++++++++++ 7 files changed, 42 insertions(+), 130 deletions(-) delete mode 100644 net/server/internal/model_asset.go delete mode 100644 net/server/internal/model_authenticate.go delete mode 100644 net/server/internal/model_card.go delete mode 100644 net/server/internal/model_card_data.go delete mode 100644 net/server/internal/model_card_profile.go delete mode 100644 net/server/internal/model_card_view.go diff --git a/net/server/internal/model_asset.go b/net/server/internal/model_asset.go deleted file mode 100644 index 360644fe..00000000 --- a/net/server/internal/model_asset.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * DataBag - * - * DataBag provides storage for decentralized identity based self-hosting apps. It is intended to support sharing of personal data and hosting group conversations. - * - * API version: 0.0.1 - * Contact: roland.osborne@gmail.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package databag - -type Asset struct { - - AssetId string `json:"assetId"` - - Transform string `json:"transform,omitempty"` - - Status string `json:"status,omitempty"` -} diff --git a/net/server/internal/model_authenticate.go b/net/server/internal/model_authenticate.go deleted file mode 100644 index e8e8dbe0..00000000 --- a/net/server/internal/model_authenticate.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * DataBag - * - * DataBag provides storage for decentralized identity based self-hosting apps. It is intended to support sharing of personal data and hosting group conversations. - * - * API version: 0.0.1 - * Contact: roland.osborne@gmail.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package databag - -type Authenticate struct { - - Token string `json:"token"` - - Timestamp int32 `json:"timestamp"` -} diff --git a/net/server/internal/model_card.go b/net/server/internal/model_card.go deleted file mode 100644 index 5f29695e..00000000 --- a/net/server/internal/model_card.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * DataBag - * - * DataBag provides storage for decentralized identity based self-hosting apps. It is intended to support sharing of personal data and hosting group conversations. - * - * API version: 0.0.1 - * Contact: roland.osborne@gmail.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package databag - -type Card struct { - - CardId string `json:"cardId"` - - CardProfile *CardProfile `json:"cardProfile"` - - CardData *CardData `json:"cardData"` - - ProfileRevision int64 `json:"profileRevision"` - - ContentRevision int64 `json:"contentRevision"` -} diff --git a/net/server/internal/model_card_data.go b/net/server/internal/model_card_data.go deleted file mode 100644 index e0091caf..00000000 --- a/net/server/internal/model_card_data.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * DataBag - * - * DataBag provides storage for decentralized identity based self-hosting apps. It is intended to support sharing of personal data and hosting group conversations. - * - * API version: 0.0.1 - * Contact: roland.osborne@gmail.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package databag - -type CardData struct { - - Revision int64 `json:"revision,omitempty"` - - Status string `json:"status"` - - Notes string `json:"notes,omitempty"` - - Token string `json:"token,omitempty"` - - Groups []string `json:"groups,omitempty"` -} diff --git a/net/server/internal/model_card_profile.go b/net/server/internal/model_card_profile.go deleted file mode 100644 index a48b5cb0..00000000 --- a/net/server/internal/model_card_profile.go +++ /dev/null @@ -1,27 +0,0 @@ -/* - * DataBag - * - * DataBag provides storage for decentralized identity based self-hosting apps. It is intended to support sharing of personal data and hosting group conversations. - * - * API version: 0.0.1 - * Contact: roland.osborne@gmail.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package databag - -type CardProfile struct { - - Handle string `json:"handle,omitempty"` - - Name string `json:"name,omitempty"` - - Description string `json:"description,omitempty"` - - Location string `json:"location,omitempty"` - - Revision int64 `json:"revision,omitempty"` - - ImageSet bool `json:"imageSet,omitempty"` - - Node string `json:"node"` -} diff --git a/net/server/internal/model_card_view.go b/net/server/internal/model_card_view.go deleted file mode 100644 index 4b754c8e..00000000 --- a/net/server/internal/model_card_view.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * DataBag - * - * DataBag provides storage for decentralized identity based self-hosting apps. It is intended to support sharing of personal data and hosting group conversations. - * - * API version: 0.0.1 - * Contact: roland.osborne@gmail.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package databag - -type CardView struct { - - CardId string `json:"cardId"` - - CardRevision int64 `json:"cardRevision"` - - ProfileRevision int64 `json:"profileRevision"` - - ContentRevision int64 `json:"contentRevision"` -} diff --git a/net/server/internal/models.go b/net/server/internal/models.go index b1e78123..dbee5f05 100644 --- a/net/server/internal/models.go +++ b/net/server/internal/models.go @@ -62,4 +62,46 @@ type ArticleIdSubjectBody struct { Data string `json:"data"` } +type Asset struct { + AssetId string `json:"assetId"` + Transform string `json:"transform,omitempty"` + Status string `json:"status,omitempty"` +} +type Authenticate struct { + Token string `json:"token"` + Timestamp int32 `json:"timestamp"` +} + +type Card struct { + CardId string `json:"cardId"` + CardProfile *CardProfile `json:"cardProfile"` + CardData *CardData `json:"cardData"` + ProfileRevision int64 `json:"profileRevision"` + ContentRevision int64 `json:"contentRevision"` +} + +type CardData struct { + Revision int64 `json:"revision,omitempty"` + Status string `json:"status"` + Notes string `json:"notes,omitempty"` + Token string `json:"token,omitempty"` + Groups []string `json:"groups,omitempty"` +} + +type CardProfile struct { + Handle string `json:"handle,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + Location string `json:"location,omitempty"` + Revision int64 `json:"revision,omitempty"` + ImageSet bool `json:"imageSet,omitempty"` + Node string `json:"node"` +} + +type CardView struct { + CardId string `json:"cardId"` + CardRevision int64 `json:"cardRevision"` + ProfileRevision int64 `json:"profileRevision"` + ContentRevision int64 `json:"contentRevision"` +}