Compare commits
2 Commits
e21c53eb61
...
v0.17.3
| Author | SHA1 | Date | |
|---|---|---|---|
| ff36330625 | |||
| 86c9270820 |
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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() {
|
||||||
@@ -44,7 +44,7 @@ func main() {
|
|||||||
|
|
||||||
baseStructDir := filepath.Join(*outDir, "types")
|
baseStructDir := filepath.Join(*outDir, "types")
|
||||||
sp := parser.NewStruct(nil)
|
sp := parser.NewStruct(nil)
|
||||||
sp.Skip = []string{"LemmyContext"}
|
sp.Skip = []string{"LemmyContext", "Recipient", "WsMessage", "Connect", "SessionInfo"}
|
||||||
for _, structDir := range structDirs {
|
for _, structDir := range structDirs {
|
||||||
dir := filepath.Join(*lemmyDir, structDir)
|
dir := filepath.Join(*lemmyDir, structDir)
|
||||||
err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
|
err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -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
2
go.mod
@@ -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
6
go.sum
@@ -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=
|
||||||
|
|||||||
2
lemmy.go
2
lemmy.go
@@ -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
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
12
types/captcha.gen.go
Normal file
12
types/captcha.gen.go
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// Source: lemmy/crates/api_common/src/websocket/handlers/captcha.rs
|
||||||
|
// Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
||||||
|
|
||||||
|
package types
|
||||||
|
|
||||||
|
type AddCaptcha struct {
|
||||||
|
Captcha CaptchaItem `json:"captcha" url:"captcha,omitempty"`
|
||||||
|
}
|
||||||
|
type CheckCaptcha struct {
|
||||||
|
Uuid string `json:"uuid" url:"uuid,omitempty"`
|
||||||
|
Answer string `json:"answer" url:"answer,omitempty"`
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
8
types/connect.gen.go
Normal file
8
types/connect.gen.go
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// Source: lemmy/crates/api_common/src/websocket/handlers/connect.rs
|
||||||
|
// Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
||||||
|
|
||||||
|
package types
|
||||||
|
|
||||||
|
type Disconnect struct {
|
||||||
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
// Source: lemmy/crates/api_common/src/websocket/handlers.rs
|
|
||||||
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
|
||||||
|
|
||||||
package types
|
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
21
types/join_rooms.gen.go
Normal file
21
types/join_rooms.gen.go
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Source: lemmy/crates/api_common/src/websocket/handlers/join_rooms.rs
|
||||||
|
// Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
||||||
|
|
||||||
|
package types
|
||||||
|
|
||||||
|
type JoinPostRoom struct {
|
||||||
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
|
}
|
||||||
|
type JoinCommunityRoom struct {
|
||||||
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
|
}
|
||||||
|
type JoinModRoom struct {
|
||||||
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
|
}
|
||||||
|
type JoinUserRoom struct {
|
||||||
|
UserID int `json:"user_id" url:"user_id,omitempty"`
|
||||||
|
ID int `json:"id" url:"id,omitempty"`
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
29
types/messages.gen.go
Normal file
29
types/messages.gen.go
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// Source: lemmy/crates/api_common/src/websocket/handlers/messages.rs
|
||||||
|
// Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
||||||
|
|
||||||
|
package types
|
||||||
|
|
||||||
|
type SendPostRoomMessage struct {
|
||||||
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
|
Message string `json:"message" url:"message,omitempty"`
|
||||||
|
WebsocketID Optional[int] `json:"websocket_id" url:"websocket_id,omitempty"`
|
||||||
|
}
|
||||||
|
type SendCommunityRoomMessage struct {
|
||||||
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
|
Message string `json:"message" url:"message,omitempty"`
|
||||||
|
WebsocketID Optional[int] `json:"websocket_id" url:"websocket_id,omitempty"`
|
||||||
|
}
|
||||||
|
type SendModRoomMessage struct {
|
||||||
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
|
Message string `json:"message" url:"message,omitempty"`
|
||||||
|
WebsocketID Optional[int] `json:"websocket_id" url:"websocket_id,omitempty"`
|
||||||
|
}
|
||||||
|
type SendUserRoomMessage struct {
|
||||||
|
RecipientID int `json:"recipient_id" url:"recipient_id,omitempty"`
|
||||||
|
Message string `json:"message" url:"message,omitempty"`
|
||||||
|
WebsocketID Optional[int] `json:"websocket_id" url:"websocket_id,omitempty"`
|
||||||
|
}
|
||||||
|
type SendAllMessage struct {
|
||||||
|
Message string `json:"message" url:"message,omitempty"`
|
||||||
|
WebsocketID Optional[int] `json:"websocket_id" url:"websocket_id,omitempty"`
|
||||||
|
}
|
||||||
@@ -1,4 +1,103 @@
|
|||||||
// Source: lemmy/crates/db_schema/src/source/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
|
||||||
|
|
||||||
|
type UserOperation string
|
||||||
|
|
||||||
|
const (
|
||||||
|
UserOperationLogin UserOperation = "Login"
|
||||||
|
UserOperationGetCaptcha UserOperation = "GetCaptcha"
|
||||||
|
UserOperationSaveComment UserOperation = "SaveComment"
|
||||||
|
UserOperationCreateCommentLike UserOperation = "CreateCommentLike"
|
||||||
|
UserOperationCreateCommentReport UserOperation = "CreateCommentReport"
|
||||||
|
UserOperationResolveCommentReport UserOperation = "ResolveCommentReport"
|
||||||
|
UserOperationListCommentReports UserOperation = "ListCommentReports"
|
||||||
|
UserOperationCreatePostLike UserOperation = "CreatePostLike"
|
||||||
|
UserOperationLockPost UserOperation = "LockPost"
|
||||||
|
UserOperationFeaturePost UserOperation = "FeaturePost"
|
||||||
|
UserOperationMarkPostAsRead UserOperation = "MarkPostAsRead"
|
||||||
|
UserOperationSavePost UserOperation = "SavePost"
|
||||||
|
UserOperationCreatePostReport UserOperation = "CreatePostReport"
|
||||||
|
UserOperationResolvePostReport UserOperation = "ResolvePostReport"
|
||||||
|
UserOperationListPostReports UserOperation = "ListPostReports"
|
||||||
|
UserOperationGetReportCount UserOperation = "GetReportCount"
|
||||||
|
UserOperationGetUnreadCount UserOperation = "GetUnreadCount"
|
||||||
|
UserOperationVerifyEmail UserOperation = "VerifyEmail"
|
||||||
|
UserOperationFollowCommunity UserOperation = "FollowCommunity"
|
||||||
|
UserOperationGetReplies UserOperation = "GetReplies"
|
||||||
|
UserOperationGetPersonMentions UserOperation = "GetPersonMentions"
|
||||||
|
UserOperationMarkPersonMentionAsRead UserOperation = "MarkPersonMentionAsRead"
|
||||||
|
UserOperationMarkCommentReplyAsRead UserOperation = "MarkCommentReplyAsRead"
|
||||||
|
UserOperationGetModlog UserOperation = "GetModlog"
|
||||||
|
UserOperationBanFromCommunity UserOperation = "BanFromCommunity"
|
||||||
|
UserOperationAddModToCommunity UserOperation = "AddModToCommunity"
|
||||||
|
UserOperationAddAdmin UserOperation = "AddAdmin"
|
||||||
|
UserOperationGetUnreadRegistrationApplicationCount UserOperation = "GetUnreadRegistrationApplicationCount"
|
||||||
|
UserOperationListRegistrationApplications UserOperation = "ListRegistrationApplications"
|
||||||
|
UserOperationApproveRegistrationApplication UserOperation = "ApproveRegistrationApplication"
|
||||||
|
UserOperationBanPerson UserOperation = "BanPerson"
|
||||||
|
UserOperationGetBannedPersons UserOperation = "GetBannedPersons"
|
||||||
|
UserOperationMarkAllAsRead UserOperation = "MarkAllAsRead"
|
||||||
|
UserOperationSaveUserSettings UserOperation = "SaveUserSettings"
|
||||||
|
UserOperationTransferCommunity UserOperation = "TransferCommunity"
|
||||||
|
UserOperationLeaveAdmin UserOperation = "LeaveAdmin"
|
||||||
|
UserOperationPasswordReset UserOperation = "PasswordReset"
|
||||||
|
UserOperationPasswordChange UserOperation = "PasswordChange"
|
||||||
|
UserOperationMarkPrivateMessageAsRead UserOperation = "MarkPrivateMessageAsRead"
|
||||||
|
UserOperationCreatePrivateMessageReport UserOperation = "CreatePrivateMessageReport"
|
||||||
|
UserOperationResolvePrivateMessageReport UserOperation = "ResolvePrivateMessageReport"
|
||||||
|
UserOperationListPrivateMessageReports UserOperation = "ListPrivateMessageReports"
|
||||||
|
UserOperationUserJoin UserOperation = "UserJoin"
|
||||||
|
UserOperationPostJoin UserOperation = "PostJoin"
|
||||||
|
UserOperationCommunityJoin UserOperation = "CommunityJoin"
|
||||||
|
UserOperationModJoin UserOperation = "ModJoin"
|
||||||
|
UserOperationChangePassword UserOperation = "ChangePassword"
|
||||||
|
UserOperationGetSiteMetadata UserOperation = "GetSiteMetadata"
|
||||||
|
UserOperationBlockCommunity UserOperation = "BlockCommunity"
|
||||||
|
UserOperationBlockPerson UserOperation = "BlockPerson"
|
||||||
|
UserOperationPurgePerson UserOperation = "PurgePerson"
|
||||||
|
UserOperationPurgeCommunity UserOperation = "PurgeCommunity"
|
||||||
|
UserOperationPurgePost UserOperation = "PurgePost"
|
||||||
|
UserOperationPurgeComment UserOperation = "PurgeComment"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UserOperationCRUD string
|
||||||
|
|
||||||
|
const (
|
||||||
|
UserOperationCRUDCreateSite UserOperationCRUD = "CreateSite"
|
||||||
|
UserOperationCRUDGetSite UserOperationCRUD = "GetSite"
|
||||||
|
UserOperationCRUDEditSite UserOperationCRUD = "EditSite"
|
||||||
|
UserOperationCRUDCreateCommunity UserOperationCRUD = "CreateCommunity"
|
||||||
|
UserOperationCRUDListCommunities UserOperationCRUD = "ListCommunities"
|
||||||
|
UserOperationCRUDEditCommunity UserOperationCRUD = "EditCommunity"
|
||||||
|
UserOperationCRUDDeleteCommunity UserOperationCRUD = "DeleteCommunity"
|
||||||
|
UserOperationCRUDRemoveCommunity UserOperationCRUD = "RemoveCommunity"
|
||||||
|
UserOperationCRUDCreatePost UserOperationCRUD = "CreatePost"
|
||||||
|
UserOperationCRUDGetPost UserOperationCRUD = "GetPost"
|
||||||
|
UserOperationCRUDEditPost UserOperationCRUD = "EditPost"
|
||||||
|
UserOperationCRUDDeletePost UserOperationCRUD = "DeletePost"
|
||||||
|
UserOperationCRUDRemovePost UserOperationCRUD = "RemovePost"
|
||||||
|
UserOperationCRUDCreateComment UserOperationCRUD = "CreateComment"
|
||||||
|
UserOperationCRUDGetComment UserOperationCRUD = "GetComment"
|
||||||
|
UserOperationCRUDEditComment UserOperationCRUD = "EditComment"
|
||||||
|
UserOperationCRUDDeleteComment UserOperationCRUD = "DeleteComment"
|
||||||
|
UserOperationCRUDRemoveComment UserOperationCRUD = "RemoveComment"
|
||||||
|
UserOperationCRUDRegister UserOperationCRUD = "Register"
|
||||||
|
UserOperationCRUDDeleteAccount UserOperationCRUD = "DeleteAccount"
|
||||||
|
UserOperationCRUDCreatePrivateMessage UserOperationCRUD = "CreatePrivateMessage"
|
||||||
|
UserOperationCRUDGetPrivateMessages UserOperationCRUD = "GetPrivateMessages"
|
||||||
|
UserOperationCRUDEditPrivateMessage UserOperationCRUD = "EditPrivateMessage"
|
||||||
|
UserOperationCRUDDeletePrivateMessage UserOperationCRUD = "DeletePrivateMessage"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UserOperationApub string
|
||||||
|
|
||||||
|
const (
|
||||||
|
UserOperationApubGetPosts UserOperationApub = "GetPosts"
|
||||||
|
UserOperationApubGetCommunity UserOperationApub = "GetCommunity"
|
||||||
|
UserOperationApubGetComments UserOperationApub = "GetComments"
|
||||||
|
UserOperationApubGetPersonDetails UserOperationApub = "GetPersonDetails"
|
||||||
|
UserOperationApubSearch UserOperationApub = "Search"
|
||||||
|
UserOperationApubResolveObject UserOperationApub = "ResolveObject"
|
||||||
|
)
|
||||||
|
|||||||
4
types/mod.2.gen.go
Normal file
4
types/mod.2.gen.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
// Source: lemmy/crates/db_schema/src/source/mod.rs
|
||||||
|
// Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
||||||
|
|
||||||
|
package types
|
||||||
103
types/mod.gen.go
103
types/mod.gen.go
@@ -1,103 +1,4 @@
|
|||||||
// Source: lemmy/crates/api_common/src/websocket/mod.rs
|
// Source: lemmy/crates/api_common/src/websocket/handlers/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
|
||||||
|
|
||||||
type UserOperation string
|
|
||||||
|
|
||||||
const (
|
|
||||||
UserOperationLogin UserOperation = "Login"
|
|
||||||
UserOperationGetCaptcha UserOperation = "GetCaptcha"
|
|
||||||
UserOperationSaveComment UserOperation = "SaveComment"
|
|
||||||
UserOperationCreateCommentLike UserOperation = "CreateCommentLike"
|
|
||||||
UserOperationCreateCommentReport UserOperation = "CreateCommentReport"
|
|
||||||
UserOperationResolveCommentReport UserOperation = "ResolveCommentReport"
|
|
||||||
UserOperationListCommentReports UserOperation = "ListCommentReports"
|
|
||||||
UserOperationCreatePostLike UserOperation = "CreatePostLike"
|
|
||||||
UserOperationLockPost UserOperation = "LockPost"
|
|
||||||
UserOperationFeaturePost UserOperation = "FeaturePost"
|
|
||||||
UserOperationMarkPostAsRead UserOperation = "MarkPostAsRead"
|
|
||||||
UserOperationSavePost UserOperation = "SavePost"
|
|
||||||
UserOperationCreatePostReport UserOperation = "CreatePostReport"
|
|
||||||
UserOperationResolvePostReport UserOperation = "ResolvePostReport"
|
|
||||||
UserOperationListPostReports UserOperation = "ListPostReports"
|
|
||||||
UserOperationGetReportCount UserOperation = "GetReportCount"
|
|
||||||
UserOperationGetUnreadCount UserOperation = "GetUnreadCount"
|
|
||||||
UserOperationVerifyEmail UserOperation = "VerifyEmail"
|
|
||||||
UserOperationFollowCommunity UserOperation = "FollowCommunity"
|
|
||||||
UserOperationGetReplies UserOperation = "GetReplies"
|
|
||||||
UserOperationGetPersonMentions UserOperation = "GetPersonMentions"
|
|
||||||
UserOperationMarkPersonMentionAsRead UserOperation = "MarkPersonMentionAsRead"
|
|
||||||
UserOperationMarkCommentReplyAsRead UserOperation = "MarkCommentReplyAsRead"
|
|
||||||
UserOperationGetModlog UserOperation = "GetModlog"
|
|
||||||
UserOperationBanFromCommunity UserOperation = "BanFromCommunity"
|
|
||||||
UserOperationAddModToCommunity UserOperation = "AddModToCommunity"
|
|
||||||
UserOperationAddAdmin UserOperation = "AddAdmin"
|
|
||||||
UserOperationGetUnreadRegistrationApplicationCount UserOperation = "GetUnreadRegistrationApplicationCount"
|
|
||||||
UserOperationListRegistrationApplications UserOperation = "ListRegistrationApplications"
|
|
||||||
UserOperationApproveRegistrationApplication UserOperation = "ApproveRegistrationApplication"
|
|
||||||
UserOperationBanPerson UserOperation = "BanPerson"
|
|
||||||
UserOperationGetBannedPersons UserOperation = "GetBannedPersons"
|
|
||||||
UserOperationMarkAllAsRead UserOperation = "MarkAllAsRead"
|
|
||||||
UserOperationSaveUserSettings UserOperation = "SaveUserSettings"
|
|
||||||
UserOperationTransferCommunity UserOperation = "TransferCommunity"
|
|
||||||
UserOperationLeaveAdmin UserOperation = "LeaveAdmin"
|
|
||||||
UserOperationPasswordReset UserOperation = "PasswordReset"
|
|
||||||
UserOperationPasswordChange UserOperation = "PasswordChange"
|
|
||||||
UserOperationMarkPrivateMessageAsRead UserOperation = "MarkPrivateMessageAsRead"
|
|
||||||
UserOperationCreatePrivateMessageReport UserOperation = "CreatePrivateMessageReport"
|
|
||||||
UserOperationResolvePrivateMessageReport UserOperation = "ResolvePrivateMessageReport"
|
|
||||||
UserOperationListPrivateMessageReports UserOperation = "ListPrivateMessageReports"
|
|
||||||
UserOperationUserJoin UserOperation = "UserJoin"
|
|
||||||
UserOperationPostJoin UserOperation = "PostJoin"
|
|
||||||
UserOperationCommunityJoin UserOperation = "CommunityJoin"
|
|
||||||
UserOperationModJoin UserOperation = "ModJoin"
|
|
||||||
UserOperationChangePassword UserOperation = "ChangePassword"
|
|
||||||
UserOperationGetSiteMetadata UserOperation = "GetSiteMetadata"
|
|
||||||
UserOperationBlockCommunity UserOperation = "BlockCommunity"
|
|
||||||
UserOperationBlockPerson UserOperation = "BlockPerson"
|
|
||||||
UserOperationPurgePerson UserOperation = "PurgePerson"
|
|
||||||
UserOperationPurgeCommunity UserOperation = "PurgeCommunity"
|
|
||||||
UserOperationPurgePost UserOperation = "PurgePost"
|
|
||||||
UserOperationPurgeComment UserOperation = "PurgeComment"
|
|
||||||
)
|
|
||||||
|
|
||||||
type UserOperationCRUD string
|
|
||||||
|
|
||||||
const (
|
|
||||||
UserOperationCRUDCreateSite UserOperationCRUD = "CreateSite"
|
|
||||||
UserOperationCRUDGetSite UserOperationCRUD = "GetSite"
|
|
||||||
UserOperationCRUDEditSite UserOperationCRUD = "EditSite"
|
|
||||||
UserOperationCRUDCreateCommunity UserOperationCRUD = "CreateCommunity"
|
|
||||||
UserOperationCRUDListCommunities UserOperationCRUD = "ListCommunities"
|
|
||||||
UserOperationCRUDEditCommunity UserOperationCRUD = "EditCommunity"
|
|
||||||
UserOperationCRUDDeleteCommunity UserOperationCRUD = "DeleteCommunity"
|
|
||||||
UserOperationCRUDRemoveCommunity UserOperationCRUD = "RemoveCommunity"
|
|
||||||
UserOperationCRUDCreatePost UserOperationCRUD = "CreatePost"
|
|
||||||
UserOperationCRUDGetPost UserOperationCRUD = "GetPost"
|
|
||||||
UserOperationCRUDEditPost UserOperationCRUD = "EditPost"
|
|
||||||
UserOperationCRUDDeletePost UserOperationCRUD = "DeletePost"
|
|
||||||
UserOperationCRUDRemovePost UserOperationCRUD = "RemovePost"
|
|
||||||
UserOperationCRUDCreateComment UserOperationCRUD = "CreateComment"
|
|
||||||
UserOperationCRUDGetComment UserOperationCRUD = "GetComment"
|
|
||||||
UserOperationCRUDEditComment UserOperationCRUD = "EditComment"
|
|
||||||
UserOperationCRUDDeleteComment UserOperationCRUD = "DeleteComment"
|
|
||||||
UserOperationCRUDRemoveComment UserOperationCRUD = "RemoveComment"
|
|
||||||
UserOperationCRUDRegister UserOperationCRUD = "Register"
|
|
||||||
UserOperationCRUDDeleteAccount UserOperationCRUD = "DeleteAccount"
|
|
||||||
UserOperationCRUDCreatePrivateMessage UserOperationCRUD = "CreatePrivateMessage"
|
|
||||||
UserOperationCRUDGetPrivateMessages UserOperationCRUD = "GetPrivateMessages"
|
|
||||||
UserOperationCRUDEditPrivateMessage UserOperationCRUD = "EditPrivateMessage"
|
|
||||||
UserOperationCRUDDeletePrivateMessage UserOperationCRUD = "DeletePrivateMessage"
|
|
||||||
)
|
|
||||||
|
|
||||||
type UserOperationApub string
|
|
||||||
|
|
||||||
const (
|
|
||||||
UserOperationApubGetPosts UserOperationApub = "GetPosts"
|
|
||||||
UserOperationApubGetCommunity UserOperationApub = "GetCommunity"
|
|
||||||
UserOperationApubGetComments UserOperationApub = "GetComments"
|
|
||||||
UserOperationApubGetPersonDetails UserOperationApub = "GetPersonDetails"
|
|
||||||
UserOperationApubSearch UserOperationApub = "Search"
|
|
||||||
UserOperationApubResolveObject UserOperationApub = "ResolveObject"
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
11
types/online_users.gen.go
Normal file
11
types/online_users.gen.go
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
// Source: lemmy/crates/api_common/src/websocket/handlers/online_users.rs
|
||||||
|
// Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
||||||
|
|
||||||
|
package types
|
||||||
|
|
||||||
|
type GetPostUsersOnline struct {
|
||||||
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
||||||
|
}
|
||||||
|
type GetCommunityUsersOnline struct {
|
||||||
|
CommunityID int `json:"community_id" url:"community_id,omitempty"`
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
@@ -18,7 +18,9 @@ type Register struct {
|
|||||||
Honeypot Optional[string] `json:"honeypot" url:"honeypot,omitempty"`
|
Honeypot Optional[string] `json:"honeypot" url:"honeypot,omitempty"`
|
||||||
Answer Optional[string] `json:"answer" url:"answer,omitempty"`
|
Answer Optional[string] `json:"answer" url:"answer,omitempty"`
|
||||||
}
|
}
|
||||||
type GetCaptcha struct{}
|
type GetCaptcha struct {
|
||||||
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
|
}
|
||||||
type GetCaptchaResponse struct {
|
type GetCaptchaResponse struct {
|
||||||
Ok Optional[CaptchaResponse] `json:"ok" url:"ok,omitempty"`
|
Ok Optional[CaptchaResponse] `json:"ok" url:"ok,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
||||||
@@ -166,6 +167,13 @@ type GetSiteResponse struct {
|
|||||||
Taglines Optional[[]Tagline] `json:"taglines" url:"taglines,omitempty"`
|
Taglines Optional[[]Tagline] `json:"taglines" url:"taglines,omitempty"`
|
||||||
LemmyResponse
|
LemmyResponse
|
||||||
}
|
}
|
||||||
|
type GetFederatedInstances struct {
|
||||||
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
||||||
|
}
|
||||||
|
type GetFederatedInstancesResponse struct {
|
||||||
|
FederatedInstances Optional[FederatedInstances] `json:"federated_instances" url:"federated_instances,omitempty"`
|
||||||
|
LemmyResponse
|
||||||
|
}
|
||||||
type MyUserInfo struct {
|
type MyUserInfo struct {
|
||||||
LocalUserView LocalUserSettingsView `json:"local_user_view" url:"local_user_view,omitempty"`
|
LocalUserView LocalUserSettingsView `json:"local_user_view" url:"local_user_view,omitempty"`
|
||||||
Follows []CommunityFollowerView `json:"follows" url:"follows,omitempty"`
|
Follows []CommunityFollowerView `json:"follows" url:"follows,omitempty"`
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user