mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 14:28:20 +01:00
26 lines
792 B
Go
26 lines
792 B
Go
package versia
|
|
|
|
// Attachment is a file or other piece of content that is attached to a post. For more information, see the [Spec].
|
|
//
|
|
// [Spec]: https://lysand.org/structures/content-format
|
|
type Attachment struct {
|
|
// URL to the attachment
|
|
Content string `json:"content"`
|
|
Description string `json:"description"`
|
|
Hash DataHash `json:"hash"`
|
|
Size int `json:"size"`
|
|
|
|
// BlurHash is available when the content type is an image
|
|
BlurHash *string `json:"blurhash,omitempty"`
|
|
// BlurHash is available when the content type is an image
|
|
Height *int `json:"height,omitempty"`
|
|
// BlurHash is available when the content type is an image
|
|
Width *int `json:"width,omitempty"`
|
|
|
|
FPS *int `json:"fps,omitempty"`
|
|
}
|
|
|
|
type DataHash struct {
|
|
SHA256 string `json:"sha256"`
|
|
}
|