Work on ensuring data consistency even for yet unknown fields
Some checks failed
/ docker (push) Has been cancelled
Some checks failed
/ docker (push) Has been cancelled
This commit is contained in:
parent
7e10627618
commit
bf0aaaca8f
12 changed files with 458 additions and 5 deletions
|
@ -23,6 +23,7 @@ var AllTypes = []any{
|
|||
&ServerMetadata{},
|
||||
&AccessToken{},
|
||||
&LoginProcessToken{},
|
||||
&UnhandledMessage{},
|
||||
&User{},
|
||||
&UserAuthMethod{},
|
||||
&UserToBeing{},
|
||||
|
|
|
@ -5,4 +5,6 @@ type Activity struct {
|
|||
Type string // `gorm:"type:activitystreams_activity_type"`
|
||||
ObjectId string
|
||||
ObjectType uint32 // Target type: ActivitystreamsActivityTargetType
|
||||
|
||||
RawData []byte
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@ type Note struct {
|
|||
PingRelations []NoteToPing `gorm:"foreignKey:NoteId;constraint:OnDelete:CASCADE"` // Pings/mentions this note performs
|
||||
Tags []NoteTag `gorm:"foreignKey:NoteId;constraint:OnDelete:CASCADE"` // Tags this note contains
|
||||
Edits []NoteEdit `gorm:"foreignKey:NoteId;constraint:OnDelete:CASCADE"` // All edits done to this note
|
||||
|
||||
RawData []byte
|
||||
}
|
||||
|
||||
type INote interface {
|
||||
|
|
11
storage-new/models/UnhandledMessage.go
Normal file
11
storage-new/models/UnhandledMessage.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type UnhandledMessage struct {
|
||||
ID uint64 `gorm:"primarykey"`
|
||||
CreatedAt time.Time
|
||||
RawData []byte // Raw data of the message
|
||||
ForUserId string // Id of the user this message was for
|
||||
GlobalInbox bool // Whether the message was sent to the global inbox
|
||||
}
|
|
@ -74,6 +74,8 @@ type User struct {
|
|||
PrivateKeyRsa []byte
|
||||
PrivateKeyEd []byte
|
||||
|
||||
RawData []byte
|
||||
|
||||
// ---- "Remote" linked values
|
||||
InfoFields []UserInfoField
|
||||
BeingTypes []UserToBeing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue