diff --git a/main.go b/main.go index 8454652a..91c8de6a 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ import ( "github.com/Gleipnir-Technology/nidus-sync/db" "github.com/Gleipnir-Technology/nidus-sync/llm" "github.com/Gleipnir-Technology/nidus-sync/platform/text" - "github.com/Gleipnir-Technology/nidus-sync/public-report" + "github.com/Gleipnir-Technology/nidus-sync/rmo" nidussync "github.com/Gleipnir-Technology/nidus-sync/sync" "github.com/getsentry/sentry-go" sentryhttp "github.com/getsentry/sentry-go/http" @@ -105,9 +105,9 @@ func main() { // Set up routing by hostname sr := nidussync.Router() - hr.Map("", sr) // default - hr.Map("*", sr) // default - hr.Map(config.DomainRMO, publicreport.Router()) // report.mosquitoes.online + hr.Map("", sr) // default + hr.Map("*", sr) // default + hr.Map(config.DomainRMO, rmo.Router()) // report.mosquitoes.online hr.Map(config.DomainNidus, sr) r.Mount("/", hr) diff --git a/public-report/email.go b/rmo/email.go similarity index 94% rename from public-report/email.go rename to rmo/email.go index 823a30fd..ebab6503 100644 --- a/public-report/email.go +++ b/rmo/email.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "fmt" diff --git a/public-report/endpoint.go b/rmo/endpoint.go similarity index 98% rename from public-report/endpoint.go rename to rmo/endpoint.go index 6e694697..a2cf985e 100644 --- a/public-report/endpoint.go +++ b/rmo/endpoint.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "fmt" diff --git a/public-report/geospatial.go b/rmo/geospatial.go similarity index 99% rename from public-report/geospatial.go rename to rmo/geospatial.go index 7b260909..71c4fbb4 100644 --- a/public-report/geospatial.go +++ b/rmo/geospatial.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "fmt" diff --git a/public-report/image-upload.go b/rmo/image-upload.go similarity index 99% rename from public-report/image-upload.go rename to rmo/image-upload.go index a6ccb71d..f20ea783 100644 --- a/public-report/image-upload.go +++ b/rmo/image-upload.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "bytes" diff --git a/public-report/image.go b/rmo/image.go similarity index 94% rename from public-report/image.go rename to rmo/image.go index b14acd49..550956d3 100644 --- a/public-report/image.go +++ b/rmo/image.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "net/http" diff --git a/public-report/mock.go b/rmo/mock.go similarity index 99% rename from public-report/mock.go rename to rmo/mock.go index c76af1c0..8d029486 100644 --- a/public-report/mock.go +++ b/rmo/mock.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "net/http" diff --git a/public-report/nuisance.go b/rmo/nuisance.go similarity index 99% rename from public-report/nuisance.go rename to rmo/nuisance.go index e262c64d..ace0ee08 100644 --- a/public-report/nuisance.go +++ b/rmo/nuisance.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "fmt" diff --git a/public-report/page.go b/rmo/page.go similarity index 84% rename from public-report/page.go rename to rmo/page.go index 2785e7e6..c7f6ebc4 100644 --- a/public-report/page.go +++ b/rmo/page.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "embed" @@ -14,7 +14,7 @@ var components = [...]string{"footer", "header", "photo-upload", "photo-upload-h var svgs = [...]string{"check-report", "mosquito", "pond"} func buildTemplate(files ...string) *htmlpage.BuiltTemplate { - subdir := "public-report" + subdir := "rmo" full_files := make([]string, 0) for _, f := range files { full_files = append(full_files, fmt.Sprintf("%s/template/%s.html", subdir, f)) @@ -25,5 +25,5 @@ func buildTemplate(files ...string) *htmlpage.BuiltTemplate { for _, c := range svgs { full_files = append(full_files, fmt.Sprintf("%s/template/svg/%s.svg", subdir, c)) } - return htmlpage.NewBuiltTemplate(embeddedFiles, "public-report/", full_files...) + return htmlpage.NewBuiltTemplate(embeddedFiles, "rmo/", full_files...) } diff --git a/public-report/pool.go b/rmo/pool.go similarity index 99% rename from public-report/pool.go rename to rmo/pool.go index 087f5301..5b6adb08 100644 --- a/public-report/pool.go +++ b/rmo/pool.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "fmt" diff --git a/public-report/quick.go b/rmo/quick.go similarity index 99% rename from public-report/quick.go rename to rmo/quick.go index 708b5953..87606e71 100644 --- a/public-report/quick.go +++ b/rmo/quick.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "context" diff --git a/public-report/report.go b/rmo/report.go similarity index 97% rename from public-report/report.go rename to rmo/report.go index b5baeb8f..a7d957d9 100644 --- a/public-report/report.go +++ b/rmo/report.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "crypto/rand" diff --git a/public-report/routes.go b/rmo/routes.go similarity index 98% rename from public-report/routes.go rename to rmo/routes.go index ec4924f3..105f2422 100644 --- a/public-report/routes.go +++ b/rmo/routes.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "github.com/Gleipnir-Technology/nidus-sync/htmlpage" diff --git a/public-report/search.go b/rmo/search.go similarity index 95% rename from public-report/search.go rename to rmo/search.go index e66e1566..d5f0d3ac 100644 --- a/public-report/search.go +++ b/rmo/search.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "net/http" diff --git a/public-report/status.go b/rmo/status.go similarity index 99% rename from public-report/status.go rename to rmo/status.go index 7b0f39ae..98b134ea 100644 --- a/public-report/status.go +++ b/rmo/status.go @@ -1,4 +1,4 @@ -package publicreport +package rmo import ( "context" diff --git a/public-report/template/base.html b/rmo/template/base.html similarity index 100% rename from public-report/template/base.html rename to rmo/template/base.html diff --git a/public-report/template/component/footer.html b/rmo/template/component/footer.html similarity index 100% rename from public-report/template/component/footer.html rename to rmo/template/component/footer.html diff --git a/public-report/template/component/header.html b/rmo/template/component/header.html similarity index 100% rename from public-report/template/component/header.html rename to rmo/template/component/header.html diff --git a/public-report/template/component/map-header.html b/rmo/template/component/map-header.html similarity index 100% rename from public-report/template/component/map-header.html rename to rmo/template/component/map-header.html diff --git a/public-report/template/component/map.html b/rmo/template/component/map.html similarity index 100% rename from public-report/template/component/map.html rename to rmo/template/component/map.html diff --git a/public-report/template/component/photo-upload-header.html b/rmo/template/component/photo-upload-header.html similarity index 100% rename from public-report/template/component/photo-upload-header.html rename to rmo/template/component/photo-upload-header.html diff --git a/public-report/template/component/photo-upload.html b/rmo/template/component/photo-upload.html similarity index 100% rename from public-report/template/component/photo-upload.html rename to rmo/template/component/photo-upload.html diff --git a/public-report/template/mock/district-root.html b/rmo/template/mock/district-root.html similarity index 100% rename from public-report/template/mock/district-root.html rename to rmo/template/mock/district-root.html diff --git a/public-report/template/mock/nuisance-submit-complete.html b/rmo/template/mock/nuisance-submit-complete.html similarity index 100% rename from public-report/template/mock/nuisance-submit-complete.html rename to rmo/template/mock/nuisance-submit-complete.html diff --git a/public-report/template/mock/nuisance.html b/rmo/template/mock/nuisance.html similarity index 100% rename from public-report/template/mock/nuisance.html rename to rmo/template/mock/nuisance.html diff --git a/public-report/template/mock/root.html b/rmo/template/mock/root.html similarity index 100% rename from public-report/template/mock/root.html rename to rmo/template/mock/root.html diff --git a/public-report/template/mock/status.html b/rmo/template/mock/status.html similarity index 100% rename from public-report/template/mock/status.html rename to rmo/template/mock/status.html diff --git a/public-report/template/mock/water.html b/rmo/template/mock/water.html similarity index 100% rename from public-report/template/mock/water.html rename to rmo/template/mock/water.html diff --git a/public-report/template/nuisance-submit-complete.html b/rmo/template/nuisance-submit-complete.html similarity index 100% rename from public-report/template/nuisance-submit-complete.html rename to rmo/template/nuisance-submit-complete.html diff --git a/public-report/template/nuisance.html b/rmo/template/nuisance.html similarity index 100% rename from public-report/template/nuisance.html rename to rmo/template/nuisance.html diff --git a/public-report/template/pool-submit-complete.html b/rmo/template/pool-submit-complete.html similarity index 100% rename from public-report/template/pool-submit-complete.html rename to rmo/template/pool-submit-complete.html diff --git a/public-report/template/pool.html b/rmo/template/pool.html similarity index 100% rename from public-report/template/pool.html rename to rmo/template/pool.html diff --git a/public-report/template/privacy.html b/rmo/template/privacy.html similarity index 100% rename from public-report/template/privacy.html rename to rmo/template/privacy.html diff --git a/public-report/template/quick-submit-complete.html b/rmo/template/quick-submit-complete.html similarity index 100% rename from public-report/template/quick-submit-complete.html rename to rmo/template/quick-submit-complete.html diff --git a/public-report/template/quick.html b/rmo/template/quick.html similarity index 100% rename from public-report/template/quick.html rename to rmo/template/quick.html diff --git a/public-report/template/register-notifications-complete.html b/rmo/template/register-notifications-complete.html similarity index 100% rename from public-report/template/register-notifications-complete.html rename to rmo/template/register-notifications-complete.html diff --git a/public-report/template/root.html b/rmo/template/root.html similarity index 100% rename from public-report/template/root.html rename to rmo/template/root.html diff --git a/public-report/template/search.html b/rmo/template/search.html similarity index 100% rename from public-report/template/search.html rename to rmo/template/search.html diff --git a/public-report/template/status-by-id.html b/rmo/template/status-by-id.html similarity index 100% rename from public-report/template/status-by-id.html rename to rmo/template/status-by-id.html diff --git a/public-report/template/status.html b/rmo/template/status.html similarity index 100% rename from public-report/template/status.html rename to rmo/template/status.html diff --git a/public-report/template/svg/check-report.svg b/rmo/template/svg/check-report.svg similarity index 100% rename from public-report/template/svg/check-report.svg rename to rmo/template/svg/check-report.svg diff --git a/public-report/template/svg/mosquito.svg b/rmo/template/svg/mosquito.svg similarity index 100% rename from public-report/template/svg/mosquito.svg rename to rmo/template/svg/mosquito.svg diff --git a/public-report/template/svg/pond.svg b/rmo/template/svg/pond.svg similarity index 100% rename from public-report/template/svg/pond.svg rename to rmo/template/svg/pond.svg diff --git a/public-report/template/terms.html b/rmo/template/terms.html similarity index 100% rename from public-report/template/terms.html rename to rmo/template/terms.html