From eeb0d4cdf55f1d5f7698968dfa478134bd844cfe Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Tue, 26 Sep 2023 19:08:56 +0900 Subject: [PATCH] initial commits --- ent/mediaattachment.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ent/mediaattachment.go diff --git a/ent/mediaattachment.go b/ent/mediaattachment.go new file mode 100644 index 0000000..ebf1327 --- /dev/null +++ b/ent/mediaattachment.go @@ -0,0 +1,21 @@ +package ent + +import ( + "encoding/json" + + "sourcecode.social/reiver/go-opt" + "sourcecode.social/reiver/go-nul" +) + +// See: +// https://docs.joinmastodon.org/entities/MediaAttachment/ +type MediaAttachment struct { + ID opt.Optional[string] `json:"id"` + Type opt.Optional[string] `json:"type"` + URL opt.Optional[string] `json:"url"` + PreviewURL opt.Optional[string] `json:"preview_url"` + RemoteURL nul.Nullable[string] `json:"remote_url"` + Meta json.RawMessage `json:"meta"` + Description opt.Optional[string] `json:"description"` + BlurHash opt.Optional[string] `json:"blurhash"` +}