Compare commits

...

2 Commits

Author SHA1 Message Date
Charles Iliya Krempeaux 82f6077784 initial commits 2023-09-26 15:46:02 +09:00
Charles Iliya Krempeaux bbb540c463 initial commits 2023-09-26 15:45:55 +09:00
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,38 @@
package admn
import (
"sourcecode.social/reiver/go-opt"
"sourcecode.social/reiver/go-nul"
"sourcecode.social/reiver/go-mstdn/ent"
)
// Account represents a Mastodon API "Admin::Account".
//
// Note that this is NOT an admin-account.
// But instead this is an administrated-account.
// I.e., the administrator's view of an account.
//
// See:
// https://docs.joinmastodon.org/entities/Admin_Account/
type Account struct {
ID opt.Optional[string] `json:"id"`
UserName opt.Optional[string] `json:"username"`
Domain nul.Nullable[string] `json:"domain"`
CreatedAt opt.Optional[string] `json:"created_at"`
EMail opt.Optional[string] `json:"email"`
IP nul.Nullable[string] `json:"ip"`
IPs []IP `json:"ips"`
Locale nul.Nullable[string] `json:"locale"`
InviteRequest nul.Nullable[string] `json:"invite_request"`
Role ent.Role `json:"role"`
Confirmed opt.Optional[bool] `json:"confirmed"`
Approved opt.Optional[bool] `json:"approved"`
Disabled opt.Optional[bool] `json:"disabled"`
Silenced opt.Optional[bool] `json:"silenced"`
Suspended opt.Optional[bool] `json:"suspended"`
Account ent.Account `json:"account"`
CreatedByApplicationID opt.Optional[string] `json:"created_by_application_id"`
InvitedByAccountID opt.Optional[string] `json:"invited_by_account_id"`
}

View File

@ -2,7 +2,6 @@ package admn
import ( import (
"sourcecode.social/reiver/go-opt" "sourcecode.social/reiver/go-opt"
"sourcecode.social/reiver/go-nul"
) )
// IP represents a Mastodon API "Admin::Ip". // IP represents a Mastodon API "Admin::Ip".