initial commits

master
Charles Iliya Krempeaux 2023-09-26 21:26:34 +09:00
parent 2c51288913
commit d7e593080b
1 changed files with 16 additions and 15 deletions

View File

@ -1,6 +1,7 @@
package ent package ent
import ( import (
"sourcecode.social/reiver/go-jsonint"
"sourcecode.social/reiver/go-opt" "sourcecode.social/reiver/go-opt"
"sourcecode.social/reiver/go-nul" "sourcecode.social/reiver/go-nul"
) )
@ -8,19 +9,19 @@ import (
// See: // See:
// https://docs.joinmastodon.org/entities/PreviewCard/ // https://docs.joinmastodon.org/entities/PreviewCard/
type PreviewCard struct { type PreviewCard struct {
URL opt.Optional[string] `json:"url"` URL opt.Optional[string] `json:"url"`
Title opt.Optional[string] `json:"title"` Title opt.Optional[string] `json:"title"`
Description opt.Optional[string] `json:"description"` Description opt.Optional[string] `json:"description"`
Type opt.Optional[string] `json:"type"` Type opt.Optional[string] `json:"type"`
AuthorName opt.Optional[string] `json:"author_name"` AuthorName opt.Optional[string] `json:"author_name"`
AuthorURL opt.Optional[string] `json:"author_url"` AuthorURL opt.Optional[string] `json:"author_url"`
ProviderName opt.Optional[string] `json:"provider_name"` ProviderName opt.Optional[string] `json:"provider_name"`
ProviderURL opt.Optional[string] `json:"provider_url"` ProviderURL opt.Optional[string] `json:"provider_url"`
HTML opt.Optional[string] `json:"html"` HTML opt.Optional[string] `json:"html"`
Width opt.Optional[string] `json:"width"` Width opt.Optional[jsonint.Int] `json:"width"`
Height opt.Optional[string] `json:"height"` Height opt.Optional[jsonint.Int] `json:"height"`
Image nul.Nullable[string] `json:"image"` Image nul.Nullable[string] `json:"image"`
EmbedURL opt.Optional[string] `json:"embed_url"` EmbedURL opt.Optional[string] `json:"embed_url"`
BlurHash nul.Nullable[string] `json:"blurhash"` BlurHash nul.Nullable[string] `json:"blurhash"`
History []PreviewCardHistory `json:"history"` History []PreviewCardHistory `json:"history"`
} }