go-mstdn/ent/previewcard.go

28 lines
1.0 KiB
Go
Raw Normal View History

2023-09-26 09:38:31 +00:00
package ent
import (
"github.com/reiver/go-jsonint"
"github.com/reiver/go-opt"
2023-09-26 09:38:31 +00:00
"sourcecode.social/reiver/go-nul"
)
2023-09-26 12:14:44 +00:00
// See:
// https://docs.joinmastodon.org/entities/PreviewCard/
2023-09-26 09:38:31 +00:00
type PreviewCard struct {
2023-09-26 12:26:34 +00:00
URL opt.Optional[string] `json:"url"`
Title opt.Optional[string] `json:"title"`
Description opt.Optional[string] `json:"description"`
Type opt.Optional[string] `json:"type"`
AuthorName opt.Optional[string] `json:"author_name"`
AuthorURL opt.Optional[string] `json:"author_url"`
ProviderName opt.Optional[string] `json:"provider_name"`
ProviderURL opt.Optional[string] `json:"provider_url"`
HTML opt.Optional[string] `json:"html"`
Width opt.Optional[jsonint.Int] `json:"width"`
Height opt.Optional[jsonint.Int] `json:"height"`
Image nul.Nullable[string] `json:"image"`
EmbedURL opt.Optional[string] `json:"embed_url"`
BlurHash nul.Nullable[string] `json:"blurhash"`
History []PreviewCardHistory `json:"history"`
2023-09-26 09:38:31 +00:00
}