Skip to content

Commit

Permalink
Move a lot of stuff + tidy stuff (#37)
Browse files Browse the repository at this point in the history
Lots of renaming and moving stuff, some bug fixes, more lenient parsing of notifications and home timeline.
  • Loading branch information
tsmethurst authored May 30, 2021
1 parent c4d791b commit 3d77f81
Show file tree
Hide file tree
Showing 69 changed files with 343 additions and 720 deletions.
37 changes: 18 additions & 19 deletions cmd/gotosocial/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ import (
"os"

"github.com/sirupsen/logrus"
"github.com/superseriousbusiness/gotosocial/internal/action"
"github.com/superseriousbusiness/gotosocial/internal/clitools/admin/account"
"github.com/superseriousbusiness/gotosocial/internal/cliactions"
"github.com/superseriousbusiness/gotosocial/internal/cliactions/admin/account"
"github.com/superseriousbusiness/gotosocial/internal/cliactions/server"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gotosocial"
"github.com/superseriousbusiness/gotosocial/internal/log"
"github.com/superseriousbusiness/gotosocial/testrig"

Expand Down Expand Up @@ -259,7 +258,7 @@ func main() {
Name: "start",
Usage: "start the gotosocial server",
Action: func(c *cli.Context) error {
return runAction(c, gotosocial.Run)
return runAction(c, server.Start)
},
},
},
Expand Down Expand Up @@ -362,19 +361,19 @@ func main() {
},
},
},
{
Name: "db",
Usage: "database-related tasks and utils",
Subcommands: []*cli.Command{
{
Name: "init",
Usage: "initialize a database with the required schema for gotosocial; has no effect & is safe to run on an already-initialized db",
Action: func(c *cli.Context) error {
return runAction(c, db.Initialize)
},
},
},
},
// {
// Name: "db",
// Usage: "database-related tasks and utils",
// Subcommands: []*cli.Command{
// {
// Name: "init",
// Usage: "initialize a database with the required schema for gotosocial; has no effect & is safe to run on an already-initialized db",
// Action: func(c *cli.Context) error {
// return runAction(c, db.Initialize)
// },
// },
// },
// },
{
Name: "testrig",
Usage: "gotosocial testrig tasks",
Expand All @@ -399,7 +398,7 @@ func main() {

// runAction builds up the config and logger necessary for any
// gotosocial action, and then executes the action.
func runAction(c *cli.Context, a action.GTSAction) error {
func runAction(c *cli.Context, a cliactions.GTSAction) error {

// create a new *config.Config based on the config path provided...
conf, err := config.FromFile(c.String(config.GetFlagNames().ConfigPath))
Expand Down
33 changes: 16 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,50 @@ go 1.16
require (
github.com/buckket/go-blurhash v1.1.0
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/dsoprea/go-exif v0.0.0-20210428042052-dca55bf8ca15 // indirect
github.com/dsoprea/go-exif/v2 v2.0.0-20210428042052-dca55bf8ca15 // indirect
github.com/dsoprea/go-exif v0.0.0-20210512055020-8213cfabc61b // indirect
github.com/dsoprea/go-exif/v2 v2.0.0-20210512055020-8213cfabc61b // indirect
github.com/dsoprea/go-iptc v0.0.0-20200610044640-bc9ca208b413 // indirect
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20210505113650-8010c634293c // indirect
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20210512043942-b434301c6836 // indirect
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect
github.com/dsoprea/go-photoshop-info-format v0.0.0-20200610045659-121dd752914d // indirect
github.com/dsoprea/go-png-image-structure v0.0.0-20210428043356-45b892641b59 // indirect
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d // indirect
github.com/dsoprea/go-utility v0.0.0-20200717064901-2fccff4aa15e // indirect
github.com/gin-contrib/cors v1.3.1
github.com/gin-contrib/sessions v0.0.3
github.com/gin-gonic/gin v1.7.1
github.com/go-errors/errors v1.2.0 // indirect
github.com/gin-gonic/gin v1.7.2
github.com/go-errors/errors v1.4.0 // indirect
github.com/go-fed/activity v1.0.1-0.20210426194615-e0de0863dcc1
github.com/go-fed/httpsig v1.1.0
github.com/go-pg/pg/extra/pgdebug v0.2.0
github.com/go-pg/pg/v10 v10.9.1
github.com/go-playground/validator/v10 v10.6.0 // indirect
github.com/go-pg/pg/v10 v10.9.3
github.com/go-playground/validator/v10 v10.6.1 // indirect
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
github.com/golang/mock v1.5.0 // indirect
github.com/google/uuid v1.2.0
github.com/gorilla/sessions v1.2.1 // indirect
github.com/h2non/filetype v1.1.1
github.com/json-iterator/go v1.1.11 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.13 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/onsi/gomega v1.12.0 // indirect
github.com/onsi/gomega v1.13.0 // indirect
github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.7.0
github.com/superseriousbusiness/exifremove v0.0.0-20210330092427-6acd27eac203
github.com/superseriousbusiness/oauth2/v4 v4.2.1-0.20210327102222-902aba1ef45f
github.com/superseriousbusiness/oauth2/v4 v4.3.0-SSB
github.com/tidwall/btree v0.5.0 // indirect
github.com/tidwall/buntdb v1.2.3 // indirect
github.com/ugorji/go v1.2.5 // indirect
github.com/ugorji/go v1.2.6 // indirect
github.com/urfave/cli/v2 v2.3.0
github.com/vmihailenco/msgpack/v5 v5.3.1 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.4 // indirect
github.com/wagslane/go-password-validator v0.3.0
go.opentelemetry.io/otel v0.20.0 // indirect
golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf
golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect
golang.org/x/sys v0.0.0-20210511113859-b0526f3d8744 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea // indirect
golang.org/x/text v0.3.6
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v2 v2.4.0
Expand Down
Loading

0 comments on commit 3d77f81

Please sign in to comment.