databag/net/server/internal/models.go

428 lines
6.8 KiB
Go
Raw Normal View History

2022-01-15 21:28:28 +00:00
package databag
2022-01-15 21:34:10 +00:00
import (
2022-02-08 20:24:42 +00:00
//"os"
2022-01-15 21:34:10 +00:00
)
2022-01-15 21:28:28 +00:00
type Account struct {
2022-02-08 20:24:42 +00:00
2022-01-15 21:28:28 +00:00
AccountId string `json:"accountId"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:28:28 +00:00
Profile *Profile `json:"profile"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:28:28 +00:00
Disabled bool `json:"disabled"`
}
type AccountStatus struct {
2022-02-08 20:24:42 +00:00
2022-01-15 21:28:28 +00:00
Disabled bool `json:"disabled"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:28:28 +00:00
StorageUsed float64 `json:"storageUsed"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:28:28 +00:00
StorageAvailable float64 `json:"storageAvailable"`
2022-02-08 20:24:42 +00:00
ForwardingAddress string `json:"forwardingAddress"`
2022-01-15 21:34:10 +00:00
}
type Announce struct {
2022-02-08 20:24:42 +00:00
2022-01-15 21:34:10 +00:00
AppToken string `json:"appToken"`
}
type App struct {
2022-02-08 20:24:42 +00:00
Id string `json:"id"`
Revision int64 `json:"revision"`
Data *AppData `json:"data"`
2022-01-15 21:34:10 +00:00
}
type AppData struct {
2022-02-08 20:24:42 +00:00
2022-01-15 21:34:10 +00:00
Name string `json:"name,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:34:10 +00:00
Description string `json:"description,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:34:10 +00:00
Url string `json:"url,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:34:10 +00:00
Image string `json:"image,omitempty"`
2022-02-08 20:24:42 +00:00
Attached int64 `json:"attached"`
2022-01-28 07:01:17 +00:00
}
2022-01-15 21:34:10 +00:00
type Article struct {
2022-02-08 20:24:42 +00:00
Id string `json:"id"`
Revision int64 `json:"revision"`
Data *ArticleData `json:"data"`
}
type ArticleData struct {
2022-02-08 20:24:42 +00:00
DataType string `json:"dataType"`
2022-01-15 21:34:10 +00:00
Data string `json:"data"`
2022-02-08 20:24:42 +00:00
2022-01-18 08:40:39 +00:00
Created int64 `json:"created"`
2022-02-08 20:24:42 +00:00
2022-01-28 07:01:17 +00:00
Updated int64 `json:"updated"`
2022-02-08 20:24:42 +00:00
2022-02-16 08:00:07 +00:00
Groups *IdList `json:"groups,omitempty"`
2022-01-28 22:37:35 +00:00
}
2022-02-08 20:24:42 +00:00
type ArticleGroups struct {
2022-01-15 21:34:10 +00:00
2022-02-08 20:24:42 +00:00
Groups []string `json:"groups"`
2022-01-15 21:34:10 +00:00
}
2022-01-15 21:49:28 +00:00
type Asset struct {
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
AssetId string `json:"assetId"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
Transform string `json:"transform,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
Status string `json:"status,omitempty"`
}
type Card struct {
2022-02-08 20:24:42 +00:00
Id string `json:"id"`
Revision int64 `json:"revision"`
Data *CardData `json:"data"`
2022-02-03 06:13:46 +00:00
}
type CardData struct {
2022-02-08 20:24:42 +00:00
DetailRevision int64 `json:"detailRevision"`
2022-02-08 20:24:42 +00:00
ProfileRevision int64 `json:"profileRevision"`
2022-02-08 20:24:42 +00:00
NotifiedProfile int64 `json:"notifiedProfile"`
2022-02-08 20:24:42 +00:00
NotifiedArticle int64 `json:"notifiedArticle"`
NotifiedChannel int64 `json:"notifiedChannel"`
NotifiedView int64 `json:"notifiedView"`
2022-02-08 20:24:42 +00:00
CardDetail *CardDetail `json:"cardDetail,omitempty"`
CardProfile *CardProfile `json:"cardProfile,omitempty"`
}
type CardDetail struct {
2022-02-08 20:24:42 +00:00
Status string `json:"status"`
Token string `json:"token,omitempty"`
2022-01-15 21:49:28 +00:00
Notes string `json:"notes,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
Groups []string `json:"groups,omitempty"`
}
2022-01-15 21:34:10 +00:00
2022-01-15 21:49:28 +00:00
type CardProfile struct {
2022-02-08 20:24:42 +00:00
Guid string `json:"guid"`
2022-01-15 21:49:28 +00:00
Handle string `json:"handle,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
Name string `json:"name,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
Description string `json:"description,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
Location string `json:"location,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:49:28 +00:00
ImageSet bool `json:"imageSet,omitempty"`
2022-02-08 20:24:42 +00:00
Version string `json:"version,omitempty"`
2022-01-15 21:49:28 +00:00
Node string `json:"node"`
}
2022-02-08 20:24:42 +00:00
type Channel struct {
2022-01-15 22:08:00 +00:00
2022-02-08 20:24:42 +00:00
Id string `json:"id"`
2022-01-15 21:54:04 +00:00
2022-02-15 22:30:04 +00:00
Revision int64 `json:"revision"`
2022-02-08 20:24:42 +00:00
Data *ChannelData `json:"data"`
2022-01-15 21:54:04 +00:00
}
2022-02-08 20:24:42 +00:00
type ChannelData struct {
DetailRevision int64 `json:"detailRevision"`
TopicRevision int64 `json:"topicRevision"`
2022-02-08 20:24:42 +00:00
ChannelDetail *ChannelDetail `json:"channelDetail,omitempty"`
2022-02-03 07:48:17 +00:00
}
2022-02-08 20:24:42 +00:00
type ChannelDetail struct {
2022-01-25 05:22:33 +00:00
DataType string `json:"dataType"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:57:08 +00:00
Data string `json:"data"`
2022-02-08 20:24:42 +00:00
2022-01-18 08:40:39 +00:00
Created int64 `json:"created"`
2022-02-08 20:24:42 +00:00
2022-01-25 05:22:33 +00:00
Updated int64 `json:"updated"`
2022-02-08 20:24:42 +00:00
2022-02-16 08:00:07 +00:00
Groups *IdList `json:"groups,omitempty"`
2022-02-08 20:24:42 +00:00
2022-02-17 08:30:33 +00:00
Cards *IdList `json:"cards,omitempty"`
2022-02-08 20:24:42 +00:00
2022-02-17 08:30:33 +00:00
Members []string `json:"members"`
2022-02-08 20:24:42 +00:00
}
type Claim struct {
Token string `json:"token"`
}
type Connect struct {
Contact string `json:"contact"`
Token string `json:"token"`
ViewRevision int64 `json:"viewRevision,omitempty"`
ArticleRevision int64 `json:"articleRevision,omitempty"`
ProfileRevision int64 `json:"profileRevision,omitempty"`
ChannelRevision int64 `json:"channelRevision,omitempty"`
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"`
Version string `json:"version,omitempty"`
Node string `json:"node,omitempty"`
2022-01-15 21:57:08 +00:00
}
2022-02-08 20:24:42 +00:00
type ContactStatus struct {
Token string `json:"token,omitempty"`
ProfileRevision int64 `json:"profileRevision,omitempty"`
ArticleRevision int64 `json:"articleRevision,omitempty"`
ChannelRevision int64 `json:"channelRevision,omitempty"`
ViewRevision int64 `json:"viewRevision,omitempty"`
2022-01-15 21:59:26 +00:00
Status string `json:"status"`
}
2022-02-08 20:24:42 +00:00
type DataMessage struct {
Message string `json:"message"`
KeyType string `json:"keyType"`
PublicKey string `json:"publicKey"`
Signature string `json:"signature"`
SignatureType string `json:"signatureType"`
}
type Disconnect struct {
Contact string `json:"contact"`
}
type Group struct {
Id string `json:"id"`
Revision int64 `json:"revision"`
Data *GroupData `json:"data,omitempty"`
2022-01-15 21:59:26 +00:00
}
2022-02-08 20:24:42 +00:00
type GroupData struct {
DataType string `json:"dataType"`
2022-01-15 21:59:26 +00:00
Data string `json:"data"`
2022-02-08 20:24:42 +00:00
2022-02-03 07:48:17 +00:00
Created int64 `json:"created"`
2022-02-08 20:24:42 +00:00
2022-02-03 07:48:17 +00:00
Updated int64 `json:"updated"`
2022-02-08 20:24:42 +00:00
}
type Identity struct {
Revision int64 `json:"revision"`
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"`
Version string `json:"version"`
Node string `json:"node"`
2022-01-15 21:59:26 +00:00
}
2022-02-16 08:00:07 +00:00
type IdList struct {
Ids []string `json:"ids"`
}
2022-01-15 21:59:26 +00:00
type NodeConfig struct {
2022-02-08 20:24:42 +00:00
2022-01-15 21:59:26 +00:00
Domain string `json:"domain"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:59:26 +00:00
PublicLimit int64 `json:"publicLimit"`
2022-02-08 20:24:42 +00:00
2022-01-15 21:59:26 +00:00
AccountStorage int64 `json:"accountStorage"`
}
2022-01-15 22:01:21 +00:00
type Profile struct {
2022-02-08 20:24:42 +00:00
Guid string `json:"guid"`
2022-01-15 22:01:21 +00:00
Handle string `json:"handle,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Name string `json:"name,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Description string `json:"description,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Location string `json:"location,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Image string `json:"image,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Revision int64 `json:"revision"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Version string `json:"version,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Node string `json:"node"`
}
type ProfileData struct {
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Name string `json:"name,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Description string `json:"description,omitempty"`
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Location string `json:"location,omitempty"`
}
type Revision struct {
2022-02-08 20:24:42 +00:00
2022-01-15 22:01:21 +00:00
Profile int64 `json:"profile"`
2022-02-08 20:24:42 +00:00
Article int64 `json:"article"`
Group int64 `json:"group"`
Channel int64 `json:"channel"`
2022-01-15 22:01:21 +00:00
Card int64 `json:"card"`
}
2022-02-08 20:24:42 +00:00
type SignedData struct {
Guid string `json:"guid"`
Timestamp int64 `json:"timestamp"`
MessageType string `json:"messageType"`
Value string `json:"value"`
}
type Subject struct {
DataType string `json:"dataType"`
2022-01-15 22:01:21 +00:00
Data string `json:"data"`
}
2022-01-15 22:03:00 +00:00
2022-01-15 22:08:00 +00:00
type Tag struct {
2022-02-08 20:24:42 +00:00
Id string `json:"id"`
2022-02-18 07:56:30 +00:00
Revision int64 `json:"revision"`
2022-02-08 20:24:42 +00:00
Data *TagData `json:"data"`
2022-01-15 22:08:00 +00:00
}
2022-02-08 20:24:42 +00:00
type TagData struct {
Guid string `json:"guid"`
DataType string `json:"dataType"`
2022-01-15 22:08:00 +00:00
Data string `json:"data"`
2022-02-08 20:24:42 +00:00
2022-01-18 08:40:39 +00:00
Created int64 `json:"created"`
2022-01-15 22:08:00 +00:00
2022-02-08 20:24:42 +00:00
Updated int64 `json:"updated"`
2022-01-15 22:08:00 +00:00
}
2022-02-08 20:24:42 +00:00
type Topic struct {
2022-01-15 22:08:00 +00:00
2022-02-08 20:24:42 +00:00
Id string `json:"id"`
2022-01-15 22:08:00 +00:00
2022-02-18 07:56:30 +00:00
Revision int64 `json:"revision"`
2022-01-20 07:45:53 +00:00
2022-02-08 20:24:42 +00:00
Data *TopicData `json:"data"`
2022-01-21 07:41:08 +00:00
}
2022-02-08 20:24:42 +00:00
type TopicData struct {
DetailRevision int64 `json:"detailRevision"`
TagRevision int64 `json:"tagRevision"`
TopicDetail *TopicDetail `json:"topicDetail,omitempty"`
2022-01-20 07:45:53 +00:00
}
2022-02-08 20:24:42 +00:00
type TopicDetail struct {
2022-01-20 07:45:53 +00:00
Guid string `json:"guid"`
2022-02-08 20:24:42 +00:00
DataType string `json:"dataType"`
2022-01-20 07:45:53 +00:00
2022-02-08 20:24:42 +00:00
Data string `json:"data"`
2022-01-20 07:45:53 +00:00
2022-02-08 20:24:42 +00:00
Created int64 `json:"created"`
2022-02-18 07:56:30 +00:00
Updated int64 `json:"updated"`
2022-02-08 20:24:42 +00:00
Status string `json:"status"`
2022-03-01 08:28:36 +00:00
Transform string `json:"transform"`
2022-01-20 07:45:53 +00:00
}
2022-02-18 07:56:30 +00:00
type TopicTags struct {
2022-02-08 20:24:42 +00:00
TagCount int32 `json:"tagCount"`
TagUpdated int64 `json:"tagUpdated"`
2022-01-20 07:45:53 +00:00
}