mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 10:12:26 -05:00
[chore] Add interaction policy gtsmodels (#3075)
* [chore] introduce interaction policy gts models * update migration a smidge * fix copy paste typo * update migration * use int for InteractionType
This commit is contained in:
parent
8f8093aea4
commit
5bc567196b
46 changed files with 1318 additions and 531 deletions
17
internal/cache/size.go
vendored
17
internal/cache/size.go
vendored
|
|
@ -189,6 +189,7 @@ func totalOfRatios() float64 {
|
|||
config.GetCacheFollowRequestMemRatio() +
|
||||
config.GetCacheFollowRequestIDsMemRatio() +
|
||||
config.GetCacheInstanceMemRatio() +
|
||||
config.GetCacheInteractionApprovalMemRatio() +
|
||||
config.GetCacheInReplyToIDsMemRatio() +
|
||||
config.GetCacheListMemRatio() +
|
||||
config.GetCacheListEntryMemRatio() +
|
||||
|
|
@ -425,6 +426,19 @@ func sizeofInstance() uintptr {
|
|||
}))
|
||||
}
|
||||
|
||||
func sizeofInteractionApproval() uintptr {
|
||||
return uintptr(size.Of(>smodel.InteractionApproval{
|
||||
ID: exampleID,
|
||||
CreatedAt: exampleTime,
|
||||
UpdatedAt: exampleTime,
|
||||
AccountID: exampleID,
|
||||
InteractingAccountID: exampleID,
|
||||
InteractionURI: exampleURI,
|
||||
InteractionType: gtsmodel.InteractionAnnounce,
|
||||
URI: exampleURI,
|
||||
}))
|
||||
}
|
||||
|
||||
func sizeofList() uintptr {
|
||||
return uintptr(size.Of(>smodel.List{
|
||||
ID: exampleID,
|
||||
|
|
@ -591,9 +605,6 @@ func sizeofStatus() uintptr {
|
|||
Language: "en",
|
||||
CreatedWithApplicationID: exampleID,
|
||||
Federated: func() *bool { ok := true; return &ok }(),
|
||||
Boostable: func() *bool { ok := true; return &ok }(),
|
||||
Replyable: func() *bool { ok := true; return &ok }(),
|
||||
Likeable: func() *bool { ok := true; return &ok }(),
|
||||
ActivityStreamsType: ap.ObjectNote,
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue