diff --git a/net/server/databag b/net/server/databag new file mode 100755 index 00000000..139013d5 Binary files /dev/null and b/net/server/databag differ diff --git a/net/server/go.mod b/net/server/go.mod new file mode 100644 index 00000000..4e40b733 --- /dev/null +++ b/net/server/go.mod @@ -0,0 +1,5 @@ +module databag + +go 1.17 + +require github.com/gorilla/mux v1.8.0 // indirect diff --git a/net/server/go.sum b/net/server/go.sum new file mode 100644 index 00000000..53502880 --- /dev/null +++ b/net/server/go.sum @@ -0,0 +1,2 @@ +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= diff --git a/net/server/internal/README.md b/net/server/internal/README.md new file mode 100644 index 00000000..701e96b8 --- /dev/null +++ b/net/server/internal/README.md @@ -0,0 +1,25 @@ +# Go API Server for databag + +DataBag provides storage for decentralized identity based self-hosting apps. It is intended to support sharing of personal data and hosting group conversations. + +## Overview +This server was generated by the [swagger-codegen] +(https://github.com/swagger-databag/swagger-codegen) project. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. +- + +To see how to make this your own, look here: + +[README](https://github.com/swagger-databag/swagger-codegen/blob/master/README.md) + +- API version: 0.0.1 +- Build date: 2022-01-10T22:59:36.877Z[GMT] + + +### Running the server +To run the server, follow these simple steps: + +``` +go run main.go +``` + diff --git a/net/server/internal/api_account.go b/net/server/internal/api_account.go new file mode 100644 index 00000000..0b7cc405 --- /dev/null +++ b/net/server/internal/api_account.go @@ -0,0 +1,79 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func AddAccount(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddAccountApp(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddAccountAuthentication(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddPublicAccount(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetAccountApps(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetAccountImage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetAccountProfile(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetAccountToken(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetAccountUsername(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetPublicClaimable(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveAccountApp(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetAccountApp(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetAccountAuthentication(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_admin.go b/net/server/internal/api_admin.go new file mode 100644 index 00000000..56d7066f --- /dev/null +++ b/net/server/internal/api_admin.go @@ -0,0 +1,59 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func AddNodeAccount(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetNodeAccountImage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetNodeAccounts(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetNodeClaimable(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetNodeConfig(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveNodeAccount(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetNodeAccount(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetNodeClaim(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetNodeConfig(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_authorize.go b/net/server/internal/api_authorize.go new file mode 100644 index 00000000..cdf090e0 --- /dev/null +++ b/net/server/internal/api_authorize.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func Authorize(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_contact.go b/net/server/internal/api_contact.go new file mode 100644 index 00000000..a7053e13 --- /dev/null +++ b/net/server/internal/api_contact.go @@ -0,0 +1,109 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func AddCard(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func ClearCardGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func ClearCardNotes(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetCard(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetCardData(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetCardProfile(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetCardProfileImage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetCardView(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetCloseMessage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetOpenMessage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveCard(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetCardGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetCardNotes(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetCardProfile(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetCardStatus(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetCloseMessage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetContentRevision(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetOpenMessage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetProfileRevision(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_content.go b/net/server/internal/api_content.go new file mode 100644 index 00000000..547b590d --- /dev/null +++ b/net/server/internal/api_content.go @@ -0,0 +1,164 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func AddArticle(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddArticleAsset(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddArticleTag(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddLabel(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func ClearArticleGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func ClearArticleLabel(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func ClearLabelGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticle(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleAsset(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleAssets(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleBlockView(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleSubjectField(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleTag(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleTagBlockView(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleTagSubjectField(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleTagView(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleTags(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticleViews(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetArticles(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetLabels(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveArticle(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveArticleAsset(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveArticleTag(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveLabel(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetArticleConfirmed(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetArticleGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetArticleLabel(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetArticleSubject(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetLabelGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func UpdateLabel(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_conversation.go b/net/server/internal/api_conversation.go new file mode 100644 index 00000000..b91cd17c --- /dev/null +++ b/net/server/internal/api_conversation.go @@ -0,0 +1,174 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func AddDialogue(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddDialogueInsight(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddDialogueTopic(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddInsightDialogue(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddTopicAsset(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func AddTopicTag(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func ConversationDialoguesDialogueIdTopicsTopicIdConfirmedPut(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetDialogueTopic(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetDialogueTopicSubjectField(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetDialogues(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetInsights(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicAsset(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicAssets(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicBlock(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicBlockView(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicTag(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicTagBlockView(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicTagSubjectField(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicTagView(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicTags(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetTopicViews(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveDialogue(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveDialogueInsight(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveDialogueTopic(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveTopicAsset(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveTopicTag(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetDialogueActive(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetDialogueInsightStatus(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetDialogueSubject(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetInsightDialogue(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetInsightStatus(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetTopicSubject(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_profile.go b/net/server/internal/api_profile.go new file mode 100644 index 00000000..d15023a9 --- /dev/null +++ b/net/server/internal/api_profile.go @@ -0,0 +1,34 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func GetProfile(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetProfileImage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetProfileMessage(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func SetProfile(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_share.go b/net/server/internal/api_share.go new file mode 100644 index 00000000..25a3dfba --- /dev/null +++ b/net/server/internal/api_share.go @@ -0,0 +1,34 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func AddGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func GetGroups(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func RemoveGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} + +func UpdateGroup(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/api_status.go b/net/server/internal/api_status.go new file mode 100644 index 00000000..a5b1a6c5 --- /dev/null +++ b/net/server/internal/api_status.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "net/http" +) + +func Status(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json; charset=UTF-8") + w.WriteHeader(http.StatusOK) +} diff --git a/net/server/internal/logger.go b/net/server/internal/logger.go new file mode 100644 index 00000000..070f5677 --- /dev/null +++ b/net/server/internal/logger.go @@ -0,0 +1,32 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "log" + "net/http" + "time" +) + +func Logger(inner http.Handler, name string) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + start := time.Now() + + inner.ServeHTTP(w, r) + + log.Printf( + "%s %s %s %s", + r.Method, + r.RequestURI, + name, + time.Since(start), + ) + }) +} diff --git a/net/server/internal/model_account.go b/net/server/internal/model_account.go new file mode 100644 index 00000000..b50baef5 --- /dev/null +++ b/net/server/internal/model_account.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Account struct { + + AccountId string `json:"accountId"` + + Profile *Profile `json:"profile"` +} diff --git a/net/server/internal/model_announce.go b/net/server/internal/model_announce.go new file mode 100644 index 00000000..ec9148f1 --- /dev/null +++ b/net/server/internal/model_announce.go @@ -0,0 +1,15 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Announce struct { + + AppToken string `json:"appToken"` +} diff --git a/net/server/internal/model_app.go b/net/server/internal/model_app.go new file mode 100644 index 00000000..2de734bb --- /dev/null +++ b/net/server/internal/model_app.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type App struct { + + AppId string `json:"appId"` + + AppData *AppData `json:"appData"` + + Attached int32 `json:"attached"` +} diff --git a/net/server/internal/model_app_data.go b/net/server/internal/model_app_data.go new file mode 100644 index 00000000..58670085 --- /dev/null +++ b/net/server/internal/model_app_data.go @@ -0,0 +1,21 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type AppData struct { + + Name string `json:"name,omitempty"` + + Description string `json:"description,omitempty"` + + Url string `json:"url,omitempty"` + + Image string `json:"image,omitempty"` +} diff --git a/net/server/internal/model_article.go b/net/server/internal/model_article.go new file mode 100644 index 00000000..d1c24acb --- /dev/null +++ b/net/server/internal/model_article.go @@ -0,0 +1,37 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Article struct { + + ArticleId string `json:"articleId"` + + ArticleRevision int64 `json:"articleRevision"` + + Type_ string `json:"type"` + + Data string `json:"data"` + + Created int32 `json:"created"` + + Modified int32 `json:"modified"` + + Status string `json:"status"` + + Labels []string `json:"labels"` + + Groups []string `json:"groups,omitempty"` + + TagCount int32 `json:"tagCount"` + + TagUpdate int32 `json:"tagUpdate,omitempty"` + + TagRevision int64 `json:"tagRevision"` +} diff --git a/net/server/internal/model_article_id_assets_body.go b/net/server/internal/model_article_id_assets_body.go new file mode 100644 index 00000000..4b3a7909 --- /dev/null +++ b/net/server/internal/model_article_id_assets_body.go @@ -0,0 +1,18 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag +import ( + "os" +) + +type ArticleIdAssetsBody struct { + + FileName **os.File `json:"fileName,omitempty"` +} diff --git a/net/server/internal/model_article_id_subject_body.go b/net/server/internal/model_article_id_subject_body.go new file mode 100644 index 00000000..4e8a8a4e --- /dev/null +++ b/net/server/internal/model_article_id_subject_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type ArticleIdSubjectBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_asset.go b/net/server/internal/model_asset.go new file mode 100644 index 00000000..082428d5 --- /dev/null +++ b/net/server/internal/model_asset.go @@ -0,0 +1,19 @@ +/* + * 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-databag/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 new file mode 100644 index 00000000..08192967 --- /dev/null +++ b/net/server/internal/model_authenticate.go @@ -0,0 +1,17 @@ +/* + * 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-databag/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 new file mode 100644 index 00000000..1b37801d --- /dev/null +++ b/net/server/internal/model_card.go @@ -0,0 +1,23 @@ +/* + * 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-databag/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 new file mode 100644 index 00000000..930504a7 --- /dev/null +++ b/net/server/internal/model_card_data.go @@ -0,0 +1,23 @@ +/* + * 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-databag/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 new file mode 100644 index 00000000..f53cf8cd --- /dev/null +++ b/net/server/internal/model_card_profile.go @@ -0,0 +1,27 @@ +/* + * 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-databag/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 new file mode 100644 index 00000000..6f833d97 --- /dev/null +++ b/net/server/internal/model_card_view.go @@ -0,0 +1,21 @@ +/* + * 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-databag/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/model_connect.go b/net/server/internal/model_connect.go new file mode 100644 index 00000000..389aef8a --- /dev/null +++ b/net/server/internal/model_connect.go @@ -0,0 +1,25 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Connect struct { + + RequestorcardId string `json:"requestorcardId,omitempty"` + + RequestedcardId string `json:"requestedcardId,omitempty"` + + Timestamp int32 `json:"timestamp"` + + Profile *Profile `json:"profile"` + + Token string `json:"token"` + + ContentRevision int64 `json:"contentRevision"` +} diff --git a/net/server/internal/model_content_articles_body.go b/net/server/internal/model_content_articles_body.go new file mode 100644 index 00000000..c4c82f53 --- /dev/null +++ b/net/server/internal/model_content_articles_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type ContentArticlesBody struct { + + Labels []string `json:"labels"` + + Groups []string `json:"groups"` +} diff --git a/net/server/internal/model_content_labels_body.go b/net/server/internal/model_content_labels_body.go new file mode 100644 index 00000000..d42eb8d3 --- /dev/null +++ b/net/server/internal/model_content_labels_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type ContentLabelsBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_data_message.go b/net/server/internal/model_data_message.go new file mode 100644 index 00000000..bc9d8b7c --- /dev/null +++ b/net/server/internal/model_data_message.go @@ -0,0 +1,23 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type DataMessage struct { + + MessageType string `json:"messageType"` + + Message string `json:"message"` + + KeyType string `json:"keyType"` + + PublicKey string `json:"publicKey"` + + Signature string `json:"signature"` +} diff --git a/net/server/internal/model_dialogue.go b/net/server/internal/model_dialogue.go new file mode 100644 index 00000000..19431cb2 --- /dev/null +++ b/net/server/internal/model_dialogue.go @@ -0,0 +1,29 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Dialogue struct { + + DialogueId string `json:"dialogueId"` + + DialogueRevison int64 `json:"dialogueRevison,omitempty"` + + Type_ string `json:"type"` + + Data string `json:"data"` + + Created int32 `json:"created"` + + Active bool `json:"active"` + + InsightRevision int64 `json:"insightRevision,omitempty"` + + Insights []DialogueInsights `json:"insights"` +} diff --git a/net/server/internal/model_dialogue_id_subject_body.go b/net/server/internal/model_dialogue_id_subject_body.go new file mode 100644 index 00000000..1bfad286 --- /dev/null +++ b/net/server/internal/model_dialogue_id_subject_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type DialogueIdSubjectBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_dialogue_insights.go b/net/server/internal/model_dialogue_insights.go new file mode 100644 index 00000000..0e237c69 --- /dev/null +++ b/net/server/internal/model_dialogue_insights.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type DialogueInsights struct { + + CardId string `json:"cardId,omitempty"` + + Status string `json:"status,omitempty"` +} diff --git a/net/server/internal/model_disconnect.go b/net/server/internal/model_disconnect.go new file mode 100644 index 00000000..6d58de8f --- /dev/null +++ b/net/server/internal/model_disconnect.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Disconnect struct { + + RequestorId string `json:"requestorId"` + + RequestedId string `json:"requestedId"` + + Timestamp int32 `json:"timestamp"` +} diff --git a/net/server/internal/model_group.go b/net/server/internal/model_group.go new file mode 100644 index 00000000..1b025328 --- /dev/null +++ b/net/server/internal/model_group.go @@ -0,0 +1,25 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Group struct { + + GroupId string `json:"groupId"` + + GroupRevision int64 `json:"groupRevision"` + + Type_ string `json:"type"` + + Data string `json:"data"` + + Created int32 `json:"created"` + + Modified int32 `json:"modified"` +} diff --git a/net/server/internal/model_groups_group_id_body.go b/net/server/internal/model_groups_group_id_body.go new file mode 100644 index 00000000..acd5e2eb --- /dev/null +++ b/net/server/internal/model_groups_group_id_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type GroupsGroupIdBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_inline_response_200.go b/net/server/internal/model_inline_response_200.go new file mode 100644 index 00000000..39fda638 --- /dev/null +++ b/net/server/internal/model_inline_response_200.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type InlineResponse200 struct { + + Token string `json:"token,omitempty"` + + Status string `json:"status"` +} diff --git a/net/server/internal/model_inline_response_200_1.go b/net/server/internal/model_inline_response_200_1.go new file mode 100644 index 00000000..e65cbd4a --- /dev/null +++ b/net/server/internal/model_inline_response_200_1.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type InlineResponse2001 struct { + + Id string `json:"id,omitempty"` + + Revision int64 `json:"revision,omitempty"` +} diff --git a/net/server/internal/model_inline_response_200_2.go b/net/server/internal/model_inline_response_200_2.go new file mode 100644 index 00000000..ad3661c1 --- /dev/null +++ b/net/server/internal/model_inline_response_200_2.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type InlineResponse2002 struct { + + BlockId string `json:"blockId,omitempty"` + + BlockRevision int64 `json:"blockRevision,omitempty"` + + Tag *Tag `json:"tag,omitempty"` +} diff --git a/net/server/internal/model_inline_response_201.go b/net/server/internal/model_inline_response_201.go new file mode 100644 index 00000000..75165ab7 --- /dev/null +++ b/net/server/internal/model_inline_response_201.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type InlineResponse201 struct { + + BlockId string `json:"blockId,omitempty"` + + BlockRevision int64 `json:"blockRevision,omitempty"` + + Article *Article `json:"article,omitempty"` +} diff --git a/net/server/internal/model_inline_response_201_1.go b/net/server/internal/model_inline_response_201_1.go new file mode 100644 index 00000000..6658778a --- /dev/null +++ b/net/server/internal/model_inline_response_201_1.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type InlineResponse2011 struct { + + BlockId string `json:"blockId,omitempty"` + + BlockRevision int64 `json:"blockRevision,omitempty"` + + Topic *Topic `json:"topic,omitempty"` +} diff --git a/net/server/internal/model_insight.go b/net/server/internal/model_insight.go new file mode 100644 index 00000000..c2b5917b --- /dev/null +++ b/net/server/internal/model_insight.go @@ -0,0 +1,21 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Insight struct { + + InsightId string `json:"insightId"` + + InsightRevision int64 `json:"insightRevision"` + + CardId string `json:"cardId"` + + Status string `json:"status"` +} diff --git a/net/server/internal/model_label.go b/net/server/internal/model_label.go new file mode 100644 index 00000000..c23494ee --- /dev/null +++ b/net/server/internal/model_label.go @@ -0,0 +1,25 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Label struct { + + LabelId string `json:"labelId"` + + LabelRevision int64 `json:"labelRevision"` + + Type_ string `json:"type"` + + Data string `json:"data"` + + Created int32 `json:"created"` + + Groups []string `json:"groups,omitempty"` +} diff --git a/net/server/internal/model_labels_label_id_body.go b/net/server/internal/model_labels_label_id_body.go new file mode 100644 index 00000000..09a70b21 --- /dev/null +++ b/net/server/internal/model_labels_label_id_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type LabelsLabelIdBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_node_config.go b/net/server/internal/model_node_config.go new file mode 100644 index 00000000..76115d67 --- /dev/null +++ b/net/server/internal/model_node_config.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type NodeConfig struct { + + Domain string `json:"domain,omitempty"` + + PublicLimit int64 `json:"publicLimit,omitempty"` + + AccountStorage int64 `json:"accountStorage,omitempty"` +} diff --git a/net/server/internal/model_profile.go b/net/server/internal/model_profile.go new file mode 100644 index 00000000..ec6e4d6c --- /dev/null +++ b/net/server/internal/model_profile.go @@ -0,0 +1,31 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Profile struct { + + Did string `json:"did"` + + Handle string `json:"handle,omitempty"` + + Name string `json:"name,omitempty"` + + Description string `json:"description,omitempty"` + + Location string `json:"location,omitempty"` + + Image string `json:"image,omitempty"` + + Revision int64 `json:"revision"` + + Version string `json:"version,omitempty"` + + Node string `json:"node"` +} diff --git a/net/server/internal/model_profile_data.go b/net/server/internal/model_profile_data.go new file mode 100644 index 00000000..1ba8ff0d --- /dev/null +++ b/net/server/internal/model_profile_data.go @@ -0,0 +1,23 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type ProfileData struct { + + Handle string `json:"handle,omitempty"` + + Name string `json:"name,omitempty"` + + Description string `json:"description,omitempty"` + + Location string `json:"location,omitempty"` + + Image string `json:"image,omitempty"` +} diff --git a/net/server/internal/model_revision.go b/net/server/internal/model_revision.go new file mode 100644 index 00000000..9760e01c --- /dev/null +++ b/net/server/internal/model_revision.go @@ -0,0 +1,27 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Revision struct { + + Profile int64 `json:"profile"` + + Content int64 `json:"content"` + + Label int64 `json:"label"` + + Share int64 `json:"share"` + + Card int64 `json:"card"` + + Dialogue int64 `json:"dialogue"` + + Insight int64 `json:"insight"` +} diff --git a/net/server/internal/model_share_groups_body.go b/net/server/internal/model_share_groups_body.go new file mode 100644 index 00000000..403cb375 --- /dev/null +++ b/net/server/internal/model_share_groups_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type ShareGroupsBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_tag.go b/net/server/internal/model_tag.go new file mode 100644 index 00000000..89bb63a0 --- /dev/null +++ b/net/server/internal/model_tag.go @@ -0,0 +1,25 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Tag struct { + + TagId string `json:"tagId"` + + CardId string `json:"cardId,omitempty"` + + Revision int64 `json:"revision"` + + Type_ string `json:"type"` + + Data string `json:"data"` + + Created int32 `json:"created"` +} diff --git a/net/server/internal/model_topic.go b/net/server/internal/model_topic.go new file mode 100644 index 00000000..a6fd7a53 --- /dev/null +++ b/net/server/internal/model_topic.go @@ -0,0 +1,33 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Topic struct { + + TopicId string `json:"topicId"` + + TopicRevision int64 `json:"topicRevision"` + + Type_ string `json:"type"` + + Data string `json:"data"` + + Created int32 `json:"created"` + + Modified int32 `json:"modified"` + + Status string `json:"status"` + + TagCount int32 `json:"tagCount"` + + TagUpdate int32 `json:"tagUpdate,omitempty"` + + TagRevision int64 `json:"tagRevision"` +} diff --git a/net/server/internal/model_topic_id_assets_body.go b/net/server/internal/model_topic_id_assets_body.go new file mode 100644 index 00000000..3bda3bc7 --- /dev/null +++ b/net/server/internal/model_topic_id_assets_body.go @@ -0,0 +1,18 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag +import ( + "os" +) + +type TopicIdAssetsBody struct { + + FileName **os.File `json:"fileName,omitempty"` +} diff --git a/net/server/internal/model_topic_id_subject_body.go b/net/server/internal/model_topic_id_subject_body.go new file mode 100644 index 00000000..a463fdad --- /dev/null +++ b/net/server/internal/model_topic_id_subject_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type TopicIdSubjectBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_topic_id_tags_body.go b/net/server/internal/model_topic_id_tags_body.go new file mode 100644 index 00000000..75f46b9f --- /dev/null +++ b/net/server/internal/model_topic_id_tags_body.go @@ -0,0 +1,17 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type TopicIdTagsBody struct { + + Type_ string `json:"type"` + + Data string `json:"data"` +} diff --git a/net/server/internal/model_tunnel.go b/net/server/internal/model_tunnel.go new file mode 100644 index 00000000..d6c31f29 --- /dev/null +++ b/net/server/internal/model_tunnel.go @@ -0,0 +1,19 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +type Tunnel struct { + + CardId string `json:"cardId"` + + Type_ string `json:"type"` + + Data string `json:"data,omitempty"` +} diff --git a/net/server/internal/routers.go b/net/server/internal/routers.go new file mode 100644 index 00000000..2ea7ae26 --- /dev/null +++ b/net/server/internal/routers.go @@ -0,0 +1,848 @@ +/* + * 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-databag/swagger-codegen.git) + */ +package databag + +import ( + "fmt" + "net/http" + "strings" + + "github.com/gorilla/mux" +) + +type Route struct { + Name string + Method string + Pattern string + HandlerFunc http.HandlerFunc +} + +type Routes []Route + +func NewRouter() *mux.Router { + router := mux.NewRouter().StrictSlash(true) + for _, route := range routes { + var handler http.Handler + handler = route.HandlerFunc + handler = Logger(handler, route.Name) + + router. + Methods(route.Method). + Path(route.Pattern). + Name(route.Name). + Handler(handler) + } + + return router +} + +func Index(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello World!") +} + +var routes = Routes{ + Route{ + "Index", + "GET", + "/", + Index, + }, + + Route{ + "AddAccount", + strings.ToUpper("Post"), + "/account/profile", + AddAccount, + }, + + Route{ + "AddAccountApp", + strings.ToUpper("Post"), + "/account/apps", + AddAccountApp, + }, + + Route{ + "AddAccountAuthentication", + strings.ToUpper("Post"), + "/account/auth", + AddAccountAuthentication, + }, + + Route{ + "AddPublicAccount", + strings.ToUpper("Post"), + "/account/public/profile", + AddPublicAccount, + }, + + Route{ + "GetAccountApps", + strings.ToUpper("Get"), + "/account/apps", + GetAccountApps, + }, + + Route{ + "GetAccountImage", + strings.ToUpper("Get"), + "/account/profile/image", + GetAccountImage, + }, + + Route{ + "GetAccountProfile", + strings.ToUpper("Get"), + "/account/profile", + GetAccountProfile, + }, + + Route{ + "GetAccountToken", + strings.ToUpper("Get"), + "/account/token", + GetAccountToken, + }, + + Route{ + "GetAccountUsername", + strings.ToUpper("Get"), + "/account/claimable", + GetAccountUsername, + }, + + Route{ + "GetPublicClaimable", + strings.ToUpper("Get"), + "/account/public/claimable", + GetPublicClaimable, + }, + + Route{ + "RemoveAccountApp", + strings.ToUpper("Delete"), + "/account/apps/{appId}", + RemoveAccountApp, + }, + + Route{ + "SetAccountApp", + strings.ToUpper("Put"), + "/account/apps", + SetAccountApp, + }, + + Route{ + "SetAccountAuthentication", + strings.ToUpper("Put"), + "/account/auth", + SetAccountAuthentication, + }, + + Route{ + "AddNodeAccount", + strings.ToUpper("Post"), + "/admin/accounts", + AddNodeAccount, + }, + + Route{ + "GetNodeAccountImage", + strings.ToUpper("Get"), + "/admin/accounts/{accountId}/image", + GetNodeAccountImage, + }, + + Route{ + "GetNodeAccounts", + strings.ToUpper("Get"), + "/admin/accounts", + GetNodeAccounts, + }, + + Route{ + "GetNodeClaimable", + strings.ToUpper("Get"), + "/admin/claimable", + GetNodeClaimable, + }, + + Route{ + "GetNodeConfig", + strings.ToUpper("Get"), + "/admin/config", + GetNodeConfig, + }, + + Route{ + "RemoveNodeAccount", + strings.ToUpper("Delete"), + "/admin/accounts/{accountId}", + RemoveNodeAccount, + }, + + Route{ + "SetNodeAccount", + strings.ToUpper("Put"), + "/admin/accounts/{accountId}/reset", + SetNodeAccount, + }, + + Route{ + "SetNodeClaim", + strings.ToUpper("Post"), + "/admin/claim", + SetNodeClaim, + }, + + Route{ + "SetNodeConfig", + strings.ToUpper("Put"), + "/admin/config", + SetNodeConfig, + }, + + Route{ + "Authorize", + strings.ToUpper("Put"), + "/authorize", + Authorize, + }, + + Route{ + "AddCard", + strings.ToUpper("Post"), + "/contact/cards", + AddCard, + }, + + Route{ + "ClearCardGroup", + strings.ToUpper("Delete"), + "/contact/cards/{cardId}/groups/{groupId}", + ClearCardGroup, + }, + + Route{ + "ClearCardNotes", + strings.ToUpper("Delete"), + "/contact/cards/{cardId}/notes", + ClearCardNotes, + }, + + Route{ + "GetCard", + strings.ToUpper("Get"), + "/contact/cards/{cardId}", + GetCard, + }, + + Route{ + "GetCardData", + strings.ToUpper("Get"), + "/contact/cards/{cardId}/data", + GetCardData, + }, + + Route{ + "GetCardProfile", + strings.ToUpper("Get"), + "/contact/cards/{cardId}/profile", + GetCardProfile, + }, + + Route{ + "GetCardProfileImage", + strings.ToUpper("Get"), + "/contact/cards/{cardId}/profile/image", + GetCardProfileImage, + }, + + Route{ + "GetCardView", + strings.ToUpper("Get"), + "/contact/cards/view", + GetCardView, + }, + + Route{ + "GetCloseMessage", + strings.ToUpper("Get"), + "/contact/cards/{cardId}/closeMessage", + GetCloseMessage, + }, + + Route{ + "GetOpenMessage", + strings.ToUpper("Get"), + "/contact/cards/{cardId}/openMessage", + GetOpenMessage, + }, + + Route{ + "RemoveCard", + strings.ToUpper("Delete"), + "/contact/cards/{cardId}", + RemoveCard, + }, + + Route{ + "SetCardGroup", + strings.ToUpper("Put"), + "/contact/cards/{cardId}/groups/{groupId}", + SetCardGroup, + }, + + Route{ + "SetCardNotes", + strings.ToUpper("Put"), + "/contact/cards/{cardId}/notes", + SetCardNotes, + }, + + Route{ + "SetCardProfile", + strings.ToUpper("Put"), + "/contact/cards/{cardId}/profile", + SetCardProfile, + }, + + Route{ + "SetCardStatus", + strings.ToUpper("Put"), + "/contact/cards/{cardId}/status", + SetCardStatus, + }, + + Route{ + "SetCloseMessage", + strings.ToUpper("Put"), + "/contact/closeMessage", + SetCloseMessage, + }, + + Route{ + "SetContentRevision", + strings.ToUpper("Put"), + "/contact/content/revision", + SetContentRevision, + }, + + Route{ + "SetOpenMessage", + strings.ToUpper("Put"), + "/contact/openMessage", + SetOpenMessage, + }, + + Route{ + "SetProfileRevision", + strings.ToUpper("Put"), + "/contact/profile/revision", + SetProfileRevision, + }, + + Route{ + "AddArticle", + strings.ToUpper("Post"), + "/content/articles", + AddArticle, + }, + + Route{ + "AddArticleAsset", + strings.ToUpper("Post"), + "/content/articles/{articleId}/assets", + AddArticleAsset, + }, + + Route{ + "AddArticleTag", + strings.ToUpper("Post"), + "/content/articles/{articleId}/tags", + AddArticleTag, + }, + + Route{ + "AddLabel", + strings.ToUpper("Post"), + "/content/labels", + AddLabel, + }, + + Route{ + "ClearArticleGroup", + strings.ToUpper("Delete"), + "/content/articles/{articleId}/groups/{groupId}", + ClearArticleGroup, + }, + + Route{ + "ClearArticleLabel", + strings.ToUpper("Delete"), + "/content/articles/{articleId}/labels/{labelId}", + ClearArticleLabel, + }, + + Route{ + "ClearLabelGroup", + strings.ToUpper("Delete"), + "/content/labels/{labelId}/groups/{groupId}", + ClearLabelGroup, + }, + + Route{ + "GetArticle", + strings.ToUpper("Get"), + "/content/articles/{articleId}", + GetArticle, + }, + + Route{ + "GetArticleAsset", + strings.ToUpper("Get"), + "/content/articles/{articleId}/assets/{assetId}", + GetArticleAsset, + }, + + Route{ + "GetArticleAssets", + strings.ToUpper("Get"), + "/content/articles/{articleId}/assets", + GetArticleAssets, + }, + + Route{ + "GetArticleBlockView", + strings.ToUpper("Get"), + "/content/articleBlocks/view", + GetArticleBlockView, + }, + + Route{ + "GetArticleSubjectField", + strings.ToUpper("Get"), + "/content/articles/{articleId}/subject/{field}", + GetArticleSubjectField, + }, + + Route{ + "GetArticleTag", + strings.ToUpper("Get"), + "/content/articles/{articleId}/tags/{tagId}", + GetArticleTag, + }, + + Route{ + "GetArticleTagBlockView", + strings.ToUpper("Get"), + "/content/articles/{articleId}/tagBlocks/view", + GetArticleTagBlockView, + }, + + Route{ + "GetArticleTagSubjectField", + strings.ToUpper("Get"), + "/content/articles/{articleId}/tags/{tagId}/subject/{field}", + GetArticleTagSubjectField, + }, + + Route{ + "GetArticleTagView", + strings.ToUpper("Get"), + "/content/articles/{articleId}/tagBlocks/{blockId}/view", + GetArticleTagView, + }, + + Route{ + "GetArticleTags", + strings.ToUpper("Get"), + "/content/articles/{articleId}/tagBlocks/{blockId}", + GetArticleTags, + }, + + Route{ + "GetArticleViews", + strings.ToUpper("Get"), + "/content/articleBlocks/{blockId}/view", + GetArticleViews, + }, + + Route{ + "GetArticles", + strings.ToUpper("Get"), + "/content/articleBlocks/{blockId}", + GetArticles, + }, + + Route{ + "GetLabels", + strings.ToUpper("Get"), + "/content/labels", + GetLabels, + }, + + Route{ + "RemoveArticle", + strings.ToUpper("Delete"), + "/content/articles/{articleId}", + RemoveArticle, + }, + + Route{ + "RemoveArticleAsset", + strings.ToUpper("Delete"), + "/content/articles/{articleId}/assets/{assetId}", + RemoveArticleAsset, + }, + + Route{ + "RemoveArticleTag", + strings.ToUpper("Delete"), + "/content/articles/{articleId}/tags/{tagId}", + RemoveArticleTag, + }, + + Route{ + "RemoveLabel", + strings.ToUpper("Delete"), + "/content/labels/{labelId}", + RemoveLabel, + }, + + Route{ + "SetArticleConfirmed", + strings.ToUpper("Put"), + "/content/articles/{articleId}/confirmed", + SetArticleConfirmed, + }, + + Route{ + "SetArticleGroup", + strings.ToUpper("Post"), + "/content/articles/{articleId}/groups/{groupId}", + SetArticleGroup, + }, + + Route{ + "SetArticleLabel", + strings.ToUpper("Post"), + "/content/articles/{articleId}/labels/{labelId}", + SetArticleLabel, + }, + + Route{ + "SetArticleSubject", + strings.ToUpper("Put"), + "/content/articles/{articleId}/subject", + SetArticleSubject, + }, + + Route{ + "SetLabelGroup", + strings.ToUpper("Post"), + "/content/labels/{labelId}/groups/{groupId}", + SetLabelGroup, + }, + + Route{ + "UpdateLabel", + strings.ToUpper("Put"), + "/content/labels/{labelId}", + UpdateLabel, + }, + + Route{ + "AddDialogue", + strings.ToUpper("Post"), + "/conversation/dialogues", + AddDialogue, + }, + + Route{ + "AddDialogueInsight", + strings.ToUpper("Put"), + "/conversation/dialogues/{dialogueId}/cards/{cardId}", + AddDialogueInsight, + }, + + Route{ + "AddDialogueTopic", + strings.ToUpper("Post"), + "/conversation/dialogues/{dialogueId}/topics", + AddDialogueTopic, + }, + + Route{ + "AddInsightDialogue", + strings.ToUpper("Post"), + "/conversation/insights/{dialogueId}", + AddInsightDialogue, + }, + + Route{ + "AddTopicAsset", + strings.ToUpper("Post"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/assets", + AddTopicAsset, + }, + + Route{ + "AddTopicTag", + strings.ToUpper("Post"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/tags", + AddTopicTag, + }, + + Route{ + "ConversationDialoguesDialogueIdTopicsTopicIdConfirmedPut", + strings.ToUpper("Put"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/confirmed", + ConversationDialoguesDialogueIdTopicsTopicIdConfirmedPut, + }, + + Route{ + "GetDialogueTopic", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}", + GetDialogueTopic, + }, + + Route{ + "GetDialogueTopicSubjectField", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/subject/{field}", + GetDialogueTopicSubjectField, + }, + + Route{ + "GetDialogues", + strings.ToUpper("Get"), + "/conversation/dialogues", + GetDialogues, + }, + + Route{ + "GetInsights", + strings.ToUpper("Get"), + "/conversation/insights", + GetInsights, + }, + + Route{ + "GetTopicAsset", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/assets/{assetId}", + GetTopicAsset, + }, + + Route{ + "GetTopicAssets", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/assets", + GetTopicAssets, + }, + + Route{ + "GetTopicBlock", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topicBlocks/{blockId}", + GetTopicBlock, + }, + + Route{ + "GetTopicBlockView", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topicBlocks/view", + GetTopicBlockView, + }, + + Route{ + "GetTopicTag", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/tags/{tagId}", + GetTopicTag, + }, + + Route{ + "GetTopicTagBlockView", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/tagBlocks/view", + GetTopicTagBlockView, + }, + + Route{ + "GetTopicTagSubjectField", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/tags/{tagId}/subject/{field}", + GetTopicTagSubjectField, + }, + + Route{ + "GetTopicTagView", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/tagBlocks/{blockId}/view", + GetTopicTagView, + }, + + Route{ + "GetTopicTags", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/tagBlocks/{blockId}", + GetTopicTags, + }, + + Route{ + "GetTopicViews", + strings.ToUpper("Get"), + "/conversation/dialogues/{dialogueId}/topicBlocks/{blockId}/view", + GetTopicViews, + }, + + Route{ + "RemoveDialogue", + strings.ToUpper("Delete"), + "/conversation/dialogues/{dialogueId}", + RemoveDialogue, + }, + + Route{ + "RemoveDialogueInsight", + strings.ToUpper("Delete"), + "/conversation/dialogues/{dialogueId}/cards/{cardId}", + RemoveDialogueInsight, + }, + + Route{ + "RemoveDialogueTopic", + strings.ToUpper("Delete"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}", + RemoveDialogueTopic, + }, + + Route{ + "RemoveTopicAsset", + strings.ToUpper("Delete"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/assets/{assetId}", + RemoveTopicAsset, + }, + + Route{ + "RemoveTopicTag", + strings.ToUpper("Delete"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/tags/{tagId}", + RemoveTopicTag, + }, + + Route{ + "SetDialogueActive", + strings.ToUpper("Put"), + "/conversation/dialogues/{dialogueId}/active", + SetDialogueActive, + }, + + Route{ + "SetDialogueInsightStatus", + strings.ToUpper("Put"), + "/conversation/dialogues/{dialogueId}/status", + SetDialogueInsightStatus, + }, + + Route{ + "SetDialogueSubject", + strings.ToUpper("Put"), + "/conversation/dialogues/{dialogueId}/subject", + SetDialogueSubject, + }, + + Route{ + "SetInsightDialogue", + strings.ToUpper("Delete"), + "/conversation/insights/{dialogueId}", + SetInsightDialogue, + }, + + Route{ + "SetInsightStatus", + strings.ToUpper("Put"), + "/conversation/insights/{insightId}/status", + SetInsightStatus, + }, + + Route{ + "SetTopicSubject", + strings.ToUpper("Put"), + "/conversation/dialogues/{dialogueId}/topics/{topicId}/subject", + SetTopicSubject, + }, + + Route{ + "GetProfile", + strings.ToUpper("Get"), + "/profile", + GetProfile, + }, + + Route{ + "GetProfileImage", + strings.ToUpper("Get"), + "/profile/image", + GetProfileImage, + }, + + Route{ + "GetProfileMessage", + strings.ToUpper("Get"), + "/profile/message", + GetProfileMessage, + }, + + Route{ + "SetProfile", + strings.ToUpper("Put"), + "/profile", + SetProfile, + }, + + Route{ + "AddGroup", + strings.ToUpper("Post"), + "/share/groups", + AddGroup, + }, + + Route{ + "GetGroups", + strings.ToUpper("Get"), + "/share/groups", + GetGroups, + }, + + Route{ + "RemoveGroup", + strings.ToUpper("Delete"), + "/share/groups/{groupId}", + RemoveGroup, + }, + + Route{ + "UpdateGroup", + strings.ToUpper("Put"), + "/share/groups/{groupId}", + UpdateGroup, + }, + + Route{ + "Status", + strings.ToUpper("Get"), + "/status", + Status, + }, +} diff --git a/net/server/main.go b/net/server/main.go new file mode 100644 index 00000000..4a81bd9e --- /dev/null +++ b/net/server/main.go @@ -0,0 +1,24 @@ +/* + * 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 main + +import ( + "log" + "net/http" + app "databag/internal" +) + +func main() { + log.Printf("Server started") + + router := app.NewRouter() + + log.Fatal(http.ListenAndServe(":7000", router)) +}