diff --git a/src/github.com/matrix-org/dendrite/mediaapi/storage/storage.go b/src/github.com/matrix-org/dendrite/mediaapi/storage/storage.go index 630809cb..4b86967f 100644 --- a/src/github.com/matrix-org/dendrite/mediaapi/storage/storage.go +++ b/src/github.com/matrix-org/dendrite/mediaapi/storage/storage.go @@ -23,13 +23,13 @@ import ( "github.com/matrix-org/gomatrixserverlib" ) -// A Database is used to store metadata about a repository of media files. +// Database is used to store metadata about a repository of media files. type Database struct { statements statements db *sql.DB } -// Open a postgres database. +// Open opens a postgres database. func Open(dataSourceName string) (*Database, error) { var d Database var err error @@ -48,8 +48,8 @@ func (d *Database) StoreMediaMetadata(mediaMetadata *types.MediaMetadata) error return d.statements.insertMedia(mediaMetadata) } -// GetMediaMetadata returns metadata about media stored on this server. The media could -// have been uploaded to this server or fetched from another server and cached here. +// GetMediaMetadata returns metadata about media stored on this server. +// The media could have been uploaded to this server or fetched from another server and cached here. // Returns sql.ErrNoRows if there is no metadata associated with this media. func (d *Database) GetMediaMetadata(mediaID types.MediaID, mediaOrigin gomatrixserverlib.ServerName) (*types.MediaMetadata, error) { return d.statements.selectMedia(mediaID, mediaOrigin)