🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Moved package `api` to `subsonic` under `server`
Deluan7610b42f4b3c
diff --git a/api/album_lists.go b/server/subsonic/album_lists.gosimilarity index 98%rename from api/album_lists.gorename to server/subsonic/album_lists.goindex 0f8d19759..b553feddf 100644--- a/api/album_lists.go+++ b/server/subsonic/album_lists.go@@ -1,12 +1,12 @@-package api+package subsonicimport ("errors""net/http"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/log"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses""github.com/cloudsonic/sonic-server/utils")diff --git a/api/album_lists_test.go b/server/subsonic/album_lists_test.gosimilarity index 99%rename from api/album_lists_test.gorename to server/subsonic/album_lists_test.goindex 7c21fc089..9632c1db7 100644--- a/api/album_lists_test.go+++ b/server/subsonic/album_lists_test.go@@ -1,4 +1,4 @@-package api+package subsonicimport ("errors"diff --git a/api/api.go b/server/subsonic/api.gosimilarity index 95%rename from api/api.gorename to server/subsonic/api.goindex c6b0a5def..00cc15630 100644--- a/api/api.go+++ b/server/subsonic/api.go@@ -1,4 +1,4 @@-package api+package subsonicimport ("encoding/json"@@ -6,15 +6,15 @@ import ("fmt""net/http"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/conf""github.com/cloudsonic/sonic-server/engine"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses""github.com/go-chi/chi")const Version = "1.8.0"-type SubsonicHandler = func(http.ResponseWriter, *http.Request) (*responses.Subsonic, error)+type Handler = func(http.ResponseWriter, *http.Request) (*responses.Subsonic, error)type Router struct {Browser engine.Browser@@ -123,7 +123,7 @@ func (api *Router) routes() http.Handler {// Add the Subsonic handler, with and without `.view` extension// Ex: if path = `ping` it will create the routes `/ping` and `/ping.view`-func H(r chi.Router, path string, f SubsonicHandler) {+func H(r chi.Router, path string, f Handler) {handle := func(w http.ResponseWriter, r *http.Request) {res, err := f(w, r)if err != nil {diff --git a/api/api_suite_test.go b/server/subsonic/api_suite_test.gosimilarity index 93%rename from api/api_suite_test.gorename to server/subsonic/api_suite_test.goindex f7ea9a128..a9204bd4e 100644--- a/api/api_suite_test.go+++ b/server/subsonic/api_suite_test.go@@ -1,4 +1,4 @@-package api+package subsonicimport ("testing"diff --git a/api/browsing.go b/server/subsonic/browsing.gosimilarity index 98%rename from api/browsing.gorename to server/subsonic/browsing.goindex fa3eae695..c08962bbd 100644--- a/api/browsing.go+++ b/server/subsonic/browsing.go@@ -1,15 +1,15 @@-package api+package subsonicimport ("fmt""net/http""time"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/conf""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/log""github.com/cloudsonic/sonic-server/model"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses""github.com/cloudsonic/sonic-server/utils")diff --git a/api/helpers.go b/server/subsonic/helpers.gosimilarity index 98%rename from api/helpers.gorename to server/subsonic/helpers.goindex f607d814f..4561611e0 100644--- a/api/helpers.go+++ b/server/subsonic/helpers.go@@ -1,4 +1,4 @@-package api+package subsonicimport ("fmt"@@ -7,9 +7,9 @@ import ("strings""time"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/model"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses""github.com/cloudsonic/sonic-server/utils")diff --git a/api/media_annotation.go b/server/subsonic/media_annotation.gosimilarity index 98%rename from api/media_annotation.gorename to server/subsonic/media_annotation.goindex 52c2f3327..7ab0d54da 100644--- a/api/media_annotation.go+++ b/server/subsonic/media_annotation.go@@ -1,13 +1,13 @@-package api+package subsonicimport ("net/http""time"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/log""github.com/cloudsonic/sonic-server/model"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses")type MediaAnnotationController struct {diff --git a/api/media_retrieval.go b/server/subsonic/media_retrieval.gosimilarity index 94%rename from api/media_retrieval.gorename to server/subsonic/media_retrieval.goindex 4e874c204..fb8146d35 100644--- a/api/media_retrieval.go+++ b/server/subsonic/media_retrieval.go@@ -1,14 +1,14 @@-package api+package subsonicimport ("io""net/http""os"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/log""github.com/cloudsonic/sonic-server/model"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses")type MediaRetrievalController struct {diff --git a/api/media_retrieval_test.go b/server/subsonic/media_retrieval_test.gosimilarity index 99%rename from api/media_retrieval_test.gorename to server/subsonic/media_retrieval_test.goindex 6f42a0ae3..fad68437b 100644--- a/api/media_retrieval_test.go+++ b/server/subsonic/media_retrieval_test.go@@ -1,4 +1,4 @@-package api+package subsonicimport ("errors"diff --git a/api/middlewares.go b/server/subsonic/middlewares.gosimilarity index 96%rename from api/middlewares.gorename to server/subsonic/middlewares.goindex 739a5ecee..f36910a45 100644--- a/api/middlewares.go+++ b/server/subsonic/middlewares.go@@ -1,4 +1,4 @@-package api+package subsonicimport ("context"@@ -8,9 +8,9 @@ import ("net/http""strings"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/conf""github.com/cloudsonic/sonic-server/log"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses")func checkRequiredParameters(next http.Handler) http.Handler {diff --git a/api/middlewares_test.go b/server/subsonic/middlewares_test.gosimilarity index 99%rename from api/middlewares_test.gorename to server/subsonic/middlewares_test.goindex 4bd8dc263..bf3dc9156 100644--- a/api/middlewares_test.go+++ b/server/subsonic/middlewares_test.go@@ -1,4 +1,4 @@-package api+package subsonicimport ("net/http"diff --git a/api/playlists.go b/server/subsonic/playlists.gosimilarity index 97%rename from api/playlists.gorename to server/subsonic/playlists.goindex 075ef8a88..8f5feb08a 100644--- a/api/playlists.go+++ b/server/subsonic/playlists.go@@ -1,13 +1,13 @@-package api+package subsonicimport ("fmt""net/http"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/log""github.com/cloudsonic/sonic-server/model"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses")type PlaylistsController struct {diff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XMLdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .JSONsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .JSONrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .JSONdiff --git a/api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .XMLsimilarity index 100%rename from api/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .XMLrename to server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .XMLdiff --git a/api/responses/errors.go b/server/subsonic/responses/errors.gosimilarity index 100%rename from api/responses/errors.gorename to server/subsonic/responses/errors.godiff --git a/api/responses/responses.go b/server/subsonic/responses/responses.gosimilarity index 100%rename from api/responses/responses.gorename to server/subsonic/responses/responses.godiff --git a/api/responses/responses_suite_test.go b/server/subsonic/responses/responses_suite_test.gosimilarity index 100%rename from api/responses/responses_suite_test.gorename to server/subsonic/responses/responses_suite_test.godiff --git a/api/responses/responses_test.go b/server/subsonic/responses/responses_test.gosimilarity index 99%rename from api/responses/responses_test.gorename to server/subsonic/responses/responses_test.goindex 9b7998b71..99f8b1b13 100644--- a/api/responses/responses_test.go+++ b/server/subsonic/responses/responses_test.go@@ -10,7 +10,7 @@ import ("encoding/xml""time"- . "github.com/cloudsonic/sonic-server/api/responses"+ . "github.com/cloudsonic/sonic-server/server/subsonic/responses". "github.com/onsi/ginkgo". "github.com/onsi/gomega")diff --git a/api/searching.go b/server/subsonic/searching.gosimilarity index 97%rename from api/searching.gorename to server/subsonic/searching.goindex 2d5f89f02..4bf84ef05 100644--- a/api/searching.go+++ b/server/subsonic/searching.go@@ -1,12 +1,12 @@-package api+package subsonicimport ("fmt""net/http"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/log"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses")type SearchingController struct {diff --git a/api/stream.go b/server/subsonic/stream.gosimilarity index 96%rename from api/stream.gorename to server/subsonic/stream.goindex f27d61fd1..f37548034 100644--- a/api/stream.go+++ b/server/subsonic/stream.go@@ -1,12 +1,12 @@-package api+package subsonicimport ("net/http"- "github.com/cloudsonic/sonic-server/api/responses""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/log""github.com/cloudsonic/sonic-server/model"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses""github.com/cloudsonic/sonic-server/utils")diff --git a/api/system.go b/server/subsonic/system.gosimilarity index 85%rename from api/system.gorename to server/subsonic/system.goindex dc190ee49..42c83cf5f 100644--- a/api/system.go+++ b/server/subsonic/system.go@@ -1,9 +1,9 @@-package api+package subsonicimport ("net/http"- "github.com/cloudsonic/sonic-server/api/responses"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses")type SystemController struct{}diff --git a/api/users.go b/server/subsonic/users.gosimilarity index 89%rename from api/users.gorename to server/subsonic/users.goindex 940a7802e..f21f90209 100644--- a/api/users.go+++ b/server/subsonic/users.go@@ -1,9 +1,9 @@-package api+package subsonicimport ("net/http"- "github.com/cloudsonic/sonic-server/api/responses"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses")type UsersController struct{}diff --git a/api/wire_gen.go b/server/subsonic/wire_gen.gosimilarity index 99%rename from api/wire_gen.gorename to server/subsonic/wire_gen.goindex 391f314e1..28d05923f 100644--- a/api/wire_gen.go+++ b/server/subsonic/wire_gen.go@@ -3,7 +3,7 @@//go:generate wire//+build !wireinject-package api+package subsonicimport ("github.com/google/wire"diff --git a/api/wire_injectors.go b/server/subsonic/wire_injectors.gosimilarity index 98%rename from api/wire_injectors.gorename to server/subsonic/wire_injectors.goindex ed96d2c42..e39dde24e 100644--- a/api/wire_injectors.go+++ b/server/subsonic/wire_injectors.go@@ -1,6 +1,6 @@//+build wireinject-package api+package subsonicimport ("github.com/google/wire"diff --git a/tests/matchers.go b/tests/matchers.goindex 904aeed9c..87f999b8a 100644--- a/tests/matchers.go+++ b/tests/matchers.go@@ -7,7 +7,7 @@ import ("encoding/xml""fmt"- "github.com/cloudsonic/sonic-server/api/responses"+ "github.com/cloudsonic/sonic-server/server/subsonic/responses""github.com/smartystreets/goconvey/convey")diff --git a/wire_gen.go b/wire_gen.goindex 989084db6..d07f386e0 100644--- a/wire_gen.go+++ b/wire_gen.go@@ -6,11 +6,11 @@package mainimport (- "github.com/cloudsonic/sonic-server/api""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/persistence""github.com/cloudsonic/sonic-server/scanner""github.com/cloudsonic/sonic-server/server"+ "github.com/cloudsonic/sonic-server/server/subsonic""github.com/google/wire")@@ -23,7 +23,7 @@ func CreateApp(musicFolder string) *server.Server {return serverServer}-func CreateSubsonicAPIRouter() *api.Router {+func CreateSubsonicAPIRouter() *subsonic.Router {dataStore := persistence.New()browser := engine.NewBrowser(dataStore)cover := engine.NewCover(dataStore)@@ -33,10 +33,10 @@ func CreateSubsonicAPIRouter() *api.Router {ratings := engine.NewRatings(dataStore)scrobbler := engine.NewScrobbler(dataStore, nowPlayingRepository)search := engine.NewSearch(dataStore)- router := api.NewRouter(browser, cover, listGenerator, playlists, ratings, scrobbler, search)+ router := subsonic.NewRouter(browser, cover, listGenerator, playlists, ratings, scrobbler, search)return router}// wire_injectors.go:-var allProviders = wire.NewSet(engine.Set, scanner.New, api.NewRouter, persistence.Set)+var allProviders = wire.NewSet(engine.Set, scanner.New, subsonic.NewRouter, persistence.Set)diff --git a/wire_injectors.go b/wire_injectors.goindex 812899fce..13522057f 100644--- a/wire_injectors.go+++ b/wire_injectors.go@@ -3,18 +3,18 @@package mainimport (- "github.com/cloudsonic/sonic-server/api""github.com/cloudsonic/sonic-server/engine""github.com/cloudsonic/sonic-server/persistence""github.com/cloudsonic/sonic-server/scanner""github.com/cloudsonic/sonic-server/server"+ "github.com/cloudsonic/sonic-server/server/subsonic""github.com/google/wire")var allProviders = wire.NewSet(engine.Set,scanner.New,- api.NewRouter,+ subsonic.NewRouter,persistence.Set,)@@ -25,6 +25,6 @@ func CreateApp(musicFolder string) *server.Server {))}-func CreateSubsonicAPIRouter() *api.Router {+func CreateSubsonicAPIRouter() *subsonic.Router {panic(wire.Build(allProviders))}