diff options
Diffstat (limited to 'cmd/gotosocial/admin.go')
-rw-r--r-- | cmd/gotosocial/admin.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cmd/gotosocial/admin.go b/cmd/gotosocial/admin.go index 3dad3e3d6..a8aab810e 100644 --- a/cmd/gotosocial/admin.go +++ b/cmd/gotosocial/admin.go @@ -20,6 +20,7 @@ package main import ( "github.com/spf13/cobra" "github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action/admin/account" + "github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action/admin/media" "github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action/admin/media/prune" "github.com/superseriousbusiness/gotosocial/cmd/gotosocial/action/admin/trans" "github.com/superseriousbusiness/gotosocial/internal/config" @@ -174,6 +175,34 @@ func adminCommands() *cobra.Command { } /* + ADMIN MEDIA LIST COMMANDS + */ + + adminMediaListLocalCmd := &cobra.Command{ + Use: "list-local", + Short: "admin command to list media on local storage", + PreRunE: func(cmd *cobra.Command, args []string) error { + return preRun(preRunArgs{cmd: cmd}) + }, + RunE: func(cmd *cobra.Command, args []string) error { + return run(cmd.Context(), media.ListLocal) + }, + } + + adminMediaListRemoteCmd := &cobra.Command{ + Use: "list-remote", + Short: "admin command to list remote media cached on this instance", + PreRunE: func(cmd *cobra.Command, args []string) error { + return preRun(preRunArgs{cmd: cmd}) + }, + RunE: func(cmd *cobra.Command, args []string) error { + return run(cmd.Context(), media.ListRemote) + }, + } + + adminMediaCmd.AddCommand(adminMediaListLocalCmd, adminMediaListRemoteCmd) + + /* ADMIN MEDIA PRUNE COMMANDS */ adminMediaPruneCmd := &cobra.Command{ |