From 4ecd88c0c0a5672d888aff6d55fa4277b1c06688 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Wed, 8 Jan 2025 17:52:23 +0000 Subject: [PATCH] Rename sitesQueries in serve and upload --- serve/serve.go | 6 +++--- upload/upload.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/serve/serve.go b/serve/serve.go index fabdd96..224b0a9 100644 --- a/serve/serve.go +++ b/serve/serve.go @@ -45,17 +45,17 @@ const ( NoCacheQuery = "/?__bluebell-no-cache=" ) -type sitesQueries interface { +type serveQueries interface { GetLastUpdatedByDomainBranch(ctx context.Context, params database.GetLastUpdatedByDomainBranchParams) (time.Time, error) } -func New(storage afero.Fs, db sitesQueries) *Handler { +func New(storage afero.Fs, db serveQueries) *Handler { return &Handler{storage, db} } type Handler struct { storageFs afero.Fs - db sitesQueries + db serveQueries } func cacheBuster(rw http.ResponseWriter, req *http.Request) { diff --git a/upload/upload.go b/upload/upload.go index b456e8a..c5282b6 100644 --- a/upload/upload.go +++ b/upload/upload.go @@ -27,11 +27,11 @@ var indexBranches = []string{ "master", } -type sitesQueries interface { +type uploadQueries interface { GetSiteByDomain(ctx context.Context, domain string) (database.Site, error) } -func New(storage afero.Fs, db sitesQueries) *Handler { +func New(storage afero.Fs, db uploadQueries) *Handler { return &Handler{storageFs: storage, db: db} } @@ -39,7 +39,7 @@ const maxFileSize = 1 * humanize.GiByte type Handler struct { storageFs afero.Fs - db sitesQueries + db uploadQueries mu syncmap.Map[string, *sync.Mutex] }