Update domain

This commit is contained in:
Elara 2023-04-20 19:27:38 -07:00
parent e21c53eb61
commit 86c9270820
58 changed files with 81 additions and 71 deletions

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"github.com/dave/jennifer/jen" "github.com/dave/jennifer/jen"
"go.arsenm.dev/go-lemmy/cmd/gen/parser" "go.elara.ws/go-lemmy/cmd/gen/parser"
) )
type RoutesGenerator struct { type RoutesGenerator struct {
@ -19,7 +19,7 @@ func NewRoutes(w io.Writer, pkgName string) *RoutesGenerator {
func (r *RoutesGenerator) Generate(routes []parser.Route, impls map[string]string) error { func (r *RoutesGenerator) Generate(routes []parser.Route, impls map[string]string) error {
f := jen.NewFile(r.PkgName) f := jen.NewFile(r.PkgName)
f.HeaderComment("Code generated by go.arsenm.dev/go-lemmy/cmd/gen (routes generator). DO NOT EDIT.") f.HeaderComment("Code generated by go.elara.ws/go-lemmy/cmd/gen (routes generator). DO NOT EDIT.")
for _, r := range routes { for _, r := range routes {
resStruct := impls[r.Struct] resStruct := impls[r.Struct]
@ -28,12 +28,12 @@ func (r *RoutesGenerator) Generate(routes []parser.Route, impls map[string]strin
jen.Id("c").Id("*Client"), jen.Id("c").Id("*Client"),
).Id(transformName(r.Struct)).Params( ).Id(transformName(r.Struct)).Params(
jen.Id("ctx").Qual("context", "Context"), jen.Id("ctx").Qual("context", "Context"),
jen.Id("data").Qual("go.arsenm.dev/go-lemmy/types", r.Struct), jen.Id("data").Qual("go.elara.ws/go-lemmy/types", r.Struct),
).Params( ).Params(
jen.Op("*").Qual("go.arsenm.dev/go-lemmy/types", resStruct), jen.Op("*").Qual("go.elara.ws/go-lemmy/types", resStruct),
jen.Error(), jen.Error(),
).BlockFunc(func(g *jen.Group) { ).BlockFunc(func(g *jen.Group) {
g.Id("resData").Op(":=").Op("&").Qual("go.arsenm.dev/go-lemmy/types", resStruct).Block() g.Id("resData").Op(":=").Op("&").Qual("go.elara.ws/go-lemmy/types", resStruct).Block()
var funcName string var funcName string
switch r.Method { switch r.Method {

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"github.com/dave/jennifer/jen" "github.com/dave/jennifer/jen"
"go.arsenm.dev/go-lemmy/cmd/gen/parser" "go.elara.ws/go-lemmy/cmd/gen/parser"
) )
type StructGenerator struct { type StructGenerator struct {
@ -19,7 +19,7 @@ func NewStruct(w io.Writer, pkgName string) *StructGenerator {
func (s *StructGenerator) Generate(items []parser.Item) error { func (s *StructGenerator) Generate(items []parser.Item) error {
f := jen.NewFile(s.PkgName) f := jen.NewFile(s.PkgName)
f.HeaderComment("Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.") f.HeaderComment("Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.")
for _, item := range items { for _, item := range items {
if item.Struct != nil { if item.Struct != nil {

View File

@ -8,10 +8,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"go.arsenm.dev/go-lemmy/cmd/gen/generator" "go.elara.ws/go-lemmy/cmd/gen/generator"
"go.arsenm.dev/go-lemmy/cmd/gen/parser" "go.elara.ws/go-lemmy/cmd/gen/parser"
"go.arsenm.dev/logger" "go.elara.ws/logger"
"go.arsenm.dev/logger/log" "go.elara.ws/logger/log"
) )
func init() { func init() {

View File

@ -3,8 +3,8 @@ package main
import ( import (
"context" "context"
"go.arsenm.dev/go-lemmy" "go.elara.ws/go-lemmy"
"go.arsenm.dev/go-lemmy/types" "go.elara.ws/go-lemmy/types"
) )
func main() { func main() {

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"log" "log"
"go.arsenm.dev/go-lemmy" "go.elara.ws/go-lemmy"
"go.arsenm.dev/go-lemmy/types" "go.elara.ws/go-lemmy/types"
) )
func main() { func main() {

2
go.mod
View File

@ -7,7 +7,7 @@ require (
github.com/dave/jennifer v1.6.0 github.com/dave/jennifer v1.6.0
github.com/google/go-querystring v1.1.0 github.com/google/go-querystring v1.1.0
github.com/gorilla/websocket v1.4.2 github.com/gorilla/websocket v1.4.2
go.arsenm.dev/logger v0.0.0-20230104225304-d706171ea6df go.elara.ws/logger v0.0.0-20230421022458-e80700db2090
golang.org/x/exp v0.0.0-20230105000112-eab7a2c85304 golang.org/x/exp v0.0.0-20230105000112-eab7a2c85304
) )

6
go.sum
View File

@ -17,12 +17,12 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
go.arsenm.dev/logger v0.0.0-20230104225304-d706171ea6df h1:8mBHvEe7BJmpOeKSMA5YLqrGo9dCpePocTeR0C1+/2w= go.elara.ws/logger v0.0.0-20230421022458-e80700db2090 h1:RVC8XvWo6Yw4HUshqx4TSzuBDScDghafU6QFRJ4xPZg=
go.arsenm.dev/logger v0.0.0-20230104225304-d706171ea6df/go.mod h1:RV2qydKDdoyaRkhAq8JEGvojR8eJ6bjq5WnSIlH7gYw= go.elara.ws/logger v0.0.0-20230421022458-e80700db2090/go.mod h1:qng49owViqsW5Aey93lwBXONw20oGbJIoLVscB16mPM=
golang.org/x/exp v0.0.0-20230105000112-eab7a2c85304 h1:YUqj+XKtfrn3kXjFIiZ8jwKROD7ioAOOHUuo3ZZ2opc= golang.org/x/exp v0.0.0-20230105000112-eab7a2c85304 h1:YUqj+XKtfrn3kXjFIiZ8jwKROD7ioAOOHUuo3ZZ2opc=
golang.org/x/exp v0.0.0-20230105000112-eab7a2c85304/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20230105000112-eab7a2c85304/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

View File

@ -10,7 +10,7 @@ import (
"reflect" "reflect"
"github.com/google/go-querystring/query" "github.com/google/go-querystring/query"
"go.arsenm.dev/go-lemmy/types" "go.elara.ws/go-lemmy/types"
) )
// Client is a client for Lemmy's HTTP API // Client is a client for Lemmy's HTTP API

View File

@ -1,11 +1,11 @@
// Source: lemmy/src/api_routes_http.rs // Source: lemmy/src/api_routes_http.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (routes generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (routes generator). DO NOT EDIT.
package lemmy package lemmy
import ( import (
"context" "context"
types "go.arsenm.dev/go-lemmy/types" types "go.elara.ws/go-lemmy/types"
) )
func (c *Client) Site(ctx context.Context, data types.GetSite) (*types.GetSiteResponse, error) { func (c *Client) Site(ctx context.Context, data types.GetSite) (*types.GetSiteResponse, error) {

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/activity.rs // Source: lemmy/crates/db_schema/src/source/activity.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/actor_language.rs // Source: lemmy/crates/db_schema/src/source/actor_language.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/comment.rs // Source: lemmy/crates/db_schema/src/source/comment.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/comment.rs // Source: lemmy/crates/api_common/src/comment.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/comment_reply.rs // Source: lemmy/crates/db_schema/src/source/comment_reply.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/comment_report.rs // Source: lemmy/crates/db_schema/src/source/comment_report.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/community.rs // Source: lemmy/crates/db_schema/src/source/community.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types
@ -23,6 +23,8 @@ type Community struct {
FollowersURL string `json:"followers_url" url:"followers_url,omitempty"` FollowersURL string `json:"followers_url" url:"followers_url,omitempty"`
InboxURL string `json:"inbox_url" url:"inbox_url,omitempty"` InboxURL string `json:"inbox_url" url:"inbox_url,omitempty"`
SharedInboxURL Optional[string] `json:"shared_inbox_url" url:"shared_inbox_url,omitempty"` SharedInboxURL Optional[string] `json:"shared_inbox_url" url:"shared_inbox_url,omitempty"`
ModeratorsURL Optional[string] `json:"moderators_url" url:"moderators_url,omitempty"`
FeaturedURL Optional[string] `json:"featured_url" url:"featured_url,omitempty"`
Hidden bool `json:"hidden" url:"hidden,omitempty"` Hidden bool `json:"hidden" url:"hidden,omitempty"`
PostingRestrictedToMods bool `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"` PostingRestrictedToMods bool `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"`
InstanceID int `json:"instance_id" url:"instance_id,omitempty"` InstanceID int `json:"instance_id" url:"instance_id,omitempty"`
@ -64,6 +66,8 @@ type CommunityInsertForm struct {
FollowersURL Optional[string] `json:"followers_url" url:"followers_url,omitempty"` FollowersURL Optional[string] `json:"followers_url" url:"followers_url,omitempty"`
InboxURL Optional[string] `json:"inbox_url" url:"inbox_url,omitempty"` InboxURL Optional[string] `json:"inbox_url" url:"inbox_url,omitempty"`
SharedInboxURL Optional[string] `json:"shared_inbox_url" url:"shared_inbox_url,omitempty"` SharedInboxURL Optional[string] `json:"shared_inbox_url" url:"shared_inbox_url,omitempty"`
ModeratorsURL Optional[string] `json:"moderators_url" url:"moderators_url,omitempty"`
FeaturedURL Optional[string] `json:"featured_url" url:"featured_url,omitempty"`
Hidden Optional[bool] `json:"hidden" url:"hidden,omitempty"` Hidden Optional[bool] `json:"hidden" url:"hidden,omitempty"`
PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"` PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"`
InstanceID int `json:"instance_id" url:"instance_id,omitempty"` InstanceID int `json:"instance_id" url:"instance_id,omitempty"`
@ -86,6 +90,8 @@ type CommunityUpdateForm struct {
FollowersURL Optional[string] `json:"followers_url" url:"followers_url,omitempty"` FollowersURL Optional[string] `json:"followers_url" url:"followers_url,omitempty"`
InboxURL Optional[string] `json:"inbox_url" url:"inbox_url,omitempty"` InboxURL Optional[string] `json:"inbox_url" url:"inbox_url,omitempty"`
SharedInboxURL Optional[Optional[string]] `json:"shared_inbox_url" url:"shared_inbox_url,omitempty"` SharedInboxURL Optional[Optional[string]] `json:"shared_inbox_url" url:"shared_inbox_url,omitempty"`
ModeratorsURL Optional[string] `json:"moderators_url" url:"moderators_url,omitempty"`
FeaturedURL Optional[string] `json:"featured_url" url:"featured_url,omitempty"`
Hidden Optional[bool] `json:"hidden" url:"hidden,omitempty"` Hidden Optional[bool] `json:"hidden" url:"hidden,omitempty"`
PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"` PostingRestrictedToMods Optional[bool] `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"`
} }

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/community.rs // Source: lemmy/crates/api_common/src/community.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/community_block.rs // Source: lemmy/crates/db_schema/src/source/community_block.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/email_verification.rs // Source: lemmy/crates/db_schema/src/source/email_verification.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/federation_allowlist.rs // Source: lemmy/crates/db_schema/src/source/federation_allowlist.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/federation_blocklist.rs // Source: lemmy/crates/db_schema/src/source/federation_blocklist.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,4 +1,4 @@
// Source: lemmy/crates/api_common/src/websocket/handlers.rs // Source: lemmy/crates/api_common/src/websocket/handlers.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/instance.rs // Source: lemmy/crates/db_schema/src/source/instance.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/language.rs // Source: lemmy/crates/db_schema/src/source/language.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/lib.rs // Source: lemmy/crates/db_schema/src/lib.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,4 +1,4 @@
// Source: lemmy/crates/api_common/src/lib.rs // Source: lemmy/crates/api_common/src/lib.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/local_site.rs // Source: lemmy/crates/db_schema/src/source/local_site.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types
@ -26,6 +26,7 @@ type LocalSite struct {
CaptchaEnabled bool `json:"captcha_enabled" url:"captcha_enabled,omitempty"` CaptchaEnabled bool `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
CaptchaDifficulty string `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"` CaptchaDifficulty string `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
RegistrationMode RegistrationMode `json:"registration_mode" url:"registration_mode,omitempty"` RegistrationMode RegistrationMode `json:"registration_mode" url:"registration_mode,omitempty"`
ReportsEmailAdmins bool `json:"reports_email_admins" url:"reports_email_admins,omitempty"`
Published LemmyTime `json:"published" url:"published,omitempty"` Published LemmyTime `json:"published" url:"published,omitempty"`
Updated LemmyTime `json:"updated" url:"updated,omitempty"` Updated LemmyTime `json:"updated" url:"updated,omitempty"`
} }
@ -51,6 +52,7 @@ type LocalSiteInsertForm struct {
CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"` CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"` CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"` RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"`
ReportsEmailAdmins Optional[bool] `json:"reports_email_admins" url:"reports_email_admins,omitempty"`
} }
type LocalSiteUpdateForm struct { type LocalSiteUpdateForm struct {
SiteSetup Optional[bool] `json:"site_setup" url:"site_setup,omitempty"` SiteSetup Optional[bool] `json:"site_setup" url:"site_setup,omitempty"`
@ -73,6 +75,7 @@ type LocalSiteUpdateForm struct {
CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"` CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"` CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"` RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"`
ReportsEmailAdmins Optional[bool] `json:"reports_email_admins" url:"reports_email_admins,omitempty"`
Updated LemmyTime `json:"updated" url:"updated,omitempty"` Updated LemmyTime `json:"updated" url:"updated,omitempty"`
} }
type RegistrationMode string type RegistrationMode string

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/local_site_rate_limit.rs // Source: lemmy/crates/db_schema/src/source/local_site_rate_limit.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/local_user.rs // Source: lemmy/crates/db_schema/src/source/local_user.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,4 +1,4 @@
// Source: lemmy/crates/db_schema/src/source/mod.rs // Source: lemmy/crates/db_schema/src/source/mod.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/websocket/mod.rs // Source: lemmy/crates/api_common/src/websocket/mod.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/moderator.rs // Source: lemmy/crates/db_schema/src/source/moderator.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/password_reset_request.rs // Source: lemmy/crates/db_schema/src/source/password_reset_request.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/person.rs // Source: lemmy/crates/db_schema/src/source/person.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/person.rs // Source: lemmy/crates/api_common/src/person.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/person_block.rs // Source: lemmy/crates/db_schema/src/source/person_block.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/person_mention.rs // Source: lemmy/crates/db_schema/src/source/person_mention.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/post.rs // Source: lemmy/crates/db_schema/src/source/post.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/post.rs // Source: lemmy/crates/api_common/src/post.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/post_report.rs // Source: lemmy/crates/db_schema/src/source/post_report.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/private_message.rs // Source: lemmy/crates/db_schema/src/source/private_message.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/private_message.rs // Source: lemmy/crates/api_common/src/private_message.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/private_message_report.rs // Source: lemmy/crates/db_schema/src/source/private_message_report.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/registration_application.rs // Source: lemmy/crates/db_schema/src/source/registration_application.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,4 +1,4 @@
// Source: lemmy/crates/api_common/src/request.rs // Source: lemmy/crates/api_common/src/request.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/secret.rs // Source: lemmy/crates/db_schema/src/source/secret.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,4 +1,4 @@
// Source: lemmy/crates/api_common/src/websocket/send.rs // Source: lemmy/crates/api_common/src/websocket/send.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,4 +1,4 @@
// Source: lemmy/crates/api_common/src/sensitive.rs // Source: lemmy/crates/api_common/src/sensitive.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/site.rs // Source: lemmy/crates/db_schema/src/source/site.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/site.rs // Source: lemmy/crates/api_common/src/site.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types
@ -145,6 +145,7 @@ type EditSite struct {
BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"` BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"`
Taglines Optional[[]string] `json:"taglines" url:"taglines,omitempty"` Taglines Optional[[]string] `json:"taglines" url:"taglines,omitempty"`
RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"` RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"`
ReportsEmailAdmins Optional[bool] `json:"reports_email_admins" url:"reports_email_admins,omitempty"`
Auth string `json:"auth" url:"auth,omitempty"` Auth string `json:"auth" url:"auth,omitempty"`
} }
type GetSite struct { type GetSite struct {

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_views_actor/src/structs.rs // Source: lemmy/crates/db_views_actor/src/structs.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_views/src/structs.rs // Source: lemmy/crates/db_views/src/structs.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_views_moderator/src/structs.rs // Source: lemmy/crates/db_views_moderator/src/structs.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/aggregates/structs.rs // Source: lemmy/crates/db_schema/src/aggregates/structs.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/websocket/structs.rs // Source: lemmy/crates/api_common/src/websocket/structs.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/db_schema/src/source/tagline.rs // Source: lemmy/crates/db_schema/src/source/tagline.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -1,5 +1,5 @@
// Source: lemmy/crates/api_common/src/utils.rs // Source: lemmy/crates/api_common/src/utils.rs
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT. // Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package types package types

View File

@ -12,7 +12,7 @@ import (
"github.com/cenkalti/backoff/v4" "github.com/cenkalti/backoff/v4"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"go.arsenm.dev/go-lemmy/types" "go.elara.ws/go-lemmy/types"
) )
type authData struct { type authData struct {