chore(release): everything that ships points at GitHub and GHCR (#7897)
release / go (push) Successful in 2m7s
release / web (push) Successful in 1m25s
release / govulncheck (push) Successful in 21s
release / integration (push) Successful in 4m30s
release / android (push) Successful in 4m39s
release / Build signed APK (push) Successful in 5m10s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 29s
release / Verify release artifacts (tag releases only) (push) Skipped
release / go (push) Successful in 2m7s
release / web (push) Successful in 1m25s
release / govulncheck (push) Successful in 21s
release / integration (push) Successful in 4m30s
release / android (push) Successful in 4m39s
release / Build signed APK (push) Successful in 5m10s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 29s
release / Verify release artifacts (tag releases only) (push) Skipped
- Module path: github.com/Fabled-Sword/minstrel, in go.mod, every import and the Dockerfile's version ldflags. - buildinfo.ProjectURL, the contact outside services see in Minstrel's User-Agent: https://github.com/Fabled-Sword/minstrel. - README's compose example pulls ghcr.io/fabled-sword/minstrel:latest. - docs/security.md sends problem reports to the GitHub issues. - The demo-library stack builds Minstrel from the checkout, since :dev is not published to GHCR. - hygiene.go's same-site example uses example.com names. The workbench CI (.gitea/, ci/, export-ignored) still builds and publishes :dev to the private registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -27,8 +27,8 @@ ARG MINSTREL_VERSION=dev
|
|||||||
ARG MINSTREL_CHANNEL=local
|
ARG MINSTREL_CHANNEL=local
|
||||||
RUN go build -trimpath \
|
RUN go build -trimpath \
|
||||||
-ldflags="-s -w \
|
-ldflags="-s -w \
|
||||||
-X 'git.fabledsword.com/bvandeusen/minstrel/internal/buildinfo.Version=${MINSTREL_VERSION}' \
|
-X 'github.com/Fabled-Sword/minstrel/internal/buildinfo.Version=${MINSTREL_VERSION}' \
|
||||||
-X 'git.fabledsword.com/bvandeusen/minstrel/internal/buildinfo.Channel=${MINSTREL_CHANNEL}'" \
|
-X 'github.com/Fabled-Sword/minstrel/internal/buildinfo.Channel=${MINSTREL_CHANNEL}'" \
|
||||||
-o /out/minstrel ./cmd/minstrel
|
-o /out/minstrel ./cmd/minstrel
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Fabled Minstrel serves your music library to the web, to its own Android app, an
|
|||||||
# compose.yaml
|
# compose.yaml
|
||||||
services:
|
services:
|
||||||
minstrel:
|
minstrel:
|
||||||
image: git.fabledsword.com/bvandeusen/minstrel:latest
|
image: ghcr.io/fabled-sword/minstrel:latest
|
||||||
ports: ['4533:4533']
|
ports: ['4533:4533']
|
||||||
volumes:
|
volumes:
|
||||||
- ./music:/music # your library; must be writable by uid 1000
|
- ./music:/music # your library; must be writable by uid 1000
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/config"
|
"github.com/Fabled-Sword/minstrel/internal/config"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
"github.com/Fabled-Sword/minstrel/internal/db"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/logging"
|
"github.com/Fabled-Sword/minstrel/internal/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// runMigrate applies the embedded migrations and exits. The server also
|
// runMigrate applies the embedded migrations and exits. The server also
|
||||||
|
|||||||
+26
-26
@@ -15,32 +15,32 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/acoustid"
|
"github.com/Fabled-Sword/minstrel/internal/acoustid"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/backup"
|
"github.com/Fabled-Sword/minstrel/internal/backup"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/buildinfo"
|
"github.com/Fabled-Sword/minstrel/internal/buildinfo"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/catalogue"
|
"github.com/Fabled-Sword/minstrel/internal/catalogue"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/config"
|
"github.com/Fabled-Sword/minstrel/internal/config"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coplay"
|
"github.com/Fabled-Sword/minstrel/internal/coplay"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
"github.com/Fabled-Sword/minstrel/internal/coverart"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
"github.com/Fabled-Sword/minstrel/internal/db"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/eventbus"
|
"github.com/Fabled-Sword/minstrel/internal/eventbus"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/gc"
|
"github.com/Fabled-Sword/minstrel/internal/gc"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/logging"
|
"github.com/Fabled-Sword/minstrel/internal/logging"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/lookups"
|
"github.com/Fabled-Sword/minstrel/internal/lookups"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
"github.com/Fabled-Sword/minstrel/internal/mailer"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/notifications"
|
"github.com/Fabled-Sword/minstrel/internal/notifications"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/periodic"
|
"github.com/Fabled-Sword/minstrel/internal/periodic"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playlists"
|
"github.com/Fabled-Sword/minstrel/internal/playlists"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recsettings"
|
"github.com/Fabled-Sword/minstrel/internal/recsettings"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/scrobble"
|
"github.com/Fabled-Sword/minstrel/internal/scrobble"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/scrobble/listenbrainz"
|
"github.com/Fabled-Sword/minstrel/internal/scrobble/listenbrainz"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/secret"
|
"github.com/Fabled-Sword/minstrel/internal/secret"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/server"
|
"github.com/Fabled-Sword/minstrel/internal/server"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/similarity"
|
"github.com/Fabled-Sword/minstrel/internal/similarity"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/subsonic"
|
"github.com/Fabled-Sword/minstrel/internal/subsonic"
|
||||||
syncpkg "git.fabledsword.com/bvandeusen/minstrel/internal/sync"
|
syncpkg "github.com/Fabled-Sword/minstrel/internal/sync"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tags"
|
"github.com/Fabled-Sword/minstrel/internal/tags"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/backup"
|
"github.com/Fabled-Sword/minstrel/internal/backup"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/config"
|
"github.com/Fabled-Sword/minstrel/internal/config"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
"github.com/Fabled-Sword/minstrel/internal/db"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/logging"
|
"github.com/Fabled-Sword/minstrel/internal/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
const restoreUsage = "usage: minstrel restore [-config PATH] FILE"
|
const restoreUsage = "usage: minstrel restore [-config PATH] FILE"
|
||||||
|
|||||||
+1
-1
@@ -153,6 +153,6 @@ image, and `npm audit` on every web dependency, build tooling included.
|
|||||||
## Reporting a problem
|
## Reporting a problem
|
||||||
|
|
||||||
Open an issue on the
|
Open an issue on the
|
||||||
[repository](https://git.fabledsword.com/bvandeusen/minstrel/issues), or
|
[repository](https://github.com/Fabled-Sword/minstrel/issues), or
|
||||||
contact the maintainer privately first if it's something that shouldn't be
|
contact the maintainer privately first if it's something that shouldn't be
|
||||||
public until fixed.
|
public until fixed.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module git.fabledsword.com/bvandeusen/minstrel
|
module github.com/Fabled-Sword/minstrel
|
||||||
|
|
||||||
go 1.25.0
|
go 1.25.0
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/buildinfo"
|
"github.com/Fabled-Sword/minstrel/internal/buildinfo"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultBaseURL is the lookup endpoint.
|
// DefaultBaseURL is the lookup endpoint.
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AcoustID recording-id lookup, admin side.
|
// AcoustID recording-id lookup, admin side.
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/backup"
|
"github.com/Fabled-Sword/minstrel/internal/backup"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET /api/admin/backups — the backup's verdict, settings and recent runs.
|
// GET /api/admin/backups — the backup's verdict, settings and recent runs.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
"github.com/Fabled-Sword/minstrel/internal/coverart"
|
||||||
)
|
)
|
||||||
|
|
||||||
// apiTestAlbumProvider is a minimal AlbumCoverProvider for use in api
|
// apiTestAlbumProvider is a minimal AlbumCoverProvider for use in api
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// coverageRollupResp is the wire shape for GET /api/admin/library/coverage.
|
// coverageRollupResp is the wire shape for GET /api/admin/library/coverage.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newAdminCoverageRouter builds a test chi router exposing only the
|
// newAdminCoverageRouter builds a test chi router exposing only the
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package api
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleResearchMissingArt bumps the cover-art version unconditionally
|
// handleResearchMissingArt bumps the cover-art version unconditionally
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
"github.com/Fabled-Sword/minstrel/internal/coverart"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newResearchRouter(h *handlers) chi.Router {
|
func newResearchRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
"github.com/Fabled-Sword/minstrel/internal/coverart"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/periodic"
|
"github.com/Fabled-Sword/minstrel/internal/periodic"
|
||||||
)
|
)
|
||||||
|
|
||||||
type adminCoverRefetchResp struct {
|
type adminCoverRefetchResp struct {
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
"github.com/Fabled-Sword/minstrel/internal/coverart"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newAdminCoversRouter builds a test chi router with the two cover admin
|
// newAdminCoversRouter builds a test chi router with the two cover admin
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"github.com/Fabled-Sword/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// duplicateMemberView is one copy in a proposed duplicate group. LikeCount and
|
// duplicateMemberView is one copy in a proposed duplicate group. LikeCount and
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
func dupUUID(b byte) pgtype.UUID {
|
func dupUUID(b byte) pgtype.UUID {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fingerprintSettingsBody is the wire shape for GET and PUT
|
// fingerprintSettingsBody is the wire shape for GET and PUT
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetFingerprintSettings_ServesDefaultsWithoutAService(t *testing.T) {
|
func TestGetFingerprintSettings_ServesDefaultsWithoutAService(t *testing.T) {
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"github.com/Fabled-Sword/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// inviteTTL is the lifetime of a freshly-minted invite. 24 hours
|
// inviteTTL is the lifetime of a freshly-minted invite. 24 hours
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminInvitesRouter(h *handlers) chi.Router {
|
func newAdminInvitesRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The library's folders: where the scan, the watcher and the import
|
// The library's folders: where the scan, the watcher and the import
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tracks"
|
"github.com/Fabled-Sword/minstrel/internal/tracks"
|
||||||
)
|
)
|
||||||
|
|
||||||
// missingTrackView is one track waiting for a file: removed by an admin from
|
// missingTrackView is one track waiting for a file: removed by an admin from
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// missingRow builds a ListMissingTracksRow with just the fields the grouping
|
// missingRow builds a ListMissingTracksRow with just the fields the grouping
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/lookups"
|
"github.com/Fabled-Sword/minstrel/internal/lookups"
|
||||||
)
|
)
|
||||||
|
|
||||||
// lookupSettingsBody is the wire shape for GET and PUT
|
// lookupSettingsBody is the wire shape for GET and PUT
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// loudnessCoverageResp is the wire shape for GET /api/admin/library/loudness.
|
// loudnessCoverageResp is the wire shape for GET /api/admin/library/loudness.
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/netsettings"
|
"github.com/Fabled-Sword/minstrel/internal/netsettings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type networkSettingsResp struct {
|
type networkSettingsResp struct {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/notifications"
|
"github.com/Fabled-Sword/minstrel/internal/notifications"
|
||||||
)
|
)
|
||||||
|
|
||||||
// notificationEmailBody is the wire shape for GET and PUT
|
// notificationEmailBody is the wire shape for GET and PUT
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/providers"
|
"github.com/Fabled-Sword/minstrel/internal/providers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The admin cards for outside sources, Cover sources and Tag sources, run
|
// The admin cards for outside sources, Cover sources and Tag sources, run
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/quarantine"
|
"github.com/Fabled-Sword/minstrel/internal/quarantine"
|
||||||
)
|
)
|
||||||
|
|
||||||
// adminQueueRowView is a single aggregated row in the admin queue response.
|
// adminQueueRowView is a single aggregated row in the admin queue response.
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newAdminQuarantineRouter builds a test chi router with the five admin
|
// newAdminQuarantineRouter builds a test chi router with the five admin
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
func date(s string) pgtype.Date {
|
func date(s string) pgtype.Date {
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recommendation"
|
"github.com/Fabled-Sword/minstrel/internal/recommendation"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recsettings"
|
"github.com/Fabled-Sword/minstrel/internal/recsettings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// weightsResp is one weight profile on the wire, keyed by the same
|
// weightsResp is one weight profile on the wire, keyed by the same
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recsettings"
|
"github.com/Fabled-Sword/minstrel/internal/recsettings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTuningRouter(h *handlers) chi.Router {
|
func newTuningRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// scanStatusResp mirrors the scan_runs row on the wire. Stage tallies are
|
// scanStatusResp mirrors the scan_runs row on the wire. Stage tallies are
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminScanRouter(h *handlers) chi.Router {
|
func newAdminScanRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
"github.com/Fabled-Sword/minstrel/internal/mailer"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/secret"
|
"github.com/Fabled-Sword/minstrel/internal/secret"
|
||||||
)
|
)
|
||||||
|
|
||||||
type smtpConfigResp struct {
|
type smtpConfigResp struct {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminSMTPRouter(h *handlers) chi.Router {
|
func newAdminSMTPRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/buildinfo"
|
"github.com/Fabled-Sword/minstrel/internal/buildinfo"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/logging"
|
"github.com/Fabled-Sword/minstrel/internal/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The admin Overview's status sections: after the verdict, who is
|
// The admin Overview's status sections: after the verdict, who is
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/buildinfo"
|
"github.com/Fabled-Sword/minstrel/internal/buildinfo"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/logging"
|
"github.com/Fabled-Sword/minstrel/internal/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// openPlay records a play by user of track that started ago and has not
|
// openPlay records a play by user of track that started ago and has not
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// adminQueueView is one queue that waits on a person: how many, and since
|
// adminQueueView is one queue that waits on a person: how many, and since
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getAdminSummary(t *testing.T, h *handlers, user dbq.User) (int, adminSummaryView) {
|
func getAdminSummary(t *testing.T, h *handlers, user dbq.User) (int, adminSummaryView) {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"github.com/Fabled-Sword/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// suspectTrackView is one flagged track. FilePath is the evidence: the
|
// suspectTrackView is one flagged track. FilePath is the evidence: the
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package api
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The tag-sources admin card: the shared provider-source handlers
|
// The tag-sources admin card: the shared provider-source handlers
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tags"
|
"github.com/Fabled-Sword/minstrel/internal/tags"
|
||||||
)
|
)
|
||||||
|
|
||||||
// apiTestTagProvider is a minimal TrackTagProvider for api-package tests.
|
// apiTestTagProvider is a minimal TrackTagProvider for api-package tests.
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"github.com/Fabled-Sword/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
"github.com/Fabled-Sword/minstrel/internal/db"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
type adminUserView struct {
|
type adminUserView struct {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAdminUsersRouter(h *handlers) chi.Router {
|
func newAdminUsersRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
+17
-17
@@ -13,23 +13,23 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/backup"
|
"github.com/Fabled-Sword/minstrel/internal/backup"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/config"
|
"github.com/Fabled-Sword/minstrel/internal/config"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
"github.com/Fabled-Sword/minstrel/internal/coverart"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/eventbus"
|
"github.com/Fabled-Sword/minstrel/internal/eventbus"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/lookups"
|
"github.com/Fabled-Sword/minstrel/internal/lookups"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
"github.com/Fabled-Sword/minstrel/internal/mailer"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/netsettings"
|
"github.com/Fabled-Sword/minstrel/internal/netsettings"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/notifications"
|
"github.com/Fabled-Sword/minstrel/internal/notifications"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playevents"
|
"github.com/Fabled-Sword/minstrel/internal/playevents"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playlists"
|
"github.com/Fabled-Sword/minstrel/internal/playlists"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/quarantine"
|
"github.com/Fabled-Sword/minstrel/internal/quarantine"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recommendation"
|
"github.com/Fabled-Sword/minstrel/internal/recommendation"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recsettings"
|
"github.com/Fabled-Sword/minstrel/internal/recsettings"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tags"
|
"github.com/Fabled-Sword/minstrel/internal/tags"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tracks"
|
"github.com/Fabled-Sword/minstrel/internal/tracks"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Mount attaches /api/* handlers to r. Public endpoints (login) are outside
|
// Mount attaches /api/* handlers to r. Public endpoints (login) are outside
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// sessionCookieMaxAge is the cookie lifetime, matching the server's idle
|
// sessionCookieMaxAge is the cookie lifetime, matching the server's idle
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"github.com/Fabled-Sword/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
"github.com/Fabled-Sword/minstrel/internal/mailer"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
"github.com/Fabled-Sword/minstrel/internal/mailer"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/netsettings"
|
"github.com/Fabled-Sword/minstrel/internal/netsettings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// withPublicURL gives h a network-settings service holding url, restoring an
|
// withPublicURL gives h a network-settings service holding url, restoring an
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"github.com/Fabled-Sword/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
"github.com/Fabled-Sword/minstrel/internal/db"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// usernameRe enforces a conservative username shape: 3-32 chars,
|
// usernameRe enforces a conservative username shape: 3-32 chars,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// resetUsers wipes the entire users table (including any non-prefixed admin
|
// resetUsers wipes the entire users table (including any non-prefixed admin
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
|
"github.com/Fabled-Sword/minstrel/internal/audit"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
type resetPasswordReq struct {
|
type resetPasswordReq struct {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/backup"
|
"github.com/Fabled-Sword/minstrel/internal/backup"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetupTokenHeader carries the setup token on a restore upload, whose body is
|
// SetupTokenHeader carries the setup token on a restore upload, whose body is
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/backup"
|
"github.com/Fabled-Sword/minstrel/internal/backup"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/dbtest"
|
"github.com/Fabled-Sword/minstrel/internal/dbtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A new server takes a backup only with the setup token from its log, only
|
// A new server takes a backup only with the setup token from its log, only
|
||||||
|
|||||||
+12
-12
@@ -16,18 +16,18 @@ import (
|
|||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/config"
|
"github.com/Fabled-Sword/minstrel/internal/config"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/dbtest"
|
"github.com/Fabled-Sword/minstrel/internal/dbtest"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
"github.com/Fabled-Sword/minstrel/internal/mailer"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/notifications"
|
"github.com/Fabled-Sword/minstrel/internal/notifications"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playevents"
|
"github.com/Fabled-Sword/minstrel/internal/playevents"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playlists"
|
"github.com/Fabled-Sword/minstrel/internal/playlists"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/quarantine"
|
"github.com/Fabled-Sword/minstrel/internal/quarantine"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recsettings"
|
"github.com/Fabled-Sword/minstrel/internal/recsettings"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/tracks"
|
"github.com/Fabled-Sword/minstrel/internal/tracks"
|
||||||
)
|
)
|
||||||
|
|
||||||
// testHandlers spins up a handlers instance against MINSTREL_TEST_DATABASE_URL.
|
// testHandlers spins up a handlers instance against MINSTREL_TEST_DATABASE_URL.
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
syncpkg "git.fabledsword.com/bvandeusen/minstrel/internal/sync"
|
syncpkg "github.com/Fabled-Sword/minstrel/internal/sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// authedRequest builds a request with a fake user in context, mirroring
|
// authedRequest builds a request with a fake user in context, mirroring
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
"github.com/Fabled-Sword/minstrel/internal/db"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errBadPaging = errors.New("invalid limit or offset")
|
var errBadPaging = errors.New("invalid limit or offset")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUUIDToString(t *testing.T) {
|
func TestUUIDToString(t *testing.T) {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// validDiagnosticKinds is the COARSE category whitelist. Mirrors the
|
// validDiagnosticKinds is the COARSE category whitelist. Mirrors the
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
)
|
)
|
||||||
|
|
||||||
// writeErr answers err in the one /api error envelope (apierror.Body). If err
|
// writeErr answers err in the one /api error envelope (apierror.Body). If err
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
)
|
)
|
||||||
|
|
||||||
func decodeEnvelope(t *testing.T, body []byte) apierror.Body {
|
func decodeEnvelope(t *testing.T, body []byte) apierror.Body {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playevents"
|
"github.com/Fabled-Sword/minstrel/internal/playevents"
|
||||||
)
|
)
|
||||||
|
|
||||||
type eventRequest struct {
|
type eventRequest struct {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/eventbus"
|
"github.com/Fabled-Sword/minstrel/internal/eventbus"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/eventbus"
|
"github.com/Fabled-Sword/minstrel/internal/eventbus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// userUUIDString renders a pgtype.UUID in canonical 8-4-4-4-12 form so
|
// userUUIDString renders a pgtype.UUID in canonical 8-4-4-4-12 form so
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// callEvents invokes h.handleEvents directly, injecting `user` via the same
|
// callEvents invokes h.handleEvents directly, injecting `user` via the same
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// fileRemoveAPIError answers a delete that could not reach the track's file.
|
// fileRemoveAPIError answers a delete that could not reach the track's file.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
const removeTestPath = "/music/Mochi Shop/XYZ (2020)/01 - XYZ.mp3"
|
const removeTestPath = "/music/Mochi Shop/XYZ (2020)/01 - XYZ.mp3"
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package api
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/recommendation"
|
"github.com/Fabled-Sword/minstrel/internal/recommendation"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetHome implements GET /api/home. Returns five sections in one
|
// handleGetHome implements GET /api/home. Returns five sections in one
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newHomeRouter(h *handlers) chi.Router {
|
func newHomeRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The leveled stream: a track rendered with the user's loudness
|
// The leveled stream: a track rendered with the user's loudness
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLeveledStreamToken(t *testing.T) {
|
func TestLeveledStreamToken(t *testing.T) {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db"
|
"github.com/Fabled-Sword/minstrel/internal/db"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetTrack implements GET /api/tracks/{id}. Resolves parent album +
|
// handleGetTrack implements GET /api/tracks/{id}. Resolves parent album +
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Widest plausible bounds for an open-ended year filter. A missing year_from
|
// Widest plausible bounds for an open-ended year filter. A missing year_from
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newLibraryAlbumsRouter(h *handlers) chi.Router {
|
func newLibraryAlbumsRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package api
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// genreCount is one row of the genre browse index.
|
// genreCount is one row of the genre browse index.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// parseYearFilter is pure, so this runs in the fast lane rather than waiting
|
// parseYearFilter is pure, so this runs in the fast lane rather than waiting
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// truncateLibrary clears the music tables between tests. Sessions/users are
|
// truncateLibrary clears the music tables between tests. Sessions/users are
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
syncpkg "git.fabledsword.com/bvandeusen/minstrel/internal/sync"
|
syncpkg "github.com/Fabled-Sword/minstrel/internal/sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SyncBatchLimit caps the number of change rows returned per call.
|
// SyncBatchLimit caps the number of change rows returned per call.
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/sync"
|
"github.com/Fabled-Sword/minstrel/internal/sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
func callLibrarySync(h *handlers, user dbq.User, since string) *httptest.ResponseRecorder {
|
func callLibrarySync(h *handlers, user dbq.User, since string) *httptest.ResponseRecorder {
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ package api
|
|||||||
// failure is a missing value at runtime, not an error at parse time.
|
// failure is a missing value at runtime, not an error at parse time.
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
syncpkg "git.fabledsword.com/bvandeusen/minstrel/internal/sync"
|
syncpkg "github.com/Fabled-Sword/minstrel/internal/sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
type artistSyncView struct {
|
type artistSyncView struct {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// These tests pin the wire-format keys for /api/library/sync upserts.
|
// These tests pin the wire-format keys for /api/library/sync upserts.
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/backup"
|
"github.com/Fabled-Sword/minstrel/internal/backup"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/config"
|
"github.com/Fabled-Sword/minstrel/internal/config"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/eventbus"
|
"github.com/Fabled-Sword/minstrel/internal/eventbus"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playevents"
|
"github.com/Fabled-Sword/minstrel/internal/playevents"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newLibraryRouter builds a test-only chi router with the library handlers
|
// newLibraryRouter builds a test-only chi router with the library handlers
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/eventbus"
|
"github.com/Fabled-Sword/minstrel/internal/eventbus"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/playevents"
|
"github.com/Fabled-Sword/minstrel/internal/playevents"
|
||||||
)
|
)
|
||||||
|
|
||||||
type likedIDsResponse struct {
|
type likedIDsResponse struct {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
func callLike(h *handlers, user dbq.User, method, path string) *httptest.ResponseRecorder {
|
func callLike(h *handlers, user dbq.User, method, path string) *httptest.ResponseRecorder {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/secret"
|
"github.com/Fabled-Sword/minstrel/internal/secret"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LBStatus is the GET response body and the PUT response body. Token is
|
// LBStatus is the GET response body and the PUT response body. Token is
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
type lbStatusJSON struct {
|
type lbStatusJSON struct {
|
||||||
|
|||||||
+2
-2
@@ -4,8 +4,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
|
"github.com/Fabled-Sword/minstrel/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetMe returns the authenticated user's profile shape — id,
|
// handleGetMe returns the authenticated user's profile shape — id,
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetMyHistory implements GET /api/me/history?limit=&offset=.
|
// handleGetMyHistory implements GET /api/me/history?limit=&offset=.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newHistoryRouter mounts ONLY /api/me/history, injecting the user directly
|
// newHistoryRouter mounts ONLY /api/me/history, injecting the user directly
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET /api/me/normalization returns the caller's loudness-normalization
|
// GET /api/me/normalization returns the caller's loudness-normalization
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
"github.com/Fabled-Sword/minstrel/internal/library"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMyNormalization_GetPut(t *testing.T) {
|
func TestMyNormalization_GetPut(t *testing.T) {
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
|
"github.com/Fabled-Sword/minstrel/internal/apierror"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
|
"github.com/Fabled-Sword/minstrel/internal/mailer"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/notifications"
|
"github.com/Fabled-Sword/minstrel/internal/notifications"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The notifications inbox. Rows are written by internal/notifications;
|
// The notifications inbox. Rows are written by internal/notifications;
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
"github.com/Fabled-Sword/minstrel/internal/db/dbq"
|
||||||
"git.fabledsword.com/bvandeusen/minstrel/internal/notifications"
|
"github.com/Fabled-Sword/minstrel/internal/notifications"
|
||||||
)
|
)
|
||||||
|
|
||||||
func notificationsRouter(h *handlers) chi.Router {
|
func notificationsRouter(h *handlers) chi.Router {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user