Documentation
¶
Index ¶
- type Account
- type AccountRole
- type AdminAccountInfo
- type AdminActionResponse
- type AdminEmoji
- type AdminReport
- type Application
- type Attachment
- type Card
- type Context
- type DebugAPURLResponse
- type Domain
- type DomainPermission
- type Emoji
- type EmojiCategory
- type Field
- type FilterContext
- type FilterV1
- 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 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 Link
- type List
- type Marker
- type MediaDimensions
- type MediaFocus
- type MediaMeta
- type Mention
- type NodeInfoServices
- type NodeInfoSoftware
- type NodeInfoUsage
- type NodeInfoUsers
- type Nodeinfo
- type Notification
- type Poll
- type PollOption
- type Relationship
- type Report
- type SearchResult
- type Source
- type Status
- type StatusReblogged
- 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 TimelineMarker
- type Token
- 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"` // 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. Emojis []*Emoji `json:"emojis"` // Account has enabled RSS feed. EnableRSS bool `json:"enable_rss,omitempty"` // Additional metadata attached to this account's profile. 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"` // Web location of the account's header image. // Example: https://example.org/media/some_user/header/original/header.jpeg Header string `json:"header,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"` // The account id. // Example: 01FBVD42CQ3ZEEVMW180SBX03B ID string `json:"id,omitempty"` // When the account's most recent status was posted (ISO 8601 Datetime). // Example: 2021-07-30T09:20:25+00:00 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). // 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"` // 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"` // 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 AccountRole ¶
type AccountRole struct { // name Name string `json:"name,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 requesting an invite. // Null if not known / 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"` // 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"` // 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 Context ¶
type Context struct { // Parents in the thread. Ancestors []*Status `json:"ancestors"` // Children in the thread. Descendants []*Status `json:"descendants"` }
Context Context models the tree around a given status.
swagger:model Context
func (*Context) ContextValidate ¶
ContextValidate validate this context based on the context it is used
func (*Context) MarshalBinary ¶
MarshalBinary interface implementation
func (*Context) UnmarshalBinary ¶
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 Domain ¶
type Domain struct { // 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. // 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 { // 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"` // 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. // 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 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 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 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 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"` // 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"` // 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 { // 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"` // 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 { // 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"` }
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 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 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 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 { // 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 int64 `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 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 { // name // Example: gotosocial Name string `json:"name,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 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 { // 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 // follow_request = Someone requested to follow you // mention = Someone mentioned you in their status // reblog = Someone boosted one of your statuses // favourite = Someone favourited one of your statuses // poll = A poll you have voted in or created has ended // status = Someone you enabled notifications for has posted a status 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 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"` }
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"` // The date when this status 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"` // 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"` // 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"` // 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"` // 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 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"` // The date when this status 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"` // 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"` // 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"` // 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"` // 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 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 { // 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 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 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_role.go
- admin_account_info.go
- admin_action_response.go
- admin_emoji.go
- admin_report.go
- application.go
- attachment.go
- card.go
- context.go
- debug_a_p_url_response.go
- domain.go
- domain_permission.go
- emoji.go
- emoji_category.go
- field.go
- filter_context.go
- filter_v1.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_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
- link.go
- list.go
- marker.go
- media_dimensions.go
- media_focus.go
- media_meta.go
- mention.go
- node_info_services.go
- node_info_software.go
- node_info_usage.go
- node_info_users.go
- nodeinfo.go
- notification.go
- poll.go
- poll_option.go
- relationship.go
- report.go
- search_result.go
- source.go
- status.go
- status_reblogged.go
- swagger_collection.go
- swagger_collection_page.go
- swagger_featured_collection.go
- tag.go
- timeline_marker.go
- token.go
- well_known_response.go