From 04f3882fffc712b5374efdf95cafe70d5da762a2 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Thu, 28 Sep 2023 09:39:41 +0900 Subject: [PATCH] initial commits --- ent/admn/dimension.go | 8 -------- ent/admn/dimensiondata.go | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 ent/admn/dimensiondata.go diff --git a/ent/admn/dimension.go b/ent/admn/dimension.go index 12d7371..824ec24 100644 --- a/ent/admn/dimension.go +++ b/ent/admn/dimension.go @@ -12,11 +12,3 @@ type Dimension struct { Key opt.Optional[string] `json:"key"` Data []DimensionData `json:"data"` } - -type DimensionData struct { - Key opt.Optional[string] `json:"key"` - HumanKey opt.Optional[string] `json:"human_key"` - Value opt.Optional[string] `json:"value"` - Unit opt.Optional[string] `json:"unit"` - HumanValue opt.Optional[string] `json:"human_value"` -} diff --git a/ent/admn/dimensiondata.go b/ent/admn/dimensiondata.go new file mode 100644 index 0000000..64d18f5 --- /dev/null +++ b/ent/admn/dimensiondata.go @@ -0,0 +1,18 @@ +package admn + +import ( + "sourcecode.social/reiver/go-opt" +) + + +// DimensionData represents a Mastodon API "Admin::Dimension Data". +// +// See: +// https://web.archive.org/web/20230716101711/https://docs.joinmastodon.org/entities/Admin_Dimension/#data +type DimensionData struct { + Key opt.Optional[string] `json:"key"` + HumanKey opt.Optional[string] `json:"human_key"` + Value opt.Optional[string] `json:"value"` + Unit opt.Optional[string] `json:"unit"` + HumanValue opt.Optional[string] `json:"human_value"` +}