mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-10 13:58:46 +00:00
Add some information about instance
This commit is contained in:
parent
7dd90ac015
commit
7d54da6380
4 changed files with 88 additions and 1 deletions
|
@ -10,6 +10,7 @@ type Instance struct {
|
|||
URI string `json:"uri"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
ShortDescription *string `json:"short_description"`
|
||||
EMail string `json:"email"`
|
||||
Version string `json:"version,omitempty"`
|
||||
Thumbnail string `json:"thumbnail,omitempty"`
|
||||
|
@ -17,7 +18,14 @@ type Instance struct {
|
|||
Stats *InstanceStats `json:"stats,omitempty"`
|
||||
Languages []string `json:"languages"`
|
||||
ContactAccount *Account `json:"account"`
|
||||
PollLimits *PollLimit `json:"poll_limits"`
|
||||
MaxTootChars *int64 `json:"max_toot_chars"`
|
||||
MaxMediaAttachments *int64 `json:"max_media_attachments"`
|
||||
UploadLimit *int64 `json:"upload_limit"`
|
||||
BackgroundUploadLimit *int64 `json:"background_upload_limit"`
|
||||
AvatarUploadLimit *int64 `json:"avatar_upload_limit"`
|
||||
Configuration *InstanceConf `json:"configuration"`
|
||||
Rules *[]map[string]string `json:"rules"`
|
||||
Pleroma *PleromaInstance `json:"pleroma"`
|
||||
}
|
||||
|
||||
|
@ -28,13 +36,36 @@ type InstanceStats struct {
|
|||
DomainCount int64 `json:"domain_count"`
|
||||
}
|
||||
|
||||
// InstanceConf hold information for mastodon instances
|
||||
type InstanceConf struct {
|
||||
Statuses StatusesConf `json:"statuses"`
|
||||
}
|
||||
|
||||
type StatusesConf struct {
|
||||
MaxCharacters int64 `json:"max_characters"`
|
||||
MaxMediaAttachments int64 `json:"max_media_attachments"`
|
||||
}
|
||||
|
||||
type PollLimit struct {
|
||||
MaxExpiration int64 `json:"max_expiration"`
|
||||
MaxOptionChars int64 `json:"max_option_chars"`
|
||||
MaxOptions int64 `json:"max_options"`
|
||||
MinExpiration int64 `json:"min_expiration"`
|
||||
}
|
||||
|
||||
// For about instance if this Pleroma
|
||||
type PleromaInstance struct {
|
||||
MetaData MetaData `json:"metadata"`
|
||||
}
|
||||
|
||||
type MetaData struct {
|
||||
Features *[]string `json:"features"`
|
||||
Features *[]string `json:"features"`
|
||||
Federation FederationInfo `json:"federation"`
|
||||
}
|
||||
|
||||
type FederationInfo struct {
|
||||
Enabled bool `json:enabled"`
|
||||
MrfPolicies []string `json:mrf_policies"`
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue