diff options
author | 2021-04-01 20:46:45 +0200 | |
---|---|---|
committer | 2021-04-01 20:46:45 +0200 | |
commit | 71a49e2b43218d34f97b2276c43bdeb2df4a53d2 (patch) | |
tree | 201c370b16cc5446740660f81f342e8171e9903f /cmd | |
parent | Oauth/token (#7) (diff) | |
download | gotosocial-71a49e2b43218d34f97b2276c43bdeb2df4a53d2.tar.xz |
Api/v1/accounts (#8)
* start work on accounts module
* plodding away on the accounts endpoint
* groundwork for other account routes
* add password validator
* validation utils
* require account approval flags
* comments
* comments
* go fmt
* comments
* add distributor stub
* rename api to federator
* tidy a bit
* validate new account requests
* rename r router
* comments
* add domain blocks
* add some more shortcuts
* add some more shortcuts
* check email + username availability
* email block checking for signups
* chunking away at it
* tick off a few more things
* some fiddling with tests
* add mock package
* relocate repo
* move mocks around
* set app id on new signups
* initialize oauth server properly
* rename oauth server
* proper mocking tests
* go fmt ./...
* add required fields
* change name of func
* move validation to account.go
* more tests!
* add some file utility tools
* add mediaconfig
* new shortcut
* add some more fields
* add followrequest model
* add notify
* update mastotypes
* mock out storage interface
* start building media interface
* start on update credentials
* mess about with media a bit more
* test image manipulation
* media more or less working
* account update nearly working
* rearranging my package ;) ;) ;)
* phew big stuff!!!!
* fix type checking
* *fiddles*
* Add CreateTables func
* account registration flow working
* tidy
* script to step through auth flow
* add a lil helper for generating user uris
* fiddling with federation a bit
* update progress
* Tidying and linting
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gotosocial/main.go | 72 |
1 files changed, 66 insertions, 6 deletions
diff --git a/cmd/gotosocial/main.go b/cmd/gotosocial/main.go index 0919d5fc4..983d49d40 100644 --- a/cmd/gotosocial/main.go +++ b/cmd/gotosocial/main.go @@ -22,12 +22,12 @@ import ( "fmt" "os" - "github.com/gotosocial/gotosocial/internal/action" - "github.com/gotosocial/gotosocial/internal/config" - "github.com/gotosocial/gotosocial/internal/db" - "github.com/gotosocial/gotosocial/internal/gotosocial" - "github.com/gotosocial/gotosocial/internal/log" "github.com/sirupsen/logrus" + "github.com/superseriousbusiness/gotosocial/internal/action" + "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/urfave/cli/v2" ) @@ -111,10 +111,70 @@ func main() { // TEMPLATE FLAGS &cli.StringFlag{ Name: flagNames.TemplateBaseDir, - Usage: "Basedir for html templating files for rendering pages and composing emails", + Usage: "Basedir for html templating files for rendering pages and composing emails.", Value: "./web/template/", EnvVars: []string{envNames.TemplateBaseDir}, }, + + // ACCOUNTS FLAGS + &cli.BoolFlag{ + Name: flagNames.AccountsOpenRegistration, + Usage: "Allow anyone to submit an account signup request. If false, server will be invite-only.", + Value: true, + EnvVars: []string{envNames.AccountsOpenRegistration}, + }, + &cli.BoolFlag{ + Name: flagNames.AccountsRequireApproval, + Usage: "Do account signups require approval by an admin or moderator before user can log in? If false, new registrations will be automatically approved.", + Value: true, + EnvVars: []string{envNames.AccountsRequireApproval}, + }, + + // MEDIA FLAGS + &cli.IntFlag{ + Name: flagNames.MediaMaxImageSize, + Usage: "Max size of accepted images in bytes", + Value: 1048576, // 1mb + EnvVars: []string{envNames.MediaMaxImageSize}, + }, + &cli.IntFlag{ + Name: flagNames.MediaMaxVideoSize, + Usage: "Max size of accepted videos in bytes", + Value: 5242880, // 5mb + EnvVars: []string{envNames.MediaMaxVideoSize}, + }, + + // STORAGE FLAGS + &cli.StringFlag{ + Name: flagNames.StorageBackend, + Usage: "Storage backend to use for media attachments", + Value: "local", + EnvVars: []string{envNames.StorageBackend}, + }, + &cli.StringFlag{ + Name: flagNames.StorageBasePath, + Usage: "Full path to an already-created directory where gts should store/retrieve media files", + Value: "/opt/gotosocial", + EnvVars: []string{envNames.StorageBasePath}, + }, + &cli.StringFlag{ + Name: flagNames.StorageServeProtocol, + Usage: "Protocol to use for serving media attachments (use https if storage is local)", + Value: "https", + EnvVars: []string{envNames.StorageServeProtocol}, + }, + &cli.StringFlag{ + Name: flagNames.StorageServeHost, + Usage: "Hostname to serve media attachments from (use the same value as host if storage is local)", + Value: "localhost", + EnvVars: []string{envNames.StorageServeHost}, + }, + &cli.StringFlag{ + Name: flagNames.StorageServeBasePath, + Usage: "Path to append to protocol and hostname to create the base path from which media files will be served (default will mostly be fine)", + Value: "/fileserver/media", + EnvVars: []string{envNames.StorageServeBasePath}, + }, }, Commands: []*cli.Command{ { |