Documentation
¶
Index ¶
- type Account
- type AccountDisplayRole
- type AccountExportStats
- type AccountRole
- type AdminAccountInfo
- type AdminActionResponse
- type AdminEmoji
- type AdminReport
- type Application
- type Attachment
- type Card
- type Conversation
- type DebugAPURLResponse
- type DefaultPolicies
- type Domain
- type DomainPermission
- type DomainPermissionSubscription
- func (m *DomainPermissionSubscription) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *DomainPermissionSubscription) MarshalBinary() ([]byte, error)
- func (m *DomainPermissionSubscription) UnmarshalBinary(b []byte) error
- func (m *DomainPermissionSubscription) Validate(formats strfmt.Registry) error
- type Emoji
- type EmojiCategory
- type Field
- type FilterAction
- type FilterContext
- type FilterKeyword
- type FilterResult
- type FilterStatus
- type FilterV1
- type FilterV2
- type HeaderFilter
- type HostMeta
- type InstanceConfigurationAccounts
- func (m *InstanceConfigurationAccounts) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceConfigurationAccounts) MarshalBinary() ([]byte, error)
- func (m *InstanceConfigurationAccounts) UnmarshalBinary(b []byte) error
- func (m *InstanceConfigurationAccounts) Validate(formats strfmt.Registry) error
- type InstanceConfigurationEmojis
- func (m *InstanceConfigurationEmojis) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceConfigurationEmojis) MarshalBinary() ([]byte, error)
- func (m *InstanceConfigurationEmojis) UnmarshalBinary(b []byte) error
- func (m *InstanceConfigurationEmojis) Validate(formats strfmt.Registry) error
- type InstanceConfigurationMediaAttachments
- func (m *InstanceConfigurationMediaAttachments) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceConfigurationMediaAttachments) MarshalBinary() ([]byte, error)
- func (m *InstanceConfigurationMediaAttachments) UnmarshalBinary(b []byte) error
- func (m *InstanceConfigurationMediaAttachments) Validate(formats strfmt.Registry) error
- type InstanceConfigurationPolls
- func (m *InstanceConfigurationPolls) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceConfigurationPolls) MarshalBinary() ([]byte, error)
- func (m *InstanceConfigurationPolls) UnmarshalBinary(b []byte) error
- func (m *InstanceConfigurationPolls) Validate(formats strfmt.Registry) error
- type InstanceConfigurationStatuses
- func (m *InstanceConfigurationStatuses) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceConfigurationStatuses) MarshalBinary() ([]byte, error)
- func (m *InstanceConfigurationStatuses) UnmarshalBinary(b []byte) error
- func (m *InstanceConfigurationStatuses) Validate(formats strfmt.Registry) error
- type InstanceRule
- type InstanceV1
- type InstanceV1Configuration
- func (m *InstanceV1Configuration) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceV1Configuration) MarshalBinary() ([]byte, error)
- func (m *InstanceV1Configuration) UnmarshalBinary(b []byte) error
- func (m *InstanceV1Configuration) Validate(formats strfmt.Registry) error
- type InstanceV1URLs
- type InstanceV2
- type InstanceV2Configuration
- func (m *InstanceV2Configuration) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceV2Configuration) MarshalBinary() ([]byte, error)
- func (m *InstanceV2Configuration) UnmarshalBinary(b []byte) error
- func (m *InstanceV2Configuration) Validate(formats strfmt.Registry) error
- type InstanceV2ConfigurationTranslation
- func (m *InstanceV2ConfigurationTranslation) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceV2ConfigurationTranslation) MarshalBinary() ([]byte, error)
- func (m *InstanceV2ConfigurationTranslation) UnmarshalBinary(b []byte) error
- func (m *InstanceV2ConfigurationTranslation) Validate(formats strfmt.Registry) error
- type InstanceV2ConfigurationVAPID
- func (m *InstanceV2ConfigurationVAPID) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceV2ConfigurationVAPID) MarshalBinary() ([]byte, error)
- func (m *InstanceV2ConfigurationVAPID) UnmarshalBinary(b []byte) error
- func (m *InstanceV2ConfigurationVAPID) Validate(formats strfmt.Registry) error
- type InstanceV2Contact
- type InstanceV2Registrations
- func (m *InstanceV2Registrations) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceV2Registrations) MarshalBinary() ([]byte, error)
- func (m *InstanceV2Registrations) UnmarshalBinary(b []byte) error
- func (m *InstanceV2Registrations) Validate(formats strfmt.Registry) error
- type InstanceV2Thumbnail
- type InstanceV2ThumbnailVersions
- func (m *InstanceV2ThumbnailVersions) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *InstanceV2ThumbnailVersions) MarshalBinary() ([]byte, error)
- func (m *InstanceV2ThumbnailVersions) UnmarshalBinary(b []byte) error
- func (m *InstanceV2ThumbnailVersions) Validate(formats strfmt.Registry) error
- type InstanceV2URLs
- type InstanceV2Usage
- type InstanceV2Users
- type InteractionPolicy
- type InteractionRequest
- type Link
- type List
- type Marker
- type MediaDimensions
- type MediaFocus
- type MediaMeta
- type Mention
- type MutedAccount
- type NodeInfoServices
- type NodeInfoSoftware
- type NodeInfoUsage
- type NodeInfoUsers
- type Nodeinfo
- type Notification
- type PolicyRules
- type PolicyValue
- type Poll
- type PollOption
- type Relationship
- type Report
- type SearchResult
- type Source
- type Status
- type StatusEdit
- type StatusReblogged
- type StatusSource
- type SwaggerCollection
- type SwaggerCollectionPage
- type SwaggerFeaturedCollection
- func (m *SwaggerFeaturedCollection) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *SwaggerFeaturedCollection) MarshalBinary() ([]byte, error)
- func (m *SwaggerFeaturedCollection) UnmarshalBinary(b []byte) error
- func (m *SwaggerFeaturedCollection) Validate(formats strfmt.Registry) error
- type Tag
- type Theme
- type ThreadContext
- type TimelineMarker
- type Token
- type TokenInfo
- type User
- type WebPushNotification
- type WebPushNotificationPolicy
- type WebPushSubscription
- type WebPushSubscriptionAlerts
- func (m *WebPushSubscriptionAlerts) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *WebPushSubscriptionAlerts) MarshalBinary() ([]byte, error)
- func (m *WebPushSubscriptionAlerts) UnmarshalBinary(b []byte) error
- func (m *WebPushSubscriptionAlerts) Validate(formats strfmt.Registry) error
- type WellKnownResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // The account URI as discovered via webfinger. // Equal to username for local users, or username@domain for remote users. // Example: some_user@example.org Acct string `json:"acct,omitempty"` // Web location of the account's avatar. // Example: https://example.org/media/some_user/avatar/original/avatar.jpeg Avatar string `json:"avatar,omitempty"` // Description of this account's avatar, for alt text. // Example: A cute drawing of a smiling sloth. AvatarDescription string `json:"avatar_description,omitempty"` // Database ID of the media attachment for this account's avatar image. // Omitted if no avatar uploaded for this account (ie., default avatar). // Example: 01JAJ3XCD66K3T99JZESCR137W AvatarMediaID string `json:"avatar_media_id,omitempty"` // Web location of a static version of the account's avatar. // Only relevant when the account's main avatar is a video or a gif. // Example: https://example.org/media/some_user/avatar/static/avatar.png AvatarStatic string `json:"avatar_static,omitempty"` // Account identifies as a bot. Bot bool `json:"bot,omitempty"` // When the account was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // CustomCSS to include when rendering this account's profile or statuses. CustomCSS string `json:"custom_css,omitempty"` // Account has opted into discovery features. Discoverable bool `json:"discoverable,omitempty"` // The account's display name. // Example: big jeff (he/him) DisplayName string `json:"display_name,omitempty"` // Array of custom emojis used in this account's note or display name. // Empty for blocked accounts. Emojis []*Emoji `json:"emojis"` // Account has enabled RSS feed. // Key/value omitted if false. EnableRSS bool `json:"enable_rss,omitempty"` // Additional metadata attached to this account's profile. // Empty for blocked accounts. Fields []*Field `json:"fields"` // Number of accounts following this account, according to our instance. FollowersCount int64 `json:"followers_count,omitempty"` // Number of account's followed by this account, according to our instance. FollowingCount int64 `json:"following_count,omitempty"` // Account identifies as a Group actor. Group bool `json:"group,omitempty"` // Web location of the account's header image. // Example: https://example.org/media/some_user/header/original/header.jpeg Header string `json:"header,omitempty"` // Description of this account's header, for alt text. // Example: A sunlit field with purple flowers. HeaderDescription string `json:"header_description,omitempty"` // Database ID of the media attachment for this account's header image. // Omitted if no header uploaded for this account (ie., default header). // Example: 01JAJ3XCD66K3T99JZESCR137W HeaderMediaID string `json:"header_media_id,omitempty"` // Web location of a static version of the account's header. // Only relevant when the account's main header is a video or a gif. // Example: https://example.org/media/some_user/header/static/header.png HeaderStatic string `json:"header_static,omitempty"` // Account has opted to hide their followers/following collections. // Key/value omitted if false. HideCollections bool `json:"hide_collections,omitempty"` // The account id. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // When the account's most recent status was posted (ISO 8601 Date). // Example: 2021-07-30 LastStatusAt string `json:"last_status_at,omitempty"` // Account manually approves follow requests. Locked bool `json:"locked,omitempty"` // Bio/description of this account. Note string `json:"note,omitempty"` // Roles lists the public roles of the account on this instance. // Unlike Role, this is always available, but never includes permissions details. // Key/value omitted for remote accounts. Roles []*AccountDisplayRole `json:"roles"` // Number of statuses posted by this account, according to our instance. StatusesCount int64 `json:"statuses_count,omitempty"` // Account has been suspended by our instance. Suspended bool `json:"suspended,omitempty"` // Filename of user-selected CSS theme to include when rendering this account's profile or statuses. Eg., `blurple-light.css`. Theme string `json:"theme,omitempty"` // Web location of the account's profile page. // Example: https://example.org/@some_user URL string `json:"url,omitempty"` // The username of the account, not including domain. // Example: some_user Username string `json:"username,omitempty"` // moved Moved *Account `json:"moved,omitempty"` // role Role *AccountRole `json:"role,omitempty"` // source Source *Source `json:"source,omitempty"` }
Account Account models a fediverse account.
The modelled account can be either a remote account, or one on this instance.
swagger:model Account
func (*Account) ContextValidate ¶
ContextValidate validate this account based on the context it is used
func (*Account) MarshalBinary ¶
MarshalBinary interface implementation
func (*Account) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type AccountDisplayRole ¶
type AccountDisplayRole struct { // Color is a 6-digit CSS-style hex color code with leading `#`, or an empty string if this role has no color. // Since GotoSocial doesn't use role colors, we leave this empty. Color string `json:"color,omitempty"` // ID of the role. // Not used by GotoSocial, but we set it to the role name, just in case a client expects a unique ID. ID string `json:"id,omitempty"` // Name of the role. Name string `json:"name,omitempty"` }
AccountDisplayRole AccountDisplayRole models a public, displayable role of an account.
This is a subset of AccountRole.
swagger:model AccountDisplayRole
func (*AccountDisplayRole) ContextValidate ¶
ContextValidate validates this account display role based on context it is used
func (*AccountDisplayRole) MarshalBinary ¶
func (m *AccountDisplayRole) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AccountDisplayRole) UnmarshalBinary ¶
func (m *AccountDisplayRole) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AccountExportStats ¶
type AccountExportStats struct { // Number of accounts blocked by this account. // Example: 15 BlocksCount int64 `json:"blocks_count,omitempty"` // Number of accounts following this account. // Example: 50 FollowersCount int64 `json:"followers_count,omitempty"` // Number of accounts followed by this account. // Example: 50 FollowingCount int64 `json:"following_count,omitempty"` // Number of lists created by this account. // Example: 10 ListsCount int64 `json:"lists_count,omitempty"` // TODO: String representation of media storage size attributed to this account. // Example: 500MB MediaStorage string `json:"media_storage,omitempty"` // Number of accounts muted by this account. // Example: 11 MutesCount int64 `json:"mutes_count,omitempty"` // Number of statuses created by this account. // Example: 81986 StatusesCount int64 `json:"statuses_count,omitempty"` }
AccountExportStats AccountExportStats models an account's stats specifically for the purpose of informing about export sizes at the /api/v1/exports/stats endpoint.
swagger:model AccountExportStats
func (*AccountExportStats) ContextValidate ¶
ContextValidate validates this account export stats based on context it is used
func (*AccountExportStats) MarshalBinary ¶
func (m *AccountExportStats) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AccountExportStats) UnmarshalBinary ¶
func (m *AccountExportStats) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AccountRole ¶
type AccountRole struct { // Color is a 6-digit CSS-style hex color code with leading `#`, or an empty string if this role has no color. // Since GotoSocial doesn't use role colors, we leave this empty. Color string `json:"color,omitempty"` // Highlighted indicates whether the role is publicly visible on the user profile. // This is always true for GotoSocial's built-in admin and moderator roles, and false otherwise. Highlighted bool `json:"highlighted,omitempty"` // ID of the role. // Not used by GotoSocial, but we set it to the role name, just in case a client expects a unique ID. ID string `json:"id,omitempty"` // Name of the role. Name string `json:"name,omitempty"` // Permissions is a bitmap serialized as a numeric string, indicating which admin/moderation actions a user can perform. Permissions string `json:"permissions,omitempty"` }
AccountRole AccountRole models the role of an account.
swagger:model AccountRole
func (*AccountRole) ContextValidate ¶
ContextValidate validates this account role based on context it is used
func (*AccountRole) MarshalBinary ¶
func (m *AccountRole) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AccountRole) UnmarshalBinary ¶
func (m *AccountRole) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AdminAccountInfo ¶
type AdminAccountInfo struct { // Whether the account is currently approved. Approved bool `json:"approved,omitempty"` // Whether the account has confirmed their email address. Confirmed bool `json:"confirmed,omitempty"` // When the account was first discovered. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // The ID of the application that created this account. CreatedByApplicationID string `json:"created_by_application_id,omitempty"` // Whether the account is currently disabled. Disabled bool `json:"disabled,omitempty"` // The domain of the account. // Null for local accounts. // Example: example.org Domain string `json:"domain,omitempty"` // The email address associated with the account. // Empty string for remote accounts or accounts with // no known email address. // Example: someone@somewhere.com Email string `json:"email,omitempty"` // The ID of the account in the database. // Example: 01GQ4PHNT622DQ9X95XQX4KKNR ID string `json:"id,omitempty"` // The IP address last used to login to this account. // Null if not known. // Example: 192.0.2.1 IP string `json:"ip,omitempty"` // All known IP addresses associated with this account. // NOT IMPLEMENTED (will always be empty array). // Example: [] IPs []interface{} `json:"ips"` // The reason given when signing up. // Null if no reason / remote account. // Example: Pleaaaaaaaaaaaaaaase!! InviteRequest string `json:"invite_request,omitempty"` // The ID of the account that invited this user InvitedByAccountID string `json:"invited_by_account_id,omitempty"` // The locale of the account. (ISO 639 Part 1 two-letter language code) // Example: en Locale string `json:"locale,omitempty"` // Whether the account is currently silenced Silenced bool `json:"silenced,omitempty"` // Whether the account is currently suspended. Suspended bool `json:"suspended,omitempty"` // The username of the account. // Example: dril Username string `json:"username,omitempty"` // account Account *Account `json:"account,omitempty"` // role Role *AccountRole `json:"role,omitempty"` }
AdminAccountInfo AdminAccountInfo models the admin view of an account's details.
swagger:model AdminAccountInfo
func (*AdminAccountInfo) ContextValidate ¶
ContextValidate validate this admin account info based on the context it is used
func (*AdminAccountInfo) MarshalBinary ¶
func (m *AdminAccountInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AdminAccountInfo) UnmarshalBinary ¶
func (m *AdminAccountInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AdminActionResponse ¶
type AdminActionResponse struct { // Internal ID of the action. // Example: 01H9QG6TZ9W5P0402VFRVM17TH ActionID string `json:"action_id,omitempty"` }
AdminActionResponse AdminActionResponse models the server response to an admin action.
swagger:model AdminActionResponse
func (*AdminActionResponse) ContextValidate ¶
ContextValidate validates this admin action response based on context it is used
func (*AdminActionResponse) MarshalBinary ¶
func (m *AdminActionResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AdminActionResponse) UnmarshalBinary ¶
func (m *AdminActionResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AdminEmoji ¶
type AdminEmoji struct { // Used for sorting custom emoji in the picker. // Example: blobcats Category string `json:"category,omitempty"` // The MIME content type of the emoji. // Example: image/png ContentType string `json:"content_type,omitempty"` // True if this emoji has been disabled by an admin action. // Example: false Disabled bool `json:"disabled,omitempty"` // The domain from which the emoji originated. Only defined for remote domains, otherwise key will not be set. // Example: example.org Domain string `json:"domain,omitempty"` // The ID of the emoji. // Example: 01GEM7SFDZ7GZNRXFVZ3X4E4N1 ID string `json:"id,omitempty"` // The name of the custom emoji. // Example: blobcat_uwu Shortcode string `json:"shortcode,omitempty"` // A link to a static copy of the custom emoji. // Example: https://example.org/fileserver/emojis/blogcat_uwu.png StaticURL string `json:"static_url,omitempty"` // The total file size taken up by the emoji in bytes, including static and animated versions. // Example: 69420 TotalFileSize int64 `json:"total_file_size,omitempty"` // The ActivityPub URI of the emoji. // Example: https://example.org/emojis/016T5Q3SQKBT337DAKVSKNXXW1 URI string `json:"uri,omitempty"` // Web URL of the custom emoji. // Example: https://example.org/fileserver/emojis/blogcat_uwu.gif URL string `json:"url,omitempty"` // Time when the emoji image was last updated. // Example: 2022-10-05T09:21:26.419Z UpdatedAt string `json:"updated_at,omitempty"` // Emoji is visible in the emoji picker of the instance. // Example: true VisibleInPicker bool `json:"visible_in_picker,omitempty"` }
AdminEmoji AdminEmoji models the admin view of a custom emoji.
swagger:model AdminEmoji
func (*AdminEmoji) ContextValidate ¶
ContextValidate validates this admin emoji based on context it is used
func (*AdminEmoji) MarshalBinary ¶
func (m *AdminEmoji) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AdminEmoji) UnmarshalBinary ¶
func (m *AdminEmoji) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AdminReport ¶
type AdminReport struct { // Whether an action has been taken by an admin in response to this report. // Example: false ActionTaken bool `json:"action_taken,omitempty"` // If an action was taken, at what time was this done? (ISO 8601 Datetime) // Will be null if not set / no action yet taken. // Example: 2021-07-30T09:20:25+00:00 ActionTakenAt string `json:"action_taken_at,omitempty"` // If an action was taken, what comment was made by the admin on the taken action? // Will be null if not set / no action yet taken. // Example: Account was suspended. ActionTakenComment string `json:"action_taken_comment,omitempty"` // Under what category was this report created? // Example: spam Category string `json:"category,omitempty"` // Comment submitted when the report was created. // Will be empty if no comment was submitted. // Example: This person has been harassing me. Comment string `json:"comment,omitempty"` // The date when this report was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // Bool to indicate that report should be federated to remote instance. // Example: true Forwarded bool `json:"forwarded,omitempty"` // ID of the report. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // Array of rules that were broken according to this report. // Will be empty if no rule IDs were submitted with the report. Rules []*InstanceRule `json:"rules"` // Array of statuses that were submitted along with this report. // Will be empty if no status IDs were submitted with the report. Statuses []*Status `json:"statuses"` // Time of last action on this report (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 UpdatedAt string `json:"updated_at,omitempty"` // account Account *AdminAccountInfo `json:"account,omitempty"` // action taken by account ActionTakenByAccount *AdminAccountInfo `json:"action_taken_by_account,omitempty"` // assigned account AssignedAccount *AdminAccountInfo `json:"assigned_account,omitempty"` // target account TargetAccount *AdminAccountInfo `json:"target_account,omitempty"` }
AdminReport AdminReport models the admin view of a report.
swagger:model AdminReport
func (*AdminReport) ContextValidate ¶
ContextValidate validate this admin report based on the context it is used
func (*AdminReport) MarshalBinary ¶
func (m *AdminReport) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AdminReport) UnmarshalBinary ¶
func (m *AdminReport) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Application ¶
type Application struct { // Client ID associated with this application. ClientID string `json:"client_id,omitempty"` // Client secret associated with this application. ClientSecret string `json:"client_secret,omitempty"` // When the application was created. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // The ID of the application. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // The name of the application. // Example: Tusky Name string `json:"name,omitempty"` // Post-authorization redirect URI for the application (OAuth2). // Example: https://example.org/callback?some=query RedirectURI string `json:"redirect_uri,omitempty"` // Post-authorization redirect URIs for the application (OAuth2). // Example: [https://example.org/callback?some=query] RedirectURIs []string `json:"redirect_uris"` // OAuth scopes for this application. Scopes []string `json:"scopes"` // Push API key for this application. VapidKey string `json:"vapid_key,omitempty"` // The website associated with the application (url) // Example: https://tusky.app Website string `json:"website,omitempty"` }
Application Application models an api application.
swagger:model Application
func (*Application) ContextValidate ¶
ContextValidate validates this application based on context it is used
func (*Application) MarshalBinary ¶
func (m *Application) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Application) UnmarshalBinary ¶
func (m *Application) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Attachment ¶
type Attachment struct { // A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. // See https://github.com/woltapp/blurhash Blurhash string `json:"blurhash,omitempty"` // Alt text that describes what is in the media attachment. // Example: This is a picture of a kitten. Description string `json:"description,omitempty"` // The ID of the attachment. // Example: 01FC31DZT1AYWDZ8XTCRWRBYRK ID string `json:"id,omitempty"` // The location of a scaled-down preview of the attachment on the remote server. // Only defined for instances other than our own. // Example: https://some-other-server.org/attachments/small/ahhhhh.jpeg PreviewRemoteURL string `json:"preview_remote_url,omitempty"` // The location of a scaled-down preview of the attachment. // Example: https://example.org/fileserver/some_id/attachments/some_id/small/attachment.jpeg PreviewURL string `json:"preview_url,omitempty"` // The location of the full-size original attachment on the remote server. // Only defined for instances other than our own. // Example: https://some-other-server.org/attachments/original/ahhhhh.jpeg RemoteURL string `json:"remote_url,omitempty"` // A shorter URL for the attachment. // In our case, we just give the URL again since we don't create smaller URLs. TextURL string `json:"text_url,omitempty"` // The type of the attachment. // Example: image Type string `json:"type,omitempty"` // The location of the original full-size attachment. // Example: https://example.org/fileserver/some_id/attachments/some_id/original/attachment.jpeg URL string `json:"url,omitempty"` // meta Meta *MediaMeta `json:"meta,omitempty"` }
Attachment Attachment models a media attachment.
swagger:model Attachment
func (*Attachment) ContextValidate ¶
ContextValidate validate this attachment based on the context it is used
func (*Attachment) MarshalBinary ¶
func (m *Attachment) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Attachment) UnmarshalBinary ¶
func (m *Attachment) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Card ¶
type Card struct { // The author of the original resource. // Example: weewee@buzzfeed.com AuthorName string `json:"author_name,omitempty"` // A link to the author of the original resource. // Example: https://buzzfeed.com/authors/weewee AuthorURL string `json:"author_url,omitempty"` // A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. Blurhash string `json:"blurhash,omitempty"` // Description of preview. // Example: Is water wet? We're not sure. In this article, we ask an expert... Description string `json:"description,omitempty"` // Used for photo embeds, instead of custom html. EmbedURL string `json:"embed_url,omitempty"` // HTML to be used for generating the preview card. HTML string `json:"html,omitempty"` // Height of preview, in pixels. Height int64 `json:"height,omitempty"` // Preview thumbnail. // Example: https://example.org/fileserver/preview/thumb.jpg Image string `json:"image,omitempty"` // The provider of the original resource. // Example: Buzzfeed ProviderName string `json:"provider_name,omitempty"` // A link to the provider of the original resource. // Example: https://buzzfeed.com ProviderURL string `json:"provider_url,omitempty"` // Title of linked resource. // Example: Buzzfeed - Is Water Wet? Title string `json:"title,omitempty"` // The type of the preview card. // Example: link Type string `json:"type,omitempty"` // Location of linked resource. // Example: https://buzzfeed.com/some/fuckin/buzzfeed/article URL string `json:"url,omitempty"` // Width of preview, in pixels. Width int64 `json:"width,omitempty"` }
Card Card represents a rich preview card that is generated using OpenGraph tags from a URL.
swagger:model Card
func (*Card) ContextValidate ¶
ContextValidate validates this card based on context it is used
func (*Card) MarshalBinary ¶
MarshalBinary interface implementation
func (*Card) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Conversation ¶
type Conversation struct { // Participants in the conversation. // // If this is a conversation between no accounts (ie., a self-directed DM), // this will include only the requesting account itself. Otherwise, it will // include every other account in the conversation *except* the requester. Accounts []*Account `json:"accounts"` // Local database ID of the conversation. ID string `json:"id,omitempty"` // Is the conversation currently marked as unread? Unread bool `json:"unread,omitempty"` // last status LastStatus *Status `json:"last_status,omitempty"` }
Conversation Conversation represents a conversation with "direct message" visibility.
swagger:model Conversation
func (*Conversation) ContextValidate ¶
ContextValidate validate this conversation based on the context it is used
func (*Conversation) MarshalBinary ¶
func (m *Conversation) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Conversation) UnmarshalBinary ¶
func (m *Conversation) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type DebugAPURLResponse ¶
type DebugAPURLResponse struct { // HTTP headers used in the outgoing request. RequestHeaders map[string][]string `json:"request_headers,omitempty"` // Remote AP URL that was requested. RequestURL string `json:"request_url,omitempty"` // Body returned from the remote instance. // Will be stringified bytes; may be JSON, // may be an error, may be both! ResponseBody string `json:"response_body,omitempty"` // HTTP response code returned from the remote instance. ResponseCode int64 `json:"response_code,omitempty"` // HTTP headers returned from the remote instance. ResponseHeaders map[string][]string `json:"response_headers,omitempty"` }
DebugAPURLResponse DebugAPUrlResponse provides detailed debug information for an AP URL dereference request.
swagger:model DebugAPUrlResponse
func (*DebugAPURLResponse) ContextValidate ¶
ContextValidate validates this debug a p Url response based on context it is used
func (*DebugAPURLResponse) MarshalBinary ¶
func (m *DebugAPURLResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DebugAPURLResponse) UnmarshalBinary ¶
func (m *DebugAPURLResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type DefaultPolicies ¶
type DefaultPolicies struct { // direct Direct *InteractionPolicy `json:"direct,omitempty"` // private Private *InteractionPolicy `json:"private,omitempty"` // public Public *InteractionPolicy `json:"public,omitempty"` // unlisted Unlisted *InteractionPolicy `json:"unlisted,omitempty"` }
DefaultPolicies Default interaction policies to use for new statuses by requesting account.
swagger:model DefaultPolicies
func (*DefaultPolicies) ContextValidate ¶
ContextValidate validate this default policies based on the context it is used
func (*DefaultPolicies) MarshalBinary ¶
func (m *DefaultPolicies) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DefaultPolicies) UnmarshalBinary ¶
func (m *DefaultPolicies) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Domain ¶
type Domain struct { // If the domain is blocked, what's the publicly-stated reason for the block. // Alternative to `public_comment` to be used when serializing/deserializing via /api/v1/instance. // Example: they smell Comment string `json:"comment,omitempty"` // The hostname of the domain. // Example: example.org Domain string `json:"domain,omitempty"` // If the domain is blocked, what's the publicly-stated reason for the block. // Alternative to `comment` to be used when serializing/deserializing NOT via /api/v1/instance. // Example: they smell PublicComment string `json:"public_comment,omitempty"` // Time at which this domain was silenced. Key will not be present on open domains. // Example: 2021-07-30T09:20:25+00:00 SilencedAt string `json:"silenced_at,omitempty"` // Time at which this domain was suspended. Key will not be present on open domains. // Example: 2021-07-30T09:20:25+00:00 SuspendedAt string `json:"suspended_at,omitempty"` }
Domain Domain represents a remote domain
swagger:model Domain
func (*Domain) ContextValidate ¶
ContextValidate validates this domain based on context it is used
func (*Domain) MarshalBinary ¶
MarshalBinary interface implementation
func (*Domain) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type DomainPermission ¶
type DomainPermission struct { // If the domain is blocked, what's the publicly-stated reason for the block. // Alternative to `public_comment` to be used when serializing/deserializing via /api/v1/instance. // Example: they smell Comment string `json:"comment,omitempty"` // Time at which the permission entry was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // ID of the account that created this domain permission entry. // Example: 01FBW2758ZB6PBR200YPDDJK4C CreatedBy string `json:"created_by,omitempty"` // The hostname of the domain. // Example: example.org Domain string `json:"domain,omitempty"` // The ID of the domain permission entry. // Example: 01FBW21XJA09XYX51KV5JVBW0F // Read Only: true ID string `json:"id,omitempty"` // Obfuscate the domain name when serving this domain permission entry publicly. // Example: false Obfuscate bool `json:"obfuscate,omitempty"` // Permission type of this entry (block, allow). // Only set for domain permission drafts. PermissionType string `json:"permission_type,omitempty"` // Private comment for this permission entry, visible to this instance's admins only. // Example: they are poopoo PrivateComment string `json:"private_comment,omitempty"` // If the domain is blocked, what's the publicly-stated reason for the block. // Alternative to `comment` to be used when serializing/deserializing NOT via /api/v1/instance. // Example: they smell PublicComment string `json:"public_comment,omitempty"` // Time at which this domain was silenced. Key will not be present on open domains. // Example: 2021-07-30T09:20:25+00:00 SilencedAt string `json:"silenced_at,omitempty"` // If applicable, the ID of the subscription that caused this domain permission entry to be created. // Example: 01FBW25TF5J67JW3HFHZCSD23K SubscriptionID string `json:"subscription_id,omitempty"` // Time at which this domain was suspended. Key will not be present on open domains. // Example: 2021-07-30T09:20:25+00:00 SuspendedAt string `json:"suspended_at,omitempty"` }
DomainPermission DomainPermission represents a permission applied to one domain (explicit block/allow).
swagger:model DomainPermission
func (*DomainPermission) ContextValidate ¶
ContextValidate validate this domain permission based on the context it is used
func (*DomainPermission) MarshalBinary ¶
func (m *DomainPermission) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DomainPermission) UnmarshalBinary ¶
func (m *DomainPermission) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type DomainPermissionSubscription ¶ added in v0.18.0
type DomainPermissionSubscription struct { // If true, this domain permission subscription will "adopt" domain permissions which already exist on the instance, and which meet the following conditions: 1) they have no subscription ID (ie., they're "orphaned") and 2) they are present in the subscribed list. Such orphaned domain permissions will be given this subscription's subscription ID value. // Example: false AdoptOrphans bool `json:"adopt_orphans,omitempty"` // If true, domain permissions arising from this subscription will be created as drafts that must be approved by a moderator to take effect. If false, domain permissions from this subscription will come into force immediately. // Example: true AsDraft bool `json:"as_draft,omitempty"` // MIME content type to use when parsing the permissions list. // Example: text/csv ContentType string `json:"content_type,omitempty"` // Count of domain permission entries discovered at URI on last (successful) fetch. // Example: 53 // Read Only: true Count uint64 `json:"count,omitempty"` // Time at which the subscription was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // ID of the account that created this subscription. // Example: 01FBW21XJA09XYX51KV5JVBW0F // Read Only: true CreatedBy string `json:"created_by,omitempty"` // If most recent fetch attempt failed, this field will contain an error message related to the fetch attempt. // Example: Oopsie doopsie, we made a fucky wucky. // Read Only: true Error string `json:"error,omitempty"` // (Optional) password to set for basic auth when doing a fetch of URI. // Example: admin123 FetchPassword string `json:"fetch_password,omitempty"` // (Optional) username to set for basic auth when doing a fetch of URI. // Example: admin123 FetchUsername string `json:"fetch_username,omitempty"` // Time of the most recent fetch attempt (successful or otherwise) (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 // Read Only: true FetchedAt string `json:"fetched_at,omitempty"` // The ID of the domain permission subscription. // Example: 01FBW21XJA09XYX51KV5JVBW0F // Read Only: true ID string `json:"id,omitempty"` // The type of domain permission subscription (allow, block). // Example: block PermissionType string `json:"permission_type,omitempty"` // Priority of this subscription compared to others of the same permission type. 0-255 (higher = higher priority). // Example: 100 Priority uint8 `json:"priority,omitempty"` // Time of the most recent successful fetch (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 // Read Only: true SuccessfullyFetchedAt string `json:"successfully_fetched_at,omitempty"` // Title of this subscription, as set by admin who created or updated it. // Example: really cool list of neato pals Title string `json:"title,omitempty"` // URI to call in order to fetch the permissions list. // Example: https://www.example.org/blocklists/list1.csv URI string `json:"uri,omitempty"` }
DomainPermissionSubscription DomainPermissionSubscription represents an auto-refreshing subscription to a list of domain permissions (allows, blocks).
swagger:model DomainPermissionSubscription
func (*DomainPermissionSubscription) ContextValidate ¶ added in v0.18.0
func (m *DomainPermissionSubscription) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this domain permission subscription based on the context it is used
func (*DomainPermissionSubscription) MarshalBinary ¶ added in v0.18.0
func (m *DomainPermissionSubscription) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DomainPermissionSubscription) UnmarshalBinary ¶ added in v0.18.0
func (m *DomainPermissionSubscription) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Emoji ¶
type Emoji struct { // Used for sorting custom emoji in the picker. // Example: blobcats Category string `json:"category,omitempty"` // The name of the custom emoji. // Example: blobcat_uwu Shortcode string `json:"shortcode,omitempty"` // A link to a static copy of the custom emoji. // Example: https://example.org/fileserver/emojis/blogcat_uwu.png StaticURL string `json:"static_url,omitempty"` // Web URL of the custom emoji. // Example: https://example.org/fileserver/emojis/blogcat_uwu.gif URL string `json:"url,omitempty"` // Emoji is visible in the emoji picker of the instance. // Example: true VisibleInPicker bool `json:"visible_in_picker,omitempty"` }
Emoji Emoji represents a custom emoji.
swagger:model Emoji
func (*Emoji) ContextValidate ¶
ContextValidate validates this emoji based on context it is used
func (*Emoji) MarshalBinary ¶
MarshalBinary interface implementation
func (*Emoji) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type EmojiCategory ¶
type EmojiCategory struct { // The ID of the custom emoji category. ID string `json:"id,omitempty"` // The name of the custom emoji category. Name string `json:"name,omitempty"` }
EmojiCategory EmojiCategory represents a custom emoji category.
swagger:model EmojiCategory
func (*EmojiCategory) ContextValidate ¶
ContextValidate validates this emoji category based on context it is used
func (*EmojiCategory) MarshalBinary ¶
func (m *EmojiCategory) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EmojiCategory) UnmarshalBinary ¶
func (m *EmojiCategory) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Field ¶
type Field struct { // The key/name of this field. // Example: pronouns Name string `json:"name,omitempty"` // The value of this field. // Example: they/them Value string `json:"value,omitempty"` // If this field has been verified, when did this occur? (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 VerifiedAt string `json:"verified_at,omitempty"` }
Field Field represents a name/value pair to display on an account's profile.
swagger:model Field
func (*Field) ContextValidate ¶
ContextValidate validates this field based on context it is used
func (*Field) MarshalBinary ¶
MarshalBinary interface implementation
func (*Field) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type FilterAction ¶
type FilterAction string
FilterAction FilterAction is the action to apply to statuses matching a filter.
swagger:model FilterAction
func (FilterAction) ContextValidate ¶
ContextValidate validates this filter action based on context it is used
type FilterContext ¶
type FilterContext string
FilterContext FilterContext represents the context in which to apply a filter.
v1 and v2 filter APIs use the same set of contexts.
swagger:model FilterContext
func (FilterContext) ContextValidate ¶
ContextValidate validates this filter context based on context it is used
type FilterKeyword ¶
type FilterKeyword struct { // The ID of the filter keyword entry in the database. ID string `json:"id,omitempty"` // The text to be filtered. // Example: fnord Keyword string `json:"keyword,omitempty"` // Should the filter keyword consider word boundaries? // Example: true WholeWord bool `json:"whole_word,omitempty"` }
FilterKeyword FilterKeyword represents text to filter within a v2 filter.
swagger:model FilterKeyword
func (*FilterKeyword) ContextValidate ¶
ContextValidate validates this filter keyword based on context it is used
func (*FilterKeyword) MarshalBinary ¶
func (m *FilterKeyword) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FilterKeyword) UnmarshalBinary ¶
func (m *FilterKeyword) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FilterResult ¶
type FilterResult struct { // The keywords within the filter that were matched. KeywordMatches []string `json:"keyword_matches"` // The status IDs within the filter that were matched. StatusMatches []string `json:"status_matches"` // filter Filter *FilterV2 `json:"filter,omitempty"` }
FilterResult FilterResult is returned along with a filtered status to explain why it was filtered.
swagger:model FilterResult
func (*FilterResult) ContextValidate ¶
ContextValidate validate this filter result based on the context it is used
func (*FilterResult) MarshalBinary ¶
func (m *FilterResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FilterResult) UnmarshalBinary ¶
func (m *FilterResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FilterStatus ¶
type FilterStatus struct { // The ID of the filter status entry in the database. ID string `json:"id,omitempty"` // The status ID to be filtered. StatusID string `json:"phrase,omitempty"` }
FilterStatus FilterStatus represents a single status to filter within a v2 filter.
swagger:model FilterStatus
func (*FilterStatus) ContextValidate ¶
ContextValidate validates this filter status based on context it is used
func (*FilterStatus) MarshalBinary ¶
func (m *FilterStatus) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FilterStatus) UnmarshalBinary ¶
func (m *FilterStatus) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FilterV1 ¶
type FilterV1 struct { // The contexts in which the filter should be applied. // Example: ["home","public"] // Min Items: 1 // Unique: true Context []FilterContext `json:"context"` // When the filter should no longer be applied. Null if the filter does not expire. // Example: 2024-02-01T02:57:49Z ExpiresAt string `json:"expires_at,omitempty"` // The ID of the filter in the database. ID string `json:"id,omitempty"` // Should matching entities be removed from the user's timelines/views, instead of hidden? // Example: false Irreversible bool `json:"irreversible,omitempty"` // The text to be filtered. // Example: fnord Phrase string `json:"phrase,omitempty"` // Should the filter consider word boundaries? // Example: true WholeWord bool `json:"whole_word,omitempty"` }
FilterV1 FilterV1 represents a user-defined filter for determining which statuses should not be shown to the user.
Note that v1 filters are mapped to v2 filters and v2 filter keywords internally. If whole_word is true, client app should do: Define ‘word constituent character’ for your app. In the official implementation, it’s [A-Za-z0-9_] in JavaScript, and [[:word:]] in Ruby. Ruby uses the POSIX character class (Letter | Mark | Decimal_Number | Connector_Punctuation). If the phrase starts with a word character, and if the previous character before matched range is a word character, its matched range should be treated to not match. If the phrase ends with a word character, and if the next character after matched range is a word character, its matched range should be treated to not match. Please check app/javascript/mastodon/selectors/index.js and app/lib/feed_manager.rb in the Mastodon source code for more details.
swagger:model FilterV1
func (*FilterV1) ContextValidate ¶
ContextValidate validate this filter v1 based on the context it is used
func (*FilterV1) MarshalBinary ¶
MarshalBinary interface implementation
func (*FilterV1) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type FilterV2 ¶
type FilterV2 struct { // The contexts in which the filter should be applied. // Example: ["home","public"] // Min Items: 1 // Unique: true Context []FilterContext `json:"context"` // When the filter should no longer be applied. Null if the filter does not expire. // Example: 2024-02-01T02:57:49Z ExpiresAt string `json:"expires_at,omitempty"` // The ID of the filter in the database. ID string `json:"id,omitempty"` // The keywords grouped under this filter. Keywords []*FilterKeyword `json:"keywords"` // The statuses grouped under this filter. Statuses []*FilterStatus `json:"statuses"` // The name of the filter. // Example: Linux Words Title string `json:"title,omitempty"` // filter action FilterAction FilterAction `json:"filter_action,omitempty"` }
FilterV2 FilterV2 represents a user-defined filter for determining which statuses should not be shown to the user.
v2 filters have names and can include multiple phrases and status IDs to filter.
swagger:model FilterV2
func (*FilterV2) ContextValidate ¶
ContextValidate validate this filter v2 based on the context it is used
func (*FilterV2) MarshalBinary ¶
MarshalBinary interface implementation
func (*FilterV2) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type HeaderFilter ¶
type HeaderFilter struct { // Time at which the header filter was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 // Read Only: true CreatedAt string `json:"created_at,omitempty"` // The ID of the admin account that created this header filter. // Example: 01FBW2758ZB6PBR200YPDDJK4C // Read Only: true CreatedBy string `json:"created_by,omitempty"` // The HTTP header to match against. // Example: User-Agent Header string `json:"header,omitempty"` // The ID of the header filter. // Example: 01FBW21XJA09XYX51KV5JVBW0F // Read Only: true ID string `json:"id,omitempty"` // The header value matching regular expression. // Example: .*Firefox.* Regex string `json:"regex,omitempty"` }
HeaderFilter HeaderFilter represents a regex value filter applied to one particular HTTP header (allow / block).
swagger:model HeaderFilter
func (*HeaderFilter) ContextValidate ¶
ContextValidate validate this header filter based on the context it is used
func (*HeaderFilter) MarshalBinary ¶
func (m *HeaderFilter) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HeaderFilter) UnmarshalBinary ¶
func (m *HeaderFilter) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HostMeta ¶
type HostMeta struct { // link Link []*Link `json:"Link"` // XML n s XMLNS string `json:"XMLNS,omitempty"` // XML name XMLName interface{} `json:"XMLName,omitempty"` }
HostMeta HostMeta represents a hostmeta document.
See: https://www.rfc-editor.org/rfc/rfc6415.html#section-3
swagger:model HostMeta
func (*HostMeta) ContextValidate ¶
ContextValidate validate this host meta based on the context it is used
func (*HostMeta) MarshalBinary ¶
MarshalBinary interface implementation
func (*HostMeta) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type InstanceConfigurationAccounts ¶
type InstanceConfigurationAccounts struct { // Whether or not accounts on this instance are allowed to upload custom CSS for profiles and statuses. // Example: false AllowCustomCSS bool `json:"allow_custom_css,omitempty"` // The maximum number of featured tags allowed for each account. // Currently not implemented, so this is hardcoded to 10. MaxFeaturedTags int64 `json:"max_featured_tags,omitempty"` // The maximum number of profile fields allowed for each account. // Currently not configurable, so this is hardcoded to 6. (https://github.com/superseriousbusiness/gotosocial/issues/1876) MaxProfileFields int64 `json:"max_profile_fields,omitempty"` }
InstanceConfigurationAccounts InstanceConfigurationAccounts models instance account config parameters.
swagger:model InstanceConfigurationAccounts
func (*InstanceConfigurationAccounts) ContextValidate ¶
func (m *InstanceConfigurationAccounts) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance configuration accounts based on context it is used
func (*InstanceConfigurationAccounts) MarshalBinary ¶
func (m *InstanceConfigurationAccounts) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceConfigurationAccounts) UnmarshalBinary ¶
func (m *InstanceConfigurationAccounts) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceConfigurationEmojis ¶
type InstanceConfigurationEmojis struct { // Max allowed emoji image size in bytes. // Example: 51200 EmojiSizeLimit int64 `json:"emoji_size_limit,omitempty"` }
InstanceConfigurationEmojis InstanceConfigurationEmojis models instance emoji config parameters.
swagger:model InstanceConfigurationEmojis
func (*InstanceConfigurationEmojis) ContextValidate ¶
func (m *InstanceConfigurationEmojis) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance configuration emojis based on context it is used
func (*InstanceConfigurationEmojis) MarshalBinary ¶
func (m *InstanceConfigurationEmojis) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceConfigurationEmojis) UnmarshalBinary ¶
func (m *InstanceConfigurationEmojis) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceConfigurationMediaAttachments ¶
type InstanceConfigurationMediaAttachments struct { // Max allowed image size in pixels as height*width. // // GtS doesn't set a limit on this, but for compatibility // we give Mastodon's 4096x4096px value here. // Example: 16777216 ImageMatrixLimit int64 `json:"image_matrix_limit,omitempty"` // Max allowed image size in bytes // Example: 2097152 ImageSizeLimit int64 `json:"image_size_limit,omitempty"` // List of mime types that it's possible to upload to this instance. // Example: ["image/jpeg","image/gif"] SupportedMimeTypes []string `json:"supported_mime_types"` // Max allowed video frame rate. // Example: 60 VideoFrameRateLimit int64 `json:"video_frame_rate_limit,omitempty"` // Max allowed video size in pixels as height*width. // // GtS doesn't set a limit on this, but for compatibility // we give Mastodon's 4096x4096px value here. // Example: 16777216 VideoMatrixLimit int64 `json:"video_matrix_limit,omitempty"` // Max allowed video size in bytes // Example: 10485760 VideoSizeLimit int64 `json:"video_size_limit,omitempty"` }
InstanceConfigurationMediaAttachments InstanceConfigurationMediaAttachments models instance media attachment config parameters.
swagger:model InstanceConfigurationMediaAttachments
func (*InstanceConfigurationMediaAttachments) ContextValidate ¶
func (m *InstanceConfigurationMediaAttachments) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance configuration media attachments based on context it is used
func (*InstanceConfigurationMediaAttachments) MarshalBinary ¶
func (m *InstanceConfigurationMediaAttachments) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceConfigurationMediaAttachments) UnmarshalBinary ¶
func (m *InstanceConfigurationMediaAttachments) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceConfigurationPolls ¶
type InstanceConfigurationPolls struct { // Number of characters allowed per option in the poll. // Example: 50 MaxCharactersPerOption int64 `json:"max_characters_per_option,omitempty"` // Maximum expiration time of the poll in seconds. // Example: 2629746 MaxExpiration int64 `json:"max_expiration,omitempty"` // Number of options permitted in a poll on this instance. // Example: 4 MaxOptions int64 `json:"max_options,omitempty"` // Minimum expiration time of the poll in seconds. // Example: 300 MinExpiration int64 `json:"min_expiration,omitempty"` }
InstanceConfigurationPolls InstanceConfigurationPolls models instance poll config parameters.
swagger:model InstanceConfigurationPolls
func (*InstanceConfigurationPolls) ContextValidate ¶
func (m *InstanceConfigurationPolls) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance configuration polls based on context it is used
func (*InstanceConfigurationPolls) MarshalBinary ¶
func (m *InstanceConfigurationPolls) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceConfigurationPolls) UnmarshalBinary ¶
func (m *InstanceConfigurationPolls) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceConfigurationStatuses ¶
type InstanceConfigurationStatuses struct { // Amount of characters clients should assume a url takes up. // Example: 25 CharactersReservedPerURL int64 `json:"characters_reserved_per_url,omitempty"` // Maximum allowed length of a post on this instance, in characters. // Example: 5000 MaxCharacters int64 `json:"max_characters,omitempty"` // Max number of attachments allowed on a status. // Example: 4 MaxMediaAttachments int64 `json:"max_media_attachments,omitempty"` // List of mime types that it's possible to use for statuses on this instance. // Example: ["text/plain","text/markdown"] SupportedMimeTypes []string `json:"supported_mime_types"` }
InstanceConfigurationStatuses InstanceConfigurationStatuses models instance status config parameters.
swagger:model InstanceConfigurationStatuses
func (*InstanceConfigurationStatuses) ContextValidate ¶
func (m *InstanceConfigurationStatuses) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance configuration statuses based on context it is used
func (*InstanceConfigurationStatuses) MarshalBinary ¶
func (m *InstanceConfigurationStatuses) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceConfigurationStatuses) UnmarshalBinary ¶
func (m *InstanceConfigurationStatuses) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceRule ¶
type InstanceRule struct { // ID ID string `json:"id,omitempty"` // text Text string `json:"text,omitempty"` }
InstanceRule InstanceRule represents a single instance rule.
swagger:model InstanceRule
func (*InstanceRule) ContextValidate ¶
ContextValidate validates this instance rule based on context it is used
func (*InstanceRule) MarshalBinary ¶
func (m *InstanceRule) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceRule) UnmarshalBinary ¶
func (m *InstanceRule) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV1 ¶
type InstanceV1 struct { // The domain of accounts on this instance. // This will not necessarily be the same as // simply the Host part of the URI. // Example: example.org AccountDomain string `json:"account_domain,omitempty"` // New account registrations require admin approval. ApprovalRequired bool `json:"approval_required,omitempty"` // Custom CSS for the instance. CustomCSS string `json:"custom_css,omitempty"` // Whether or not instance is running in DEBUG mode. Omitted if false. Debug bool `json:"debug,omitempty"` // Description of the instance. // // Should be HTML formatted, but might be plaintext. // // This should be displayed on the 'about' page for an instance. Description string `json:"description,omitempty"` // Raw (unparsed) version of description. DescriptionText string `json:"description_text,omitempty"` // An email address that may be used for inquiries. // Example: admin@example.org Email string `json:"email,omitempty"` // Invites are enabled on this instance. InvitesEnabled bool `json:"invites_enabled,omitempty"` // Primary language of the instance. // Example: ["en"] Languages []string `json:"languages"` // Maximum allowed length of a post on this instance, in characters. // // This is provided for compatibility with Tusky and other apps. // Example: 5000 MaxTootChars uint64 `json:"max_toot_chars,omitempty"` // New account registrations are enabled on this instance. Registrations bool `json:"registrations,omitempty"` // An itemized list of rules for this instance. Rules []*InstanceRule `json:"rules"` // A shorter description of the instance. // // Should be HTML formatted, but might be plaintext. // // This should be displayed on the instance splash/landing page. ShortDescription string `json:"short_description,omitempty"` // Raw (unparsed) version of short description. ShortDescriptionText string `json:"short_description_text,omitempty"` // Statistics about the instance: number of posts, accounts, etc. // Values are pointers because we don't want to skip 0 values when // rendering stats via web templates. Stats map[string]int64 `json:"stats,omitempty"` // Terms and conditions for accounts on this instance. Terms string `json:"terms,omitempty"` // Raw (unparsed) version of terms. TermsRaw string `json:"terms_text,omitempty"` // URL of the instance avatar/banner image. // Example: https://example.org/files/instance/thumbnail.jpeg Thumbnail string `json:"thumbnail,omitempty"` // Description of the instance thumbnail. // Example: picture of a cute lil' friendly sloth ThumbnailDescription string `json:"thumbnail_description,omitempty"` // URL of the static instance avatar/banner image. // Example: https://example.org/files/instance/static/thumbnail.webp ThumbnailStatic string `json:"thumbnail_static,omitempty"` // MIME type of the static instance thumbnail. // Example: image/webp ThumbnailStaticType string `json:"thumbnail_static_type,omitempty"` // MIME type of the instance thumbnail. // Example: image/png ThumbnailType string `json:"thumbnail_type,omitempty"` // The title of the instance. // Example: GoToSocial Example Instance Title string `json:"title,omitempty"` // The URI of the instance. // Example: https://gts.example.org URI string `json:"uri,omitempty"` // The version of GoToSocial installed on the instance. // // This will contain at least a semantic version number. // // It may also contain, after a space, the short git commit ID of the running software. // Example: 0.1.1 cb85f65 Version string `json:"version,omitempty"` // configuration Configuration *InstanceV1Configuration `json:"configuration,omitempty"` // contact account ContactAccount *Account `json:"contact_account,omitempty"` // urls Urls *InstanceV1URLs `json:"urls,omitempty"` }
InstanceV1 InstanceV1 models information about this instance.
swagger:model InstanceV1
func (*InstanceV1) ContextValidate ¶
ContextValidate validate this instance v1 based on the context it is used
func (*InstanceV1) MarshalBinary ¶
func (m *InstanceV1) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV1) UnmarshalBinary ¶
func (m *InstanceV1) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV1Configuration ¶
type InstanceV1Configuration struct { // True if instance is running with OIDC as auth/identity backend, else omitted. OIDCEnabled bool `json:"oidc_enabled,omitempty"` // accounts Accounts *InstanceConfigurationAccounts `json:"accounts,omitempty"` // emojis Emojis *InstanceConfigurationEmojis `json:"emojis,omitempty"` // media attachments MediaAttachments *InstanceConfigurationMediaAttachments `json:"media_attachments,omitempty"` // polls Polls *InstanceConfigurationPolls `json:"polls,omitempty"` // statuses Statuses *InstanceConfigurationStatuses `json:"statuses,omitempty"` }
InstanceV1Configuration InstanceV1Configuration models instance configuration parameters.
swagger:model InstanceV1Configuration
func (*InstanceV1Configuration) ContextValidate ¶
func (m *InstanceV1Configuration) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this instance v1 configuration based on the context it is used
func (*InstanceV1Configuration) MarshalBinary ¶
func (m *InstanceV1Configuration) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV1Configuration) UnmarshalBinary ¶
func (m *InstanceV1Configuration) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV1URLs ¶
type InstanceV1URLs struct { // Websockets address for status and notification streaming. // Example: wss://example.org StreamingAPI string `json:"streaming_api,omitempty"` }
InstanceV1URLs InstanceV1URLs models instance-relevant URLs for client application consumption.
swagger:model InstanceV1URLs
func (*InstanceV1URLs) ContextValidate ¶
ContextValidate validates this instance v1 u r ls based on context it is used
func (*InstanceV1URLs) MarshalBinary ¶
func (m *InstanceV1URLs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV1URLs) UnmarshalBinary ¶
func (m *InstanceV1URLs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2 ¶
type InstanceV2 struct { // The domain of accounts on this instance. // This will not necessarily be the same as // domain. // Example: example.org AccountDomain string `json:"account_domain,omitempty"` // Instance Custom Css CustomCSS string `json:"custom_css,omitempty"` // Whether or not instance is running in DEBUG mode. Omitted if false. Debug bool `json:"debug,omitempty"` // Description of the instance. // // Should be HTML formatted, but might be plaintext. // // This should be displayed on the 'about' page for an instance. Description string `json:"description,omitempty"` // Raw (unparsed) version of description. DescriptionText string `json:"description_text,omitempty"` // The domain of the instance. // Example: gts.example.org Domain string `json:"domain,omitempty"` // Primary languages of the instance + moderators/admins. // Example: ["en"] Languages []string `json:"languages"` // An itemized list of rules for this instance. Rules []*InstanceRule `json:"rules"` // The URL for the source code of the software running on this instance, in keeping with AGPL license requirements. // Example: https://github.com/superseriousbusiness/gotosocial SourceURL string `json:"source_url,omitempty"` // Terms and conditions for accounts on this instance. Terms string `json:"terms,omitempty"` // Raw (unparsed) version of terms. TermsText string `json:"terms_text,omitempty"` // The title of the instance. // Example: GoToSocial Example Instance Title string `json:"title,omitempty"` // The version of GoToSocial installed on the instance. // // This will contain at least a semantic version number. // // It may also contain, after a space, the short git commit ID of the running software. // Example: 0.1.1 cb85f65 Version string `json:"version,omitempty"` // configuration Configuration *InstanceV2Configuration `json:"configuration,omitempty"` // contact Contact *InstanceV2Contact `json:"contact,omitempty"` // registrations Registrations *InstanceV2Registrations `json:"registrations,omitempty"` // thumbnail Thumbnail *InstanceV2Thumbnail `json:"thumbnail,omitempty"` // usage Usage *InstanceV2Usage `json:"usage,omitempty"` }
InstanceV2 InstanceV2 models information about this instance.
swagger:model InstanceV2
func (*InstanceV2) ContextValidate ¶
ContextValidate validate this instance v2 based on the context it is used
func (*InstanceV2) MarshalBinary ¶
func (m *InstanceV2) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2) UnmarshalBinary ¶
func (m *InstanceV2) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2Configuration ¶
type InstanceV2Configuration struct { // True if instance is running with OIDC as auth/identity backend, else omitted. OIDCEnabled bool `json:"oidc_enabled,omitempty"` // accounts Accounts *InstanceConfigurationAccounts `json:"accounts,omitempty"` // emojis Emojis *InstanceConfigurationEmojis `json:"emojis,omitempty"` // media attachments MediaAttachments *InstanceConfigurationMediaAttachments `json:"media_attachments,omitempty"` // polls Polls *InstanceConfigurationPolls `json:"polls,omitempty"` // statuses Statuses *InstanceConfigurationStatuses `json:"statuses,omitempty"` // translation Translation *InstanceV2ConfigurationTranslation `json:"translation,omitempty"` // urls Urls *InstanceV2URLs `json:"urls,omitempty"` // vapid Vapid *InstanceV2ConfigurationVAPID `json:"vapid,omitempty"` }
InstanceV2Configuration Configured values and limits for this instance.
swagger:model InstanceV2Configuration
func (*InstanceV2Configuration) ContextValidate ¶
func (m *InstanceV2Configuration) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this instance v2 configuration based on the context it is used
func (*InstanceV2Configuration) MarshalBinary ¶
func (m *InstanceV2Configuration) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2Configuration) UnmarshalBinary ¶
func (m *InstanceV2Configuration) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2ConfigurationTranslation ¶
type InstanceV2ConfigurationTranslation struct { // Whether the Translations API is available on this instance. // Not implemented so this value is always false. Enabled bool `json:"enabled,omitempty"` }
InstanceV2ConfigurationTranslation Hints related to translation.
swagger:model InstanceV2ConfigurationTranslation
func (*InstanceV2ConfigurationTranslation) ContextValidate ¶
func (m *InstanceV2ConfigurationTranslation) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance v2 configuration translation based on context it is used
func (*InstanceV2ConfigurationTranslation) MarshalBinary ¶
func (m *InstanceV2ConfigurationTranslation) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2ConfigurationTranslation) UnmarshalBinary ¶
func (m *InstanceV2ConfigurationTranslation) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2ConfigurationVAPID ¶ added in v0.18.0
type InstanceV2ConfigurationVAPID struct { // The instance's VAPID public key, Base64-encoded. PublicKey string `json:"public_key,omitempty"` }
InstanceV2ConfigurationVAPID InstanceV2ConfigurationVAPID holds the instance's VAPID configuration.
swagger:model InstanceV2ConfigurationVAPID
func (*InstanceV2ConfigurationVAPID) ContextValidate ¶ added in v0.18.0
func (m *InstanceV2ConfigurationVAPID) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance v2 configuration v API d based on context it is used
func (*InstanceV2ConfigurationVAPID) MarshalBinary ¶ added in v0.18.0
func (m *InstanceV2ConfigurationVAPID) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2ConfigurationVAPID) UnmarshalBinary ¶ added in v0.18.0
func (m *InstanceV2ConfigurationVAPID) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2Contact ¶
type InstanceV2Contact struct { // An email address that can be messaged regarding inquiries or issues. // Empty string if no email address set. // Example: someone@example.org Email string `json:"email,omitempty"` // account Account *Account `json:"account,omitempty"` }
InstanceV2Contact Hints related to contacting a representative of the instance.
swagger:model InstanceV2Contact
func (*InstanceV2Contact) ContextValidate ¶
ContextValidate validate this instance v2 contact based on the context it is used
func (*InstanceV2Contact) MarshalBinary ¶
func (m *InstanceV2Contact) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2Contact) UnmarshalBinary ¶
func (m *InstanceV2Contact) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2Registrations ¶
type InstanceV2Registrations struct { // Whether registrations require moderator approval. // Example: true ApprovalRequired bool `json:"approval_required,omitempty"` // Whether registrations are enabled. // Example: false Enabled bool `json:"enabled,omitempty"` // A custom message (html string) to be shown when registrations are closed. // Value will be null if no message is set. // Example: \u003cp\u003eRegistrations are currently closed on example.org because of spam bots!\u003c/p\u003e Message string `json:"message,omitempty"` }
InstanceV2Registrations Information about registering for this instance.
swagger:model InstanceV2Registrations
func (*InstanceV2Registrations) ContextValidate ¶
func (m *InstanceV2Registrations) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance v2 registrations based on context it is used
func (*InstanceV2Registrations) MarshalBinary ¶
func (m *InstanceV2Registrations) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2Registrations) UnmarshalBinary ¶
func (m *InstanceV2Registrations) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2Thumbnail ¶
type InstanceV2Thumbnail struct { // A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. // Key/value not set if no blurhash available. // Example: UeKUpFxuo~R%0nW;WCnhF6RjaJt757oJodS$ Blurhash string `json:"blurhash,omitempty"` // Description of the instance thumbnail. // Key/value not set if no description available. // Example: picture of a cute lil' friendly sloth Description string `json:"thumbnail_description,omitempty"` // MIME type of the instance thumbnail. // Key/value not set if thumbnail image type unknown. // Example: image/png StaticType string `json:"thumbnail_static_type,omitempty"` // StaticURL version of the thumbnail image. // Example: https://example.org/fileserver/01BPSX2MKCRVMD4YN4D71G9CP5/attachment/static/01H88X0KQ2DFYYDSWYP93VDJZA.webp StaticURL string `json:"static_url,omitempty"` // MIME type of the instance thumbnail. // Key/value not set if thumbnail image type unknown. // Example: image/png Type string `json:"thumbnail_type,omitempty"` // The URL for the thumbnail image. // Example: https://example.org/fileserver/01BPSX2MKCRVMD4YN4D71G9CP5/attachment/original/01H88X0KQ2DFYYDSWYP93VDJZA.png URL string `json:"url,omitempty"` // versions Versions *InstanceV2ThumbnailVersions `json:"versions,omitempty"` }
InstanceV2Thumbnail An image used to represent this instance.
swagger:model InstanceV2Thumbnail
func (*InstanceV2Thumbnail) ContextValidate ¶
ContextValidate validate this instance v2 thumbnail based on the context it is used
func (*InstanceV2Thumbnail) MarshalBinary ¶
func (m *InstanceV2Thumbnail) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2Thumbnail) UnmarshalBinary ¶
func (m *InstanceV2Thumbnail) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2ThumbnailVersions ¶
type InstanceV2ThumbnailVersions struct { // The URL for the thumbnail image at 1x resolution. // Key/value not set if scaled versions not available. Size1URL string `json:"@1x,omitempty"` // The URL for the thumbnail image at 2x resolution. // Key/value not set if scaled versions not available. Size2URL string `json:"@2x,omitempty"` }
InstanceV2ThumbnailVersions Links to scaled resolution images, for high DPI screens.
swagger:model InstanceV2ThumbnailVersions
func (*InstanceV2ThumbnailVersions) ContextValidate ¶
func (m *InstanceV2ThumbnailVersions) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this instance v2 thumbnail versions based on context it is used
func (*InstanceV2ThumbnailVersions) MarshalBinary ¶
func (m *InstanceV2ThumbnailVersions) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2ThumbnailVersions) UnmarshalBinary ¶
func (m *InstanceV2ThumbnailVersions) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2URLs ¶
type InstanceV2URLs struct { // Websockets address for status and notification streaming. // Example: wss://example.org Streaming string `json:"streaming,omitempty"` }
InstanceV2URLs InstanceV2URLs models instance-relevant URLs for client application consumption.
swagger:model InstanceV2URLs
func (*InstanceV2URLs) ContextValidate ¶
ContextValidate validates this instance v2 u r ls based on context it is used
func (*InstanceV2URLs) MarshalBinary ¶
func (m *InstanceV2URLs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2URLs) UnmarshalBinary ¶
func (m *InstanceV2URLs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2Usage ¶
type InstanceV2Usage struct { // users Users *InstanceV2Users `json:"users,omitempty"` }
InstanceV2Usage Usage data for this instance.
swagger:model InstanceV2Usage
func (*InstanceV2Usage) ContextValidate ¶
ContextValidate validate this instance v2 usage based on the context it is used
func (*InstanceV2Usage) MarshalBinary ¶
func (m *InstanceV2Usage) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2Usage) UnmarshalBinary ¶
func (m *InstanceV2Usage) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceV2Users ¶
type InstanceV2Users struct { // The number of active users in the past 4 weeks. // Currently not implemented: will always be 0. // Example: 0 ActiveMonth int64 `json:"active_month,omitempty"` }
InstanceV2Users Usage data related to users on this instance.
swagger:model InstanceV2Users
func (*InstanceV2Users) ContextValidate ¶
ContextValidate validates this instance v2 users based on context it is used
func (*InstanceV2Users) MarshalBinary ¶
func (m *InstanceV2Users) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceV2Users) UnmarshalBinary ¶
func (m *InstanceV2Users) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InteractionPolicy ¶
type InteractionPolicy struct { // can favourite CanFavourite *PolicyRules `json:"can_favourite,omitempty"` // can reblog CanReblog *PolicyRules `json:"can_reblog,omitempty"` // can reply CanReply *PolicyRules `json:"can_reply,omitempty"` }
InteractionPolicy Interaction policy of a status.
swagger:model InteractionPolicy
func (*InteractionPolicy) ContextValidate ¶
ContextValidate validate this interaction policy based on the context it is used
func (*InteractionPolicy) MarshalBinary ¶
func (m *InteractionPolicy) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InteractionPolicy) UnmarshalBinary ¶
func (m *InteractionPolicy) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InteractionRequest ¶
type InteractionRequest struct { // The timestamp that the interaction request was accepted (ISO 8601 Datetime). Field omitted if request not accepted (yet). AcceptedAt string `json:"accepted_at,omitempty"` // The timestamp of the interaction request (ISO 8601 Datetime) CreatedAt string `json:"created_at,omitempty"` // The id of the interaction request in the database. ID string `json:"id,omitempty"` // The timestamp that the interaction request was rejected (ISO 8601 Datetime). Field omitted if request not rejected (yet). RejectedAt string `json:"rejected_at,omitempty"` // The type of interaction that this interaction request pertains to. // // `favourite` - Someone favourited a status. // `reply` - Someone replied to a status. // `reblog` - Someone reblogged / boosted a status. Type string `json:"type,omitempty"` // URI of the Accept or Reject. Only set if accepted_at or rejected_at is set, else omitted. URI string `json:"uri,omitempty"` // account Account *Account `json:"account,omitempty"` // reply Reply *Status `json:"reply,omitempty"` // status Status *Status `json:"status,omitempty"` }
InteractionRequest InteractionRequest represents a pending, approved, or rejected interaction of type favourite, reply, or reblog.
swagger:model InteractionRequest
func (*InteractionRequest) ContextValidate ¶
ContextValidate validate this interaction request based on the context it is used
func (*InteractionRequest) MarshalBinary ¶
func (m *InteractionRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InteractionRequest) UnmarshalBinary ¶
func (m *InteractionRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Link ¶
type Link struct { // href Href string `json:"href,omitempty"` // rel Rel string `json:"rel,omitempty"` // template Template string `json:"template,omitempty"` // type Type string `json:"type,omitempty"` }
Link Link represents one 'link' in a slice of links returned from a lookup request.
See https://webfinger.net/ and https://www.rfc-editor.org/rfc/rfc6415.html#section-3.1
swagger:model Link
func (*Link) ContextValidate ¶
ContextValidate validates this link based on context it is used
func (*Link) MarshalBinary ¶
MarshalBinary interface implementation
func (*Link) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type List ¶
type List struct { // Exclusive setting for this list. // If true, hide posts from members of this list from your home timeline. Exclusive bool `json:"exclusive,omitempty"` // The ID of the list. ID string `json:"id,omitempty"` // RepliesPolicy for this list. // followed = Show replies to any followed user // list = Show replies to members of the list // none = Show replies to no one RepliesPolicy string `json:"replies_policy,omitempty"` // The user-defined title of the list. Title string `json:"title,omitempty"` }
List List represents a user-created list of accounts that the user follows.
swagger:model List
func (*List) ContextValidate ¶
ContextValidate validates this list based on context it is used
func (*List) MarshalBinary ¶
MarshalBinary interface implementation
func (*List) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Marker ¶
type Marker struct { // home Home *TimelineMarker `json:"home,omitempty"` // notifications Notifications *TimelineMarker `json:"notifications,omitempty"` }
Marker Marker represents the last read position within a user's timelines.
swagger:model Marker
func (*Marker) ContextValidate ¶
ContextValidate validate this marker based on the context it is used
func (*Marker) MarshalBinary ¶
MarshalBinary interface implementation
func (*Marker) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type MediaDimensions ¶
type MediaDimensions struct { // Aspect ratio of the media. // Equal to width / height. // Example: 1.777777778 Aspect float32 `json:"aspect,omitempty"` // Bitrate of the media in bits per second. // Example: 1000000 Bitrate uint64 `json:"bitrate,omitempty"` // Duration of the media in seconds. // Only set for video and audio. // Example: 5.43 Duration float32 `json:"duration,omitempty"` // Framerate of the media. // Only set for video and gifs. // Example: 30 FrameRate string `json:"frame_rate,omitempty"` // Height of the media in pixels. // Not set for audio. // Example: 1080 Height int64 `json:"height,omitempty"` // Size of the media, in the format `[width]x[height]`. // Not set for audio. // Example: 1920x1080 Size string `json:"size,omitempty"` // Width of the media in pixels. // Not set for audio. // Example: 1920 Width int64 `json:"width,omitempty"` }
MediaDimensions MediaDimensions models detailed properties of a piece of media.
swagger:model MediaDimensions
func (*MediaDimensions) ContextValidate ¶
ContextValidate validates this media dimensions based on context it is used
func (*MediaDimensions) MarshalBinary ¶
func (m *MediaDimensions) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MediaDimensions) UnmarshalBinary ¶
func (m *MediaDimensions) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MediaFocus ¶
type MediaFocus struct { // x position of the focus // should be between -1 and 1 X float32 `json:"x,omitempty"` // y position of the focus // should be between -1 and 1 Y float32 `json:"y,omitempty"` }
MediaFocus MediaFocus models the focal point of a piece of media.
swagger:model MediaFocus
func (*MediaFocus) ContextValidate ¶
ContextValidate validates this media focus based on context it is used
func (*MediaFocus) MarshalBinary ¶
func (m *MediaFocus) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MediaFocus) UnmarshalBinary ¶
func (m *MediaFocus) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MediaMeta ¶
type MediaMeta struct { // focus Focus *MediaFocus `json:"focus,omitempty"` // original Original *MediaDimensions `json:"original,omitempty"` // small Small *MediaDimensions `json:"small,omitempty"` }
MediaMeta MediaMeta models media metadata.
This can be metadata about an image, an audio file, video, etc.
swagger:model MediaMeta
func (*MediaMeta) ContextValidate ¶
ContextValidate validate this media meta based on the context it is used
func (*MediaMeta) MarshalBinary ¶
MarshalBinary interface implementation
func (*MediaMeta) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Mention ¶
type Mention struct { // The account URI as discovered via webfinger. // Equal to username for local users, or username@domain for remote users. // Example: some_user@example.org Acct string `json:"acct,omitempty"` // The ID of the mentioned account. // Example: 01FBYJHQWQZAVWFRK9PDYTKGMB ID string `json:"id,omitempty"` // The web URL of the mentioned account's profile. // Example: https://example.org/@some_user URL string `json:"url,omitempty"` // The username of the mentioned account. // Example: some_user Username string `json:"username,omitempty"` }
Mention Mention represents a mention of another account.
swagger:model Mention
func (*Mention) ContextValidate ¶
ContextValidate validates this mention based on context it is used
func (*Mention) MarshalBinary ¶
MarshalBinary interface implementation
func (*Mention) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type MutedAccount ¶
type MutedAccount struct { // The account URI as discovered via webfinger. // Equal to username for local users, or username@domain for remote users. // Example: some_user@example.org Acct string `json:"acct,omitempty"` // Web location of the account's avatar. // Example: https://example.org/media/some_user/avatar/original/avatar.jpeg Avatar string `json:"avatar,omitempty"` // Description of this account's avatar, for alt text. // Example: A cute drawing of a smiling sloth. AvatarDescription string `json:"avatar_description,omitempty"` // Database ID of the media attachment for this account's avatar image. // Omitted if no avatar uploaded for this account (ie., default avatar). // Example: 01JAJ3XCD66K3T99JZESCR137W AvatarMediaID string `json:"avatar_media_id,omitempty"` // Web location of a static version of the account's avatar. // Only relevant when the account's main avatar is a video or a gif. // Example: https://example.org/media/some_user/avatar/static/avatar.png AvatarStatic string `json:"avatar_static,omitempty"` // Account identifies as a bot. Bot bool `json:"bot,omitempty"` // When the account was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // CustomCSS to include when rendering this account's profile or statuses. CustomCSS string `json:"custom_css,omitempty"` // Account has opted into discovery features. Discoverable bool `json:"discoverable,omitempty"` // The account's display name. // Example: big jeff (he/him) DisplayName string `json:"display_name,omitempty"` // Array of custom emojis used in this account's note or display name. // Empty for blocked accounts. Emojis []*Emoji `json:"emojis"` // Account has enabled RSS feed. // Key/value omitted if false. EnableRSS bool `json:"enable_rss,omitempty"` // Additional metadata attached to this account's profile. // Empty for blocked accounts. Fields []*Field `json:"fields"` // Number of accounts following this account, according to our instance. FollowersCount int64 `json:"followers_count,omitempty"` // Number of account's followed by this account, according to our instance. FollowingCount int64 `json:"following_count,omitempty"` // Account identifies as a Group actor. Group bool `json:"group,omitempty"` // Web location of the account's header image. // Example: https://example.org/media/some_user/header/original/header.jpeg Header string `json:"header,omitempty"` // Description of this account's header, for alt text. // Example: A sunlit field with purple flowers. HeaderDescription string `json:"header_description,omitempty"` // Database ID of the media attachment for this account's header image. // Omitted if no header uploaded for this account (ie., default header). // Example: 01JAJ3XCD66K3T99JZESCR137W HeaderMediaID string `json:"header_media_id,omitempty"` // Web location of a static version of the account's header. // Only relevant when the account's main header is a video or a gif. // Example: https://example.org/media/some_user/header/static/header.png HeaderStatic string `json:"header_static,omitempty"` // Account has opted to hide their followers/following collections. // Key/value omitted if false. HideCollections bool `json:"hide_collections,omitempty"` // The account id. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // When the account's most recent status was posted (ISO 8601 Date). // Example: 2021-07-30 LastStatusAt string `json:"last_status_at,omitempty"` // Account manually approves follow requests. Locked bool `json:"locked,omitempty"` // If this account has been muted, when will the mute expire (ISO 8601 Datetime). // If the mute is indefinite, this will be null. // Example: 2021-07-30T09:20:25+00:00 MuteExpiresAt string `json:"mute_expires_at,omitempty"` // Bio/description of this account. Note string `json:"note,omitempty"` // Roles lists the public roles of the account on this instance. // Unlike Role, this is always available, but never includes permissions details. // Key/value omitted for remote accounts. Roles []*AccountDisplayRole `json:"roles"` // Number of statuses posted by this account, according to our instance. StatusesCount int64 `json:"statuses_count,omitempty"` // Account has been suspended by our instance. Suspended bool `json:"suspended,omitempty"` // Filename of user-selected CSS theme to include when rendering this account's profile or statuses. Eg., `blurple-light.css`. Theme string `json:"theme,omitempty"` // Web location of the account's profile page. // Example: https://example.org/@some_user URL string `json:"url,omitempty"` // The username of the account, not including domain. // Example: some_user Username string `json:"username,omitempty"` // moved Moved *Account `json:"moved,omitempty"` // role Role *AccountRole `json:"role,omitempty"` // source Source *Source `json:"source,omitempty"` }
MutedAccount MutedAccount extends Account with a field used only by the muted user list.
swagger:model MutedAccount
func (*MutedAccount) ContextValidate ¶
ContextValidate validate this muted account based on the context it is used
func (*MutedAccount) MarshalBinary ¶
func (m *MutedAccount) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MutedAccount) UnmarshalBinary ¶
func (m *MutedAccount) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NodeInfoServices ¶
type NodeInfoServices struct { // inbound Inbound []string `json:"inbound"` // outbound Outbound []string `json:"outbound"` }
NodeInfoServices NodeInfoServices represents inbound and outbound services that this node offers connections to.
swagger:model NodeInfoServices
func (*NodeInfoServices) ContextValidate ¶
ContextValidate validates this node info services based on context it is used
func (*NodeInfoServices) MarshalBinary ¶
func (m *NodeInfoServices) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NodeInfoServices) UnmarshalBinary ¶
func (m *NodeInfoServices) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NodeInfoSoftware ¶
type NodeInfoSoftware struct { // Homepage for the software. Omitted in version 2.0. // Example: https://docs.gotosocial.org Homepage string `json:"homepage,omitempty"` // name // Example: gotosocial Name string `json:"name,omitempty"` // Repository for the software. Omitted in version 2.0. // Example: https://codeberg.org/superseriousbusiness/gotosocial Repository string `json:"repository,omitempty"` // version // Example: 0.1.2 1234567 Version string `json:"version,omitempty"` }
NodeInfoSoftware NodeInfoSoftware represents the name and version number of the software of this node.
swagger:model NodeInfoSoftware
func (*NodeInfoSoftware) ContextValidate ¶
ContextValidate validates this node info software based on context it is used
func (*NodeInfoSoftware) MarshalBinary ¶
func (m *NodeInfoSoftware) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NodeInfoSoftware) UnmarshalBinary ¶
func (m *NodeInfoSoftware) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NodeInfoUsage ¶
type NodeInfoUsage struct { // local comments LocalComments int64 `json:"localComments,omitempty"` // local posts LocalPosts int64 `json:"localPosts,omitempty"` // users Users *NodeInfoUsers `json:"users,omitempty"` }
NodeInfoUsage NodeInfoUsage represents usage information about this server, such as number of users.
swagger:model NodeInfoUsage
func (*NodeInfoUsage) ContextValidate ¶
ContextValidate validate this node info usage based on the context it is used
func (*NodeInfoUsage) MarshalBinary ¶
func (m *NodeInfoUsage) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NodeInfoUsage) UnmarshalBinary ¶
func (m *NodeInfoUsage) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NodeInfoUsers ¶
type NodeInfoUsers struct { // active half year ActiveHalfYear int64 `json:"activeHalfYear,omitempty"` // active month ActiveMonth int64 `json:"activeMonth,omitempty"` // total Total int64 `json:"total,omitempty"` }
NodeInfoUsers NodeInfoUsers represents aggregate information about the users on the server.
swagger:model NodeInfoUsers
func (*NodeInfoUsers) ContextValidate ¶
ContextValidate validates this node info users based on context it is used
func (*NodeInfoUsers) MarshalBinary ¶
func (m *NodeInfoUsers) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NodeInfoUsers) UnmarshalBinary ¶
func (m *NodeInfoUsers) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Nodeinfo ¶
type Nodeinfo struct { // Free form key value pairs for software specific values. Clients should not rely on any specific key present. Metadata map[string]interface{} `json:"metadata,omitempty"` // Whether this server allows open self-registration. // Example: false OpenRegistrations bool `json:"openRegistrations,omitempty"` // The protocols supported on this server. Protocols []string `json:"protocols"` // The schema version // Example: 2.0 Version string `json:"version,omitempty"` // services Services *NodeInfoServices `json:"services,omitempty"` // software Software *NodeInfoSoftware `json:"software,omitempty"` // usage Usage *NodeInfoUsage `json:"usage,omitempty"` }
Nodeinfo Nodeinfo represents a version 2.1 or version 2.0 nodeinfo schema.
See: https://nodeinfo.diaspora.software/schema.html
swagger:model Nodeinfo
func (*Nodeinfo) ContextValidate ¶
ContextValidate validate this nodeinfo based on the context it is used
func (*Nodeinfo) MarshalBinary ¶
MarshalBinary interface implementation
func (*Nodeinfo) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Notification ¶
type Notification struct { // The timestamp of the notification (ISO 8601 Datetime) CreatedAt string `json:"created_at,omitempty"` // The id of the notification in the database. ID string `json:"id,omitempty"` // The type of event that resulted in the notification. // follow = Someone followed you. `account` will be set. // follow_request = Someone requested to follow you. `account` will be set. // mention = Someone mentioned you in their status. `status` will be set. `account` will be set. // reblog = Someone boosted one of your statuses. `status` will be set. `account` will be set. // favourite = Someone favourited one of your statuses. `status` will be set. `account` will be set. // poll = A poll you have voted in or created has ended. `status` will be set. `account` will be set. // status = Someone you enabled notifications for has posted a status. `status` will be set. `account` will be set. // admin.sign_up = Someone has signed up for a new account on the instance. `account` will be set. Type string `json:"type,omitempty"` // account Account *Account `json:"account,omitempty"` // status Status *Status `json:"status,omitempty"` }
Notification Notification represents a notification of an event relevant to the user.
swagger:model Notification
func (*Notification) ContextValidate ¶
ContextValidate validate this notification based on the context it is used
func (*Notification) MarshalBinary ¶
func (m *Notification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Notification) UnmarshalBinary ¶
func (m *Notification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PolicyRules ¶
type PolicyRules struct { // Policy entries for accounts that can always do this type of interaction. Always []PolicyValue `json:"always"` // Policy entries for accounts that require approval to do this type of interaction. WithApproval []PolicyValue `json:"with_approval"` }
PolicyRules Rules for one interaction type.
swagger:model PolicyRules
func (*PolicyRules) ContextValidate ¶
ContextValidate validate this policy rules based on the context it is used
func (*PolicyRules) MarshalBinary ¶
func (m *PolicyRules) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PolicyRules) UnmarshalBinary ¶
func (m *PolicyRules) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PolicyValue ¶
type PolicyValue string
PolicyValue One interaction policy entry for a status.
It can be EITHER one of the internal keywords listed below, OR a full-fledged ActivityPub URI of an Actor, like "https://example.org/users/some_user".
Internal keywords:
public - Public, aka anyone who can see the status according to its visibility level. followers - Followers of the status author. following - People followed by the status author. mutuals - Mutual follows of the status author (reserved, unused). mentioned - Accounts mentioned in, or replied-to by, the status. author - The status author themself. me - If request was made with an authorized user, "me" represents the user who made the request and is now looking at this interaction policy.
swagger:model PolicyValue
func (PolicyValue) ContextValidate ¶
ContextValidate validates this policy value based on context it is used
type Poll ¶
type Poll struct { // Custom emoji to be used for rendering poll options. Emojis []*Emoji `json:"emojis"` // Is the poll currently expired? Expired bool `json:"expired,omitempty"` // When the poll ends. (ISO 8601 Datetime). ExpiresAt string `json:"expires_at,omitempty"` // The ID of the poll in the database. // Example: 01FBYKMD1KBMJ0W6JF1YZ3VY5D ID string `json:"id,omitempty"` // Does the poll allow multiple-choice answers? Multiple bool `json:"multiple,omitempty"` // Possible answers for the poll. Options []*PollOption `json:"options"` // When called with a user token, which options has the authorized // user chosen? Contains an array of index values for options. // // Omitted when no user token provided. OwnVotes []int64 `json:"own_votes"` // When called with a user token, has the authorized user voted? // // Omitted when no user token provided. Voted bool `json:"voted,omitempty"` // How many unique accounts have voted on a multiple-choice poll. VotersCount int64 `json:"voters_count,omitempty"` // How many votes have been received. VotesCount int64 `json:"votes_count,omitempty"` }
Poll Poll represents a poll attached to a status.
swagger:model Poll
func (*Poll) ContextValidate ¶
ContextValidate validate this poll based on the context it is used
func (*Poll) MarshalBinary ¶
MarshalBinary interface implementation
func (*Poll) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PollOption ¶
type PollOption struct { // The text value of the poll option. String. Title string `json:"title,omitempty"` // The number of received votes for this option. VotesCount int64 `json:"votes_count,omitempty"` }
PollOption PollOption represents the current vote counts for different poll options.
swagger:model PollOption
func (*PollOption) ContextValidate ¶
ContextValidate validates this poll option based on context it is used
func (*PollOption) MarshalBinary ¶
func (m *PollOption) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PollOption) UnmarshalBinary ¶
func (m *PollOption) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Relationship ¶
type Relationship struct { // This account is blocking you. BlockedBy bool `json:"blocked_by,omitempty"` // You are blocking this account. Blocking bool `json:"blocking,omitempty"` // You are blocking this account's domain. DomainBlocking bool `json:"domain_blocking,omitempty"` // You are featuring this account on your profile. Endorsed bool `json:"endorsed,omitempty"` // This account follows you. FollowedBy bool `json:"followed_by,omitempty"` // You are following this account. Following bool `json:"following,omitempty"` // The account id. // Example: 01FBW9XGEP7G6K88VY4S9MPE1R ID string `json:"id,omitempty"` // You are muting this account. Muting bool `json:"muting,omitempty"` // You are muting notifications from this account. MutingNotifications bool `json:"muting_notifications,omitempty"` // Your note on this account. Note string `json:"note,omitempty"` // You are seeing notifications when this account posts. Notifying bool `json:"notifying,omitempty"` // You have requested to follow this account, and the request is pending. Requested bool `json:"requested,omitempty"` // This account has requested to follow you, and the request is pending. RequestedBy bool `json:"requested_by,omitempty"` // You are seeing reblogs/boosts from this account in your home timeline. ShowingReblogs bool `json:"showing_reblogs,omitempty"` }
Relationship Relationship represents a relationship between accounts.
swagger:model Relationship
func (*Relationship) ContextValidate ¶
ContextValidate validates this relationship based on context it is used
func (*Relationship) MarshalBinary ¶
func (m *Relationship) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Relationship) UnmarshalBinary ¶
func (m *Relationship) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Report ¶
type Report struct { // Whether an action has been taken by an admin in response to this report. // Example: false ActionTaken bool `json:"action_taken,omitempty"` // If an action was taken, at what time was this done? (ISO 8601 Datetime) // Will be null if not set / no action yet taken. // Example: 2021-07-30T09:20:25+00:00 ActionTakenAt string `json:"action_taken_at,omitempty"` // If an action was taken, what comment was made by the admin on the taken action? // Will be null if not set / no action yet taken. // Example: Account was suspended. ActionTakenComment string `json:"action_taken_comment,omitempty"` // Under what category was this report created? // Example: spam Category string `json:"category,omitempty"` // Comment submitted when the report was created. // Will be empty if no comment was submitted. // Example: This person has been harassing me. Comment string `json:"comment,omitempty"` // The date when this report was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // Bool to indicate that report should be federated to remote instance. // Example: true Forwarded bool `json:"forwarded,omitempty"` // ID of the report. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // Array of rule IDs that were submitted along with this report. // Will be empty if no rule IDs were submitted. // Example: ["01GPBN5YDY6JKBWE44H7YQBDCQ","01GPBN65PDWSBPWVDD0SQCFFY3"] RuleIDs []string `json:"rule_ids"` // Array of IDs of statuses that were submitted along with this report. // Will be empty if no status IDs were submitted. // Example: ["01GPBN5YDY6JKBWE44H7YQBDCQ","01GPBN65PDWSBPWVDD0SQCFFY3"] StatusIDs []string `json:"status_ids"` // target account TargetAccount *Account `json:"target_account,omitempty"` }
Report Report models a moderation report submitted to the instance, either via the client API or via the federated API.
swagger:model Report
func (*Report) ContextValidate ¶
ContextValidate validate this report based on the context it is used
func (*Report) MarshalBinary ¶
MarshalBinary interface implementation
func (*Report) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type SearchResult ¶
type SearchResult struct { // accounts Accounts []*Account `json:"accounts"` Hashtags []interface{} `json:"hashtags"` // statuses Statuses []*Status `json:"statuses"` }
SearchResult SearchResult models a search result.
swagger:model SearchResult
func (*SearchResult) ContextValidate ¶
ContextValidate validate this search result based on the context it is used
func (*SearchResult) MarshalBinary ¶
func (m *SearchResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SearchResult) UnmarshalBinary ¶
func (m *SearchResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Source ¶
type Source struct { // This account is aliased to / also known as accounts at the // given ActivityPub URIs. To set this, use `/api/v1/accounts/alias`. // // Omitted from json if empty / not set. AlsoKnownAsURIs []string `json:"also_known_as_uris"` // Metadata about the account. Fields []*Field `json:"fields"` // The number of pending follow requests. FollowRequestsCount int64 `json:"follow_requests_count,omitempty"` // The default posting language for new statuses. Language string `json:"language,omitempty"` // Profile bio. Note string `json:"note,omitempty"` // The default post privacy to be used for new statuses. // public = Public post // unlisted = Unlisted post // private = Followers-only post // direct = Direct post Privacy string `json:"privacy,omitempty"` // Whether new statuses should be marked sensitive by default. Sensitive bool `json:"sensitive,omitempty"` // The default posting content type for new statuses. StatusContentType string `json:"status_content_type,omitempty"` // Layout to use for the web view of the account. // "microblog": default, classic microblog layout. // "gallery": gallery layout with media only. WebLayout string `json:"web_layout,omitempty"` // Visibility level(s) of posts to show for this account via the web api. // "public" = default, show only Public visibility posts on the web. // "unlisted" = show Public *and* Unlisted visibility posts on the web. // "none" = show no posts on the web, not even Public ones. WebVisibility string `json:"web_visibility,omitempty"` }
Source Source represents display or publishing preferences of user's own account.
Returned as an additional entity when verifying and updated credentials, as an attribute of Account.
swagger:model Source
func (*Source) ContextValidate ¶
ContextValidate validate this source based on the context it is used
func (*Source) MarshalBinary ¶
MarshalBinary interface implementation
func (*Source) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Status ¶
type Status struct { // This status has been bookmarked by the account viewing it. Bookmarked bool `json:"bookmarked,omitempty"` // The content of this status. Should be HTML, but might also be plaintext in some cases. // Example: \u003cp\u003eHey this is a status!\u003c/p\u003e Content string `json:"content,omitempty"` // Content type that was used to parse the status's text. Returned when // status is deleted, so if the user is redrafting the message the client // can default to the same content type. ContentType string `json:"content_type,omitempty"` // The date when this status was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // Timestamp of when the status was last edited (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 EditedAt string `json:"edited_at,omitempty"` // Custom emoji to be used when rendering status content. Emojis []*Emoji `json:"emojis"` // This status has been favourited by the account viewing it. Favourited bool `json:"favourited,omitempty"` // Number of favourites/likes this status has received, according to our instance. FavouritesCount int64 `json:"favourites_count,omitempty"` // A list of filters that matched this status and why they matched, if there are any such filters. Filtered []*FilterResult `json:"filtered"` // ID of the status. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // ID of the account being replied to. // Example: 01FBVD42CQ3ZEEVMW180SBX03B InReplyToAccountID string `json:"in_reply_to_account_id,omitempty"` // ID of the status being replied to. // Example: 01FBVD42CQ3ZEEVMW180SBX03B InReplyToID string `json:"in_reply_to_id,omitempty"` // Primary language of this status (ISO 639 Part 1 two-letter language code). // Will be null if language is not known. // Example: en Language string `json:"language,omitempty"` // Set to "true" if status is not federated, ie., a "local only" status; omitted from response otherwise. LocalOnly bool `json:"local_only,omitempty"` // Media that is attached to this status. MediaAttachments []*Attachment `json:"media_attachments"` // Mentions of users within the status content. Mentions []*Mention `json:"mentions"` // Replies to this status have been muted by the account viewing it. Muted bool `json:"muted,omitempty"` // This status has been pinned by the account viewing it (only relevant for your own statuses). Pinned bool `json:"pinned,omitempty"` // This status has been boosted/reblogged by the account viewing it. Reblogged bool `json:"reblogged,omitempty"` // Number of times this status has been boosted/reblogged, according to our instance. ReblogsCount int64 `json:"reblogs_count,omitempty"` // Number of replies to this status, according to our instance. RepliesCount int64 `json:"replies_count,omitempty"` // Status contains sensitive content. // Example: false Sensitive bool `json:"sensitive,omitempty"` // Subject, summary, or content warning for the status. // Example: warning nsfw SpoilerText string `json:"spoiler_text,omitempty"` // Hashtags used within the status content. Tags []*Tag `json:"tags"` // Plain-text source of a status. Returned instead of content when status is deleted, // so the user may redraft from the source text without the client having to reverse-engineer // the original text from the HTML content. Text string `json:"text,omitempty"` // ActivityPub URI of the status. Equivalent to the status's activitypub ID. // Example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B URI string `json:"uri,omitempty"` // The status's publicly available web URL. This link will only work if the visibility of the status is 'public'. // Example: https://example.org/@some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B URL string `json:"url,omitempty"` // Visibility of this status. // Example: unlisted Visibility string `json:"visibility,omitempty"` // account Account *Account `json:"account,omitempty"` // application Application *Application `json:"application,omitempty"` // card Card *Card `json:"card,omitempty"` // interaction policy InteractionPolicy *InteractionPolicy `json:"interaction_policy,omitempty"` // poll Poll *Poll `json:"poll,omitempty"` // reblog Reblog *StatusReblogged `json:"reblog,omitempty"` }
Status Status models a status or post.
swagger:model Status
func (*Status) ContextValidate ¶
ContextValidate validate this status based on the context it is used
func (*Status) MarshalBinary ¶
MarshalBinary interface implementation
func (*Status) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type StatusEdit ¶
type StatusEdit struct { // The content of this status at this revision. // Should be HTML, but might also be plaintext in some cases. // Example: \u003cp\u003eHey this is a status!\u003c/p\u003e Content string `json:"content,omitempty"` // The date when this revision was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // Custom emoji to be used when rendering status content. Emojis []*Emoji `json:"emojis"` // Media that is attached to this status. MediaAttachments []*Attachment `json:"media_attachments"` // Status marked sensitive at this revision. // Example: false Sensitive bool `json:"sensitive,omitempty"` // Subject, summary, or content warning for the status at this revision. // Example: warning nsfw SpoilerText string `json:"spoiler_text,omitempty"` // account Account *Account `json:"account,omitempty"` // poll Poll *Poll `json:"poll,omitempty"` }
StatusEdit StatusEdit represents one historical revision of a status, containing partial information about the state of the status at that revision.
swagger:model StatusEdit
func (*StatusEdit) ContextValidate ¶
ContextValidate validate this status edit based on the context it is used
func (*StatusEdit) MarshalBinary ¶
func (m *StatusEdit) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*StatusEdit) UnmarshalBinary ¶
func (m *StatusEdit) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type StatusReblogged ¶
type StatusReblogged struct { // This status has been bookmarked by the account viewing it. Bookmarked bool `json:"bookmarked,omitempty"` // The content of this status. Should be HTML, but might also be plaintext in some cases. // Example: \u003cp\u003eHey this is a status!\u003c/p\u003e Content string `json:"content,omitempty"` // Content type that was used to parse the status's text. Returned when // status is deleted, so if the user is redrafting the message the client // can default to the same content type. ContentType string `json:"content_type,omitempty"` // The date when this status was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // Timestamp of when the status was last edited (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 EditedAt string `json:"edited_at,omitempty"` // Custom emoji to be used when rendering status content. Emojis []*Emoji `json:"emojis"` // This status has been favourited by the account viewing it. Favourited bool `json:"favourited,omitempty"` // Number of favourites/likes this status has received, according to our instance. FavouritesCount int64 `json:"favourites_count,omitempty"` // A list of filters that matched this status and why they matched, if there are any such filters. Filtered []*FilterResult `json:"filtered"` // ID of the status. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // ID of the account being replied to. // Example: 01FBVD42CQ3ZEEVMW180SBX03B InReplyToAccountID string `json:"in_reply_to_account_id,omitempty"` // ID of the status being replied to. // Example: 01FBVD42CQ3ZEEVMW180SBX03B InReplyToID string `json:"in_reply_to_id,omitempty"` // Primary language of this status (ISO 639 Part 1 two-letter language code). // Will be null if language is not known. // Example: en Language string `json:"language,omitempty"` // Set to "true" if status is not federated, ie., a "local only" status; omitted from response otherwise. LocalOnly bool `json:"local_only,omitempty"` // Media that is attached to this status. MediaAttachments []*Attachment `json:"media_attachments"` // Mentions of users within the status content. Mentions []*Mention `json:"mentions"` // Replies to this status have been muted by the account viewing it. Muted bool `json:"muted,omitempty"` // This status has been pinned by the account viewing it (only relevant for your own statuses). Pinned bool `json:"pinned,omitempty"` // This status has been boosted/reblogged by the account viewing it. Reblogged bool `json:"reblogged,omitempty"` // Number of times this status has been boosted/reblogged, according to our instance. ReblogsCount int64 `json:"reblogs_count,omitempty"` // Number of replies to this status, according to our instance. RepliesCount int64 `json:"replies_count,omitempty"` // Status contains sensitive content. // Example: false Sensitive bool `json:"sensitive,omitempty"` // Subject, summary, or content warning for the status. // Example: warning nsfw SpoilerText string `json:"spoiler_text,omitempty"` // Hashtags used within the status content. Tags []*Tag `json:"tags"` // Plain-text source of a status. Returned instead of content when status is deleted, // so the user may redraft from the source text without the client having to reverse-engineer // the original text from the HTML content. Text string `json:"text,omitempty"` // ActivityPub URI of the status. Equivalent to the status's activitypub ID. // Example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B URI string `json:"uri,omitempty"` // The status's publicly available web URL. This link will only work if the visibility of the status is 'public'. // Example: https://example.org/@some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B URL string `json:"url,omitempty"` // Visibility of this status. // Example: unlisted Visibility string `json:"visibility,omitempty"` // account Account *Account `json:"account,omitempty"` // application Application *Application `json:"application,omitempty"` // card Card *Card `json:"card,omitempty"` // interaction policy InteractionPolicy *InteractionPolicy `json:"interaction_policy,omitempty"` // poll Poll *Poll `json:"poll,omitempty"` // reblog Reblog *StatusReblogged `json:"reblog,omitempty"` }
StatusReblogged StatusReblogged represents a reblogged status.
swagger:model StatusReblogged
func (*StatusReblogged) ContextValidate ¶
ContextValidate validate this status reblogged based on the context it is used
func (*StatusReblogged) MarshalBinary ¶
func (m *StatusReblogged) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*StatusReblogged) UnmarshalBinary ¶
func (m *StatusReblogged) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type StatusSource ¶
type StatusSource struct { // Content type that was used to parse the text. ContentType string `json:"content_type,omitempty"` // ID of the status. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // Plain-text version of spoiler text. SpoilerText string `json:"spoiler_text,omitempty"` // Plain-text source of a status. Text string `json:"text,omitempty"` }
StatusSource StatusSource represents the source text of a status as submitted to the API when it was created.
swagger:model StatusSource
func (*StatusSource) ContextValidate ¶
ContextValidate validates this status source based on context it is used
func (*StatusSource) MarshalBinary ¶
func (m *StatusSource) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*StatusSource) UnmarshalBinary ¶
func (m *StatusSource) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SwaggerCollection ¶
type SwaggerCollection struct { // ActivityStreams JSON-LD context. // A string or an array of strings, or more // complex nested items. // Example: https://www.w3.org/ns/activitystreams Context interface{} `json:"@context,omitempty"` // ActivityStreams ID. // Example: https://example.org/users/some_user/statuses/106717595988259568/replies ID string `json:"id,omitempty"` // ActivityStreams type. // Example: Collection Type string `json:"type,omitempty"` // first First *SwaggerCollectionPage `json:"first,omitempty"` // last Last *SwaggerCollectionPage `json:"last,omitempty"` }
SwaggerCollection SwaggerCollection represents an ActivityPub Collection.
swagger:model SwaggerCollection
func (*SwaggerCollection) ContextValidate ¶
ContextValidate validate this swagger collection based on the context it is used
func (*SwaggerCollection) MarshalBinary ¶
func (m *SwaggerCollection) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SwaggerCollection) UnmarshalBinary ¶
func (m *SwaggerCollection) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SwaggerCollectionPage ¶
type SwaggerCollectionPage struct { // ActivityStreams ID. // Example: https://example.org/users/some_user/statuses/106717595988259568/replies?page=true ID string `json:"id,omitempty"` // Items on this page. // Example: ["https://example.org/users/some_other_user/statuses/086417595981111564","https://another.example.com/users/another_user/statuses/01FCN8XDV3YG7B4R42QA6YQZ9R"] Items []string `json:"items"` // Link to the next page. // Example: https://example.org/users/some_user/statuses/106717595988259568/replies?only_other_accounts=true\u0026page=true Next string `json:"next,omitempty"` // Collection this page belongs to. // Example: https://example.org/users/some_user/statuses/106717595988259568/replies PartOf string `json:"partOf,omitempty"` // ActivityStreams type. // Example: CollectionPage Type string `json:"type,omitempty"` }
SwaggerCollectionPage SwaggerCollectionPage represents one page of a collection.
swagger:model SwaggerCollectionPage
func (*SwaggerCollectionPage) ContextValidate ¶
ContextValidate validates this swagger collection page based on context it is used
func (*SwaggerCollectionPage) MarshalBinary ¶
func (m *SwaggerCollectionPage) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SwaggerCollectionPage) UnmarshalBinary ¶
func (m *SwaggerCollectionPage) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SwaggerFeaturedCollection ¶
type SwaggerFeaturedCollection struct { // ActivityStreams JSON-LD context. // A string or an array of strings, or more // complex nested items. // Example: https://www.w3.org/ns/activitystreams Context interface{} `json:"@context,omitempty"` // ActivityStreams ID. // Example: https://example.org/users/some_user/collections/featured ID string `json:"id,omitempty"` // List of status URIs. // Example: ["https://example.org/users/some_user/statuses/01GSZ0F7Q8SJKNRF777GJD271R","https://example.org/users/some_user/statuses/01GSZ0G012CBQ7TEKX689S3QRE"] Items []string `json:"items"` // Number of items in this collection. // Example: 2 TotalItems int64 `json:"TotalItems,omitempty"` // ActivityStreams type. // Example: OrderedCollection Type string `json:"type,omitempty"` }
SwaggerFeaturedCollection SwaggerFeaturedCollection represents an ActivityPub OrderedCollection.
swagger:model SwaggerFeaturedCollection
func (*SwaggerFeaturedCollection) ContextValidate ¶
func (m *SwaggerFeaturedCollection) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this swagger featured collection based on context it is used
func (*SwaggerFeaturedCollection) MarshalBinary ¶
func (m *SwaggerFeaturedCollection) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SwaggerFeaturedCollection) UnmarshalBinary ¶
func (m *SwaggerFeaturedCollection) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Tag ¶
type Tag struct { // Following is true if the user is following this tag, false if they're not, // and not present if there is no currently authenticated user. Following bool `json:"following,omitempty"` // History of this hashtag's usage. // Currently just a stub, if provided will always be an empty array. // Example: [] History []interface{} `json:"history"` // The value of the hashtag after the # sign. // Example: helloworld Name string `json:"name,omitempty"` // Web link to the hashtag. // Example: https://example.org/tags/helloworld URL string `json:"url,omitempty"` }
Tag Tag represents a hashtag used within the content of a status.
swagger:model Tag
func (*Tag) ContextValidate ¶
ContextValidate validates this tag based on context it is used
func (*Tag) MarshalBinary ¶
MarshalBinary interface implementation
func (*Tag) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Theme ¶
type Theme struct { // User-facing description of this theme. Description string `json:"description,omitempty"` // FileName of this theme in the themes directory. FileName string `json:"file_name,omitempty"` // User-facing title of this theme. Title string `json:"title,omitempty"` }
Theme Theme represents one user-selectable preset CSS theme.
swagger:model Theme
func (*Theme) ContextValidate ¶
ContextValidate validates this theme based on context it is used
func (*Theme) MarshalBinary ¶
MarshalBinary interface implementation
func (*Theme) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ThreadContext ¶
type ThreadContext struct { // Parents in the thread. Ancestors []*Status `json:"ancestors"` // Children in the thread. Descendants []*Status `json:"descendants"` }
ThreadContext ThreadContext models the tree or "thread" around a given status.
swagger:model ThreadContext
func (*ThreadContext) ContextValidate ¶
ContextValidate validate this thread context based on the context it is used
func (*ThreadContext) MarshalBinary ¶
func (m *ThreadContext) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ThreadContext) UnmarshalBinary ¶
func (m *ThreadContext) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TimelineMarker ¶
type TimelineMarker struct { // The ID of the most recently viewed entity. LastReadID string `json:"last_read_id,omitempty"` // The timestamp of when the marker was set (ISO 8601 Datetime) UpdatedAt string `json:"updated_at,omitempty"` // Used for locking to prevent write conflicts. Version int64 `json:"version,omitempty"` }
TimelineMarker TimelineMarker contains information about a user's progress through a specific timeline.
swagger:model TimelineMarker
func (*TimelineMarker) ContextValidate ¶
ContextValidate validates this timeline marker based on context it is used
func (*TimelineMarker) MarshalBinary ¶
func (m *TimelineMarker) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TimelineMarker) UnmarshalBinary ¶
func (m *TimelineMarker) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Token ¶
type Token struct { // Access token used for authorization. AccessToken string `json:"access_token,omitempty"` // When the OAuth token was generated (UNIX timestamp seconds). // Example: 1627644520 CreatedAt int64 `json:"created_at,omitempty"` // OAuth scopes granted by this token, space-separated. // Example: read write admin Scope string `json:"scope,omitempty"` // OAuth token type. Will always be 'Bearer'. // Example: bearer TokenType string `json:"token_type,omitempty"` }
Token Token represents an OAuth token used for authenticating with the GoToSocial API and performing actions.
swagger:model Token
func (*Token) ContextValidate ¶
ContextValidate validates this token based on context it is used
func (*Token) MarshalBinary ¶
MarshalBinary interface implementation
func (*Token) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TokenInfo ¶ added in v0.19.0
type TokenInfo struct { // When the token was created (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // Database ID of this token. // Example: 01JMW7QBAZYZ8T8H73PCEX12XG ID string `json:"id,omitempty"` // Approximate time (accurate to within an hour) when the token was last used (ISO 8601 Datetime). // Omitted if token has never been used, or it is not known when it was last used (eg., it was last used before tracking "last_used" became a thing). // Example: 2021-07-30T09:20:25+00:00 LastUsed string `json:"last_used,omitempty"` // OAuth scopes granted by the token, space-separated. // Example: read write admin Scope string `json:"scope,omitempty"` // application Application *Application `json:"application,omitempty"` }
TokenInfo TokenInfo represents metadata about one user-level access token.
The actual access token itself will never be sent via the API.
swagger:model TokenInfo
func (*TokenInfo) ContextValidate ¶ added in v0.19.0
ContextValidate validate this token info based on the context it is used
func (*TokenInfo) MarshalBinary ¶ added in v0.19.0
MarshalBinary interface implementation
func (*TokenInfo) UnmarshalBinary ¶ added in v0.19.0
UnmarshalBinary interface implementation
type User ¶
type User struct { // User is an admin. // Example: false Admin bool `json:"admin,omitempty"` // User was approved by an admin. // Example: true Approved bool `json:"approved,omitempty"` // Time when the last "please confirm your email address" email was sent, if at all. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 ConfirmationSentAt string `json:"confirmation_sent_at,omitempty"` // Time at which the email given in the `email` field was confirmed, if at all. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 ConfirmedAt string `json:"confirmed_at,omitempty"` // Time this user was created. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 CreatedAt string `json:"created_at,omitempty"` // User's account is disabled. // Example: false Disabled bool `json:"disabled,omitempty"` // Confirmed email address of this user, if set. // Example: someone@example.org Email string `json:"email,omitempty"` // Database ID of this user. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // Time at which this user was last emailed, if at all. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 LastEmailedAt string `json:"last_emailed_at,omitempty"` // User is a moderator. // Example: false Moderator bool `json:"moderator,omitempty"` // Reason for sign-up, if provided. // Example: Please! Pretty please! Reason string `json:"reason,omitempty"` // Time when the last "please reset your password" email was sent, if at all. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 ResetPasswordSentAt string `json:"reset_password_sent_at,omitempty"` // Time at which 2fa was enabled for this user. (ISO 8601 Datetime) // Example: 2021-07-30T09:20:25+00:00 TwoFactorEnabledAt string `json:"two_factor_enabled_at,omitempty"` // Unconfirmed email address of this user, if set. // Example: someone.else@somewhere.else.example.org UnconfirmedEmail string `json:"unconfirmed_email,omitempty"` }
User User models fields relevant to one user.
swagger:model User
func (*User) ContextValidate ¶
ContextValidate validates this user based on context it is used
func (*User) MarshalBinary ¶
MarshalBinary interface implementation
func (*User) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type WebPushNotification ¶ added in v0.18.0
type WebPushNotification struct { // AccessToken is the access token associated with the Web Push subscription. // I don't know why this is sent, given that the client should know that already, // but Feditext does use it. AccessToken string `json:"access_token,omitempty"` // Body is a preview of the notification body, // such as the first line of a status's CW or text, // or the first line of an account bio. Body string `json:"body,omitempty"` // Icon is an image URL that can be displayed with the notification, // normally the account's avatar. Icon string `json:"icon,omitempty"` // NotificationID is the Notification.ID of the referenced Notification. NotificationID string `json:"notification_id,omitempty"` // NotificationType is the Notification.Type of the referenced Notification. NotificationType string `json:"notification_type,omitempty"` // PreferredLocale is a BCP 47 language tag for the receiving user's locale. PreferredLocale string `json:"preferred_locale,omitempty"` // Title is a title for the notification, // generally describing an action taken by a user. Title string `json:"title,omitempty"` }
WebPushNotification WebPushNotification represents a notification summary delivered to the client by the Web Push server.
It does not contain an entire Notification, just the NotificationID and some preview information. It is not used in the client API directly, but is included in the API doc for decoding Web Push notifications.
swagger:model WebPushNotification
func (*WebPushNotification) ContextValidate ¶ added in v0.18.0
ContextValidate validates this web push notification based on context it is used
func (*WebPushNotification) MarshalBinary ¶ added in v0.18.0
func (m *WebPushNotification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WebPushNotification) UnmarshalBinary ¶ added in v0.18.0
func (m *WebPushNotification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WebPushNotificationPolicy ¶ added in v0.18.0
type WebPushNotificationPolicy string
WebPushNotificationPolicy WebPushNotificationPolicy names sets of accounts that can generate notifications.
swagger:model WebPushNotificationPolicy
func (WebPushNotificationPolicy) ContextValidate ¶ added in v0.18.0
func (m WebPushNotificationPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this web push notification policy based on context it is used
type WebPushSubscription ¶ added in v0.18.0
type WebPushSubscription struct { // Where push alerts will be sent to. Endpoint string `json:"endpoint,omitempty"` // The id of the push subscription in the database. ID string `json:"id,omitempty"` // The streaming server's VAPID public key. ServerKey string `json:"server_key,omitempty"` // Whether the subscription uses RFC or pre-RFC Web Push standards. // For GotoSocial, this is always true. Standard bool `json:"standard,omitempty"` // alerts Alerts *WebPushSubscriptionAlerts `json:"alerts,omitempty"` // policy Policy WebPushNotificationPolicy `json:"policy,omitempty"` }
WebPushSubscription WebPushSubscription represents a subscription to a Web Push server.
swagger:model WebPushSubscription
func (*WebPushSubscription) ContextValidate ¶ added in v0.18.0
ContextValidate validate this web push subscription based on the context it is used
func (*WebPushSubscription) MarshalBinary ¶ added in v0.18.0
func (m *WebPushSubscription) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WebPushSubscription) UnmarshalBinary ¶ added in v0.18.0
func (m *WebPushSubscription) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WebPushSubscriptionAlerts ¶ added in v0.18.0
type WebPushSubscriptionAlerts struct { // Receive a push notification when a new report has been filed? AdminReport bool `json:"admin.report,omitempty"` // Receive a push notification when a new user has signed up? AdminSignup bool `json:"admin.sign_up,omitempty"` // Receive a push notification when a status you created has been favourited by someone else? Favourite bool `json:"favourite,omitempty"` // Receive a push notification when someone has followed you? Follow bool `json:"follow,omitempty"` // Receive a push notification when someone has requested to follow you? FollowRequest bool `json:"follow_request,omitempty"` // Receive a push notification when someone else has mentioned you in a status? Mention bool `json:"mention,omitempty"` // Receive a push notification when a fave is pending? PendingFavourite bool `json:"pending.favourite,omitempty"` // Receive a push notification when a boost is pending? PendingReblog bool `json:"pending.reblog,omitempty"` // Receive a push notification when a reply is pending? PendingReply bool `json:"pending.reply,omitempty"` // Receive a push notification when a poll you voted in or created has ended? Poll bool `json:"poll,omitempty"` // Receive a push notification when a status you created has been boosted by someone else? Reblog bool `json:"reblog,omitempty"` // Receive a push notification when a subscribed account posts a status? Status bool `json:"status,omitempty"` // Receive a push notification when a status you interacted with has been edited? Update bool `json:"update,omitempty"` }
WebPushSubscriptionAlerts WebPushSubscriptionAlerts represents the specific events that this Web Push subscription will receive.
swagger:model WebPushSubscriptionAlerts
func (*WebPushSubscriptionAlerts) ContextValidate ¶ added in v0.18.0
func (m *WebPushSubscriptionAlerts) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this web push subscription alerts based on context it is used
func (*WebPushSubscriptionAlerts) MarshalBinary ¶ added in v0.18.0
func (m *WebPushSubscriptionAlerts) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WebPushSubscriptionAlerts) UnmarshalBinary ¶ added in v0.18.0
func (m *WebPushSubscriptionAlerts) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type WellKnownResponse ¶
type WellKnownResponse struct { // aliases Aliases []string `json:"aliases"` // links Links []*Link `json:"links"` // subject Subject string `json:"subject,omitempty"` }
WellKnownResponse WellKnownResponse represents the response to either a webfinger request for an 'acct' resource, or a request to nodeinfo. For example, it would be returned from https://example.org/.well-known/webfinger?resource=acct:some_username@example.org
swagger:model WellKnownResponse
func (*WellKnownResponse) ContextValidate ¶
ContextValidate validate this well known response based on the context it is used
func (*WellKnownResponse) MarshalBinary ¶
func (m *WellKnownResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*WellKnownResponse) UnmarshalBinary ¶
func (m *WellKnownResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
Source Files
¶
- account.go
- account_display_role.go
- account_export_stats.go
- account_role.go
- admin_account_info.go
- admin_action_response.go
- admin_emoji.go
- admin_report.go
- application.go
- attachment.go
- card.go
- conversation.go
- debug_a_p_url_response.go
- default_policies.go
- domain.go
- domain_permission.go
- domain_permission_subscription.go
- emoji.go
- emoji_category.go
- field.go
- filter_action.go
- filter_context.go
- filter_keyword.go
- filter_result.go
- filter_status.go
- filter_v1.go
- filter_v2.go
- header_filter.go
- host_meta.go
- instance_configuration_accounts.go
- instance_configuration_emojis.go
- instance_configuration_media_attachments.go
- instance_configuration_polls.go
- instance_configuration_statuses.go
- instance_rule.go
- instance_v1.go
- instance_v1_configuration.go
- instance_v1_u_r_ls.go
- instance_v2.go
- instance_v2_configuration.go
- instance_v2_configuration_translation.go
- instance_v2_configuration_v_api_d.go
- instance_v2_contact.go
- instance_v2_registrations.go
- instance_v2_thumbnail.go
- instance_v2_thumbnail_versions.go
- instance_v2_u_r_ls.go
- instance_v2_usage.go
- instance_v2_users.go
- interaction_policy.go
- interaction_request.go
- link.go
- list.go
- marker.go
- media_dimensions.go
- media_focus.go
- media_meta.go
- mention.go
- muted_account.go
- node_info_services.go
- node_info_software.go
- node_info_usage.go
- node_info_users.go
- nodeinfo.go
- notification.go
- policy_rules.go
- policy_value.go
- poll.go
- poll_option.go
- relationship.go
- report.go
- search_result.go
- source.go
- status.go
- status_edit.go
- status_reblogged.go
- status_source.go
- swagger_collection.go
- swagger_collection_page.go
- swagger_featured_collection.go
- tag.go
- theme.go
- thread_context.go
- timeline_marker.go
- token.go
- token_info.go
- user.go
- web_push_notification.go
- web_push_notification_policy.go
- web_push_subscription.go
- web_push_subscription_alerts.go
- well_known_response.go