diff options
Diffstat (limited to 'internal/api/client')
-rw-r--r-- | internal/api/client/account/account.go | 8 | ||||
-rw-r--r-- | internal/api/client/account/account_test.go | 8 | ||||
-rw-r--r-- | internal/api/client/account/following.go | 2 | ||||
-rw-r--r-- | internal/api/client/admin/admin.go | 6 | ||||
-rw-r--r-- | internal/api/client/app/app.go | 6 | ||||
-rw-r--r-- | internal/api/client/fileserver/fileserver.go | 6 | ||||
-rw-r--r-- | internal/api/client/fileserver/servefile_test.go | 8 | ||||
-rw-r--r-- | internal/api/client/followrequest/followrequest.go | 6 | ||||
-rw-r--r-- | internal/api/client/instance/instance.go | 6 | ||||
-rw-r--r-- | internal/api/client/media/media.go | 6 | ||||
-rw-r--r-- | internal/api/client/media/mediacreate_test.go | 8 | ||||
-rw-r--r-- | internal/api/client/notification/notification.go | 8 | ||||
-rw-r--r-- | internal/api/client/notification/notificationsget.go | 1 | ||||
-rw-r--r-- | internal/api/client/search/search.go | 8 | ||||
-rw-r--r-- | internal/api/client/status/status.go | 6 | ||||
-rw-r--r-- | internal/api/client/status/status_test.go | 8 | ||||
-rw-r--r-- | internal/api/client/timeline/timeline.go | 8 |
17 files changed, 55 insertions, 54 deletions
diff --git a/internal/api/client/account/account.go b/internal/api/client/account/account.go index 94f753825..3a820c0ea 100644 --- a/internal/api/client/account/account.go +++ b/internal/api/client/account/account.go @@ -26,7 +26,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -61,7 +61,7 @@ const ( GetFollowingPath = BasePathWithID + "/following" // GetRelationshipsPath is for showing an account's relationship with other accounts GetRelationshipsPath = BasePath + "/relationships" - // FollowPath is for POSTing new follows to, and updating existing follows + // PostFollowPath is for POSTing new follows to, and updating existing follows PostFollowPath = BasePathWithID + "/follow" // PostUnfollowPath is for POSTing an unfollow PostUnfollowPath = BasePathWithID + "/unfollow" @@ -70,12 +70,12 @@ const ( // Module implements the ClientAPIModule interface for account-related actions type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new account module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/account/account_test.go b/internal/api/client/account/account_test.go index d0560bcb6..5e1959cc2 100644 --- a/internal/api/client/account/account_test.go +++ b/internal/api/client/account/account_test.go @@ -4,13 +4,13 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/account" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" ) @@ -22,9 +22,9 @@ type AccountStandardTestSuite struct { db db.DB log *logrus.Logger tc typeutils.TypeConverter - storage storage.Storage + storage blob.Storage federator federation.Federator - processor message.Processor + processor processing.Processor // standard suite models testTokens map[string]*oauth.Token diff --git a/internal/api/client/account/following.go b/internal/api/client/account/following.go index 2a1373e40..f1adeac2b 100644 --- a/internal/api/client/account/following.go +++ b/internal/api/client/account/following.go @@ -25,7 +25,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// AccountFollowersGETHandler serves the followers of the requested account, if they're visible to the requester. +// AccountFollowingGETHandler serves the following of the requested account, if they're visible to the requester. func (m *Module) AccountFollowingGETHandler(c *gin.Context) { authed, err := oauth.Authed(c, true, true, true, true) if err != nil { diff --git a/internal/api/client/admin/admin.go b/internal/api/client/admin/admin.go index 7ce5311eb..b33813a7d 100644 --- a/internal/api/client/admin/admin.go +++ b/internal/api/client/admin/admin.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -38,12 +38,12 @@ const ( // Module implements the ClientAPIModule interface for admin-related actions (reports, emojis, etc) type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new admin module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/app/app.go b/internal/api/client/app/app.go index d1e732a8c..0366ae21f 100644 --- a/internal/api/client/app/app.go +++ b/internal/api/client/app/app.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -34,12 +34,12 @@ const BasePath = "/api/v1/apps" // Module implements the ClientAPIModule interface for requests relating to registering/removing applications type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new auth module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/fileserver/fileserver.go b/internal/api/client/fileserver/fileserver.go index 63d323a01..b06f48067 100644 --- a/internal/api/client/fileserver/fileserver.go +++ b/internal/api/client/fileserver/fileserver.go @@ -27,7 +27,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -46,13 +46,13 @@ const ( // The goal here is to serve requested media files if the gotosocial server is configured to use local storage. type FileServer struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger storageBase string } // New returns a new fileServer module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &FileServer{ config: config, processor: processor, diff --git a/internal/api/client/fileserver/servefile_test.go b/internal/api/client/fileserver/servefile_test.go index 09fd8ea43..2646da24d 100644 --- a/internal/api/client/fileserver/servefile_test.go +++ b/internal/api/client/fileserver/servefile_test.go @@ -31,14 +31,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/fileserver" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/media" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -49,10 +49,10 @@ type ServeFileTestSuite struct { config *config.Config db db.DB log *logrus.Logger - storage storage.Storage + storage blob.Storage federator federation.Federator tc typeutils.TypeConverter - processor message.Processor + processor processing.Processor mediaHandler media.Handler oauthServer oauth.Server diff --git a/internal/api/client/followrequest/followrequest.go b/internal/api/client/followrequest/followrequest.go index 8be957009..71352294c 100644 --- a/internal/api/client/followrequest/followrequest.go +++ b/internal/api/client/followrequest/followrequest.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -46,12 +46,12 @@ const ( // Module implements the ClientAPIModule interface for every related to interacting with follow requests type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new follow request module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/instance/instance.go b/internal/api/client/instance/instance.go index ba54480a5..7fb08f29c 100644 --- a/internal/api/client/instance/instance.go +++ b/internal/api/client/instance/instance.go @@ -6,7 +6,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -18,12 +18,12 @@ const ( // Module implements the ClientModule interface type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new instance information module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/media/media.go b/internal/api/client/media/media.go index f68a73c2c..05058e2e2 100644 --- a/internal/api/client/media/media.go +++ b/internal/api/client/media/media.go @@ -27,7 +27,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -43,12 +43,12 @@ const BasePathWithID = BasePath + "/:" + IDKey // Module implements the ClientAPIModule interface for media type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new auth module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/media/mediacreate_test.go b/internal/api/client/media/mediacreate_test.go index e86c66021..bed588017 100644 --- a/internal/api/client/media/mediacreate_test.go +++ b/internal/api/client/media/mediacreate_test.go @@ -34,14 +34,14 @@ import ( "github.com/stretchr/testify/suite" mediamodule "github.com/superseriousbusiness/gotosocial/internal/api/client/media" "github.com/superseriousbusiness/gotosocial/internal/api/model" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/media" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -52,12 +52,12 @@ type MediaCreateTestSuite struct { config *config.Config db db.DB log *logrus.Logger - storage storage.Storage + storage blob.Storage federator federation.Federator tc typeutils.TypeConverter mediaHandler media.Handler oauthServer oauth.Server - processor message.Processor + processor processing.Processor // standard suite models testTokens map[string]*oauth.Token diff --git a/internal/api/client/notification/notification.go b/internal/api/client/notification/notification.go index bc06b31e4..799d0a5e3 100644 --- a/internal/api/client/notification/notification.go +++ b/internal/api/client/notification/notification.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -39,19 +39,19 @@ const ( // MaxIDKey is the url query for setting a max notification ID to return MaxIDKey = "max_id" - // Limit key is for specifying maximum number of notifications to return. + // LimitKey is for specifying maximum number of notifications to return. LimitKey = "limit" ) // Module implements the ClientAPIModule interface for every related to posting/deleting/interacting with notifications type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new notification module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/notification/notificationsget.go b/internal/api/client/notification/notificationsget.go index 3e4970800..a2d049384 100644 --- a/internal/api/client/notification/notificationsget.go +++ b/internal/api/client/notification/notificationsget.go @@ -27,6 +27,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) +// NotificationsGETHandler serves a list of notifications to the caller, with the desired query parameters func (m *Module) NotificationsGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "NotificationsGETHandler", diff --git a/internal/api/client/search/search.go b/internal/api/client/search/search.go index b89ae1a74..1cffee5e0 100644 --- a/internal/api/client/search/search.go +++ b/internal/api/client/search/search.go @@ -24,12 +24,12 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) const ( - // BasePath is the base path for serving v1 of the search API + // BasePathV1 is the base path for serving v1 of the search API BasePathV1 = "/api/v1/search" // BasePathV2 is the base path for serving v2 of the search API @@ -67,12 +67,12 @@ const ( // Module implements the ClientAPIModule interface for everything related to searching type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new search module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/status/status.go b/internal/api/client/status/status.go index a91f1fa67..e71764eb1 100644 --- a/internal/api/client/status/status.go +++ b/internal/api/client/status/status.go @@ -26,7 +26,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -75,12 +75,12 @@ const ( // Module implements the ClientAPIModule interface for every related to posting/deleting/interacting with statuses type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new account module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, diff --git a/internal/api/client/status/status_test.go b/internal/api/client/status/status_test.go index 0f77820a1..563a23ce2 100644 --- a/internal/api/client/status/status_test.go +++ b/internal/api/client/status/status_test.go @@ -22,13 +22,13 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/status" + "github.com/superseriousbusiness/gotosocial/internal/blob" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/message" "github.com/superseriousbusiness/gotosocial/internal/oauth" - "github.com/superseriousbusiness/gotosocial/internal/storage" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/typeutils" ) @@ -41,8 +41,8 @@ type StatusStandardTestSuite struct { log *logrus.Logger tc typeutils.TypeConverter federator federation.Federator - processor message.Processor - storage storage.Storage + processor processing.Processor + storage blob.Storage // standard suite models testTokens map[string]*oauth.Token diff --git a/internal/api/client/timeline/timeline.go b/internal/api/client/timeline/timeline.go index 84674132c..f563d6b7d 100644 --- a/internal/api/client/timeline/timeline.go +++ b/internal/api/client/timeline/timeline.go @@ -24,7 +24,7 @@ import ( "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/superseriousbusiness/gotosocial/internal/message" + "github.com/superseriousbusiness/gotosocial/internal/processing" "github.com/superseriousbusiness/gotosocial/internal/router" ) @@ -39,7 +39,7 @@ const ( SinceIDKey = "since_id" // MinIDKey is the url query for returning results immediately newer than the given ID MinIDKey = "min_id" - // Limit key is for specifying maximum number of results to return. + // LimitKey is for specifying maximum number of results to return. LimitKey = "limit" // LocalKey is for specifying whether only local statuses should be returned LocalKey = "local" @@ -48,12 +48,12 @@ const ( // Module implements the ClientAPIModule interface for everything relating to viewing timelines type Module struct { config *config.Config - processor message.Processor + processor processing.Processor log *logrus.Logger } // New returns a new timeline module -func New(config *config.Config, processor message.Processor, log *logrus.Logger) api.ClientModule { +func New(config *config.Config, processor processing.Processor, log *logrus.Logger) api.ClientModule { return &Module{ config: config, processor: processor, |