linting + organizing

This commit is contained in:
tsmethurst
2021-04-20 18:14:23 +02:00
parent 32c5fd987a
commit dafc3b5b92
60 changed files with 746 additions and 390 deletions

View File

@ -32,12 +32,14 @@ import (
)
const (
// AccountIDKey is the url key for account id (an account uuid)
AccountIDKey = "account_id"
// MediaTypeKey is the url key for media type (usually something like attachment or header etc)
MediaTypeKey = "media_type"
// MediaSizeKey is the url key for the desired media size--original/small/static
MediaSizeKey = "media_size"
// FileNameKey is the actual filename being sought. Will usually be a UUID then something like .jpeg
FileNameKey = "file_name"
FilesPath = "files"
)
// FileServer implements the RESTAPIModule interface.
@ -67,6 +69,7 @@ func (m *FileServer) Route(s router.Router) error {
return nil
}
// CreateTables populates necessary tables in the given DB
func (m *FileServer) CreateTables(db db.DB) error {
models := []interface{}{
&gtsmodel.MediaAttachment{},

View File

@ -49,7 +49,7 @@ type ServeFileTestSuite struct {
log *logrus.Logger
storage storage.Storage
mastoConverter mastotypes.Converter
mediaHandler media.MediaHandler
mediaHandler media.Handler
oauthServer oauth.Server
// standard suite models