From 59782a377fc00ca1afa487f3f646d4aa1d71fd9f Mon Sep 17 00:00:00 2001 From: Stash Dev Date: Sat, 9 Feb 2019 18:53:08 -0800 Subject: [PATCH] Moved everything out of internal --- {internal/api => api}/api-packr.go | 0 {internal/api => api}/resolver.go | 4 ++-- {internal/api => api}/resolver_model_gallery.go | 2 +- {internal/api => api}/resolver_model_performer.go | 4 ++-- {internal/api => api}/resolver_model_scene.go | 8 ++++---- {internal/api => api}/resolver_model_scene_marker.go | 4 ++-- {internal/api => api}/resolver_model_studio.go | 4 ++-- {internal/api => api}/resolver_model_tag.go | 2 +- {internal/api => api}/resolver_mutation_performer.go | 6 +++--- {internal/api => api}/resolver_mutation_scene.go | 4 ++-- {internal/api => api}/resolver_mutation_studio.go | 6 +++--- {internal/api => api}/resolver_mutation_tag.go | 4 ++-- {internal/api => api}/resolver_query_find_gallery.go | 2 +- {internal/api => api}/resolver_query_find_performer.go | 2 +- {internal/api => api}/resolver_query_find_scene.go | 2 +- .../api => api}/resolver_query_find_scene_marker.go | 2 +- {internal/api => api}/resolver_query_find_studio.go | 2 +- {internal/api => api}/resolver_query_find_tag.go | 2 +- {internal/api => api}/resolver_query_metadata.go | 2 +- .../api => api}/resolver_subscription_metadata.go | 0 {internal/api => api}/routes_gallery.go | 2 +- {internal/api => api}/routes_performer.go | 2 +- {internal/api => api}/routes_scene.go | 8 ++++---- {internal/api => api}/routes_studio.go | 2 +- {internal/api => api}/server.go | 4 ++-- {internal/api => api}/urlbuilders/gallery.go | 0 {internal/api => api}/urlbuilders/performer.go | 0 {internal/api => api}/urlbuilders/scene.go | 0 {internal/api => api}/urlbuilders/studio.go | 0 {internal/database => database}/database-packr.go | 0 {internal/database => database}/database.go | 2 +- .../migrations/1_initial.down.sql | 0 .../database => database}/migrations/1_initial.up.sql | 0 {internal/database => database}/packr_source.go | 0 {internal/ffmpeg => ffmpeg}/encoder.go | 2 +- {internal/ffmpeg => ffmpeg}/ffprobe.go | 0 {internal/ffmpeg => ffmpeg}/types.go | 0 {internal/logger => logger}/logger.go | 0 {internal/logger => logger}/progress_formatter.go | 0 main.go | 6 +++--- {internal/manager => manager}/job_status.go | 0 {internal/manager => manager}/json_utils.go | 4 +++- {internal/manager => manager}/jsonschema/config.go | 2 +- {internal/manager => manager}/jsonschema/mappings.go | 0 {internal/manager => manager}/jsonschema/performer.go | 0 {internal/manager => manager}/jsonschema/scene.go | 0 {internal/manager => manager}/jsonschema/scraped.go | 0 {internal/manager => manager}/jsonschema/studio.go | 0 {internal/manager => manager}/jsonschema/time_rails.go | 0 {internal/manager => manager}/jsonschema/utils.go | 0 {internal/manager => manager}/manager.go | 4 ++-- {internal/manager => manager}/paths/paths.go | 4 ++-- {internal/manager => manager}/paths/paths_fixed.go | 2 +- {internal/manager => manager}/paths/paths_gallery.go | 2 +- {internal/manager => manager}/paths/paths_generated.go | 2 +- {internal/manager => manager}/paths/paths_json.go | 2 +- .../manager => manager}/paths/paths_scene_markers.go | 0 {internal/manager => manager}/paths/paths_scenes.go | 2 +- {internal/manager => manager}/task.go | 0 {internal/manager => manager}/task_export.go | 10 +++++----- {internal/manager => manager}/task_import.go | 10 +++++----- {internal/manager => manager}/task_scan.go | 10 +++++----- {internal/manager => manager}/utils.go | 2 +- {internal/models => models}/extension_find_filter.go | 0 {internal/models => models}/generated_exec.go | 0 {internal/models => models}/generated_models.go | 0 {internal/models => models}/model_gallery.go | 6 +++--- {internal/models => models}/model_joins.go | 0 {internal/models => models}/model_performer.go | 0 {internal/models => models}/model_scene.go | 0 {internal/models => models}/model_scene_marker.go | 0 {internal/models => models}/model_scraped_item.go | 0 {internal/models => models}/model_studio.go | 0 {internal/models => models}/model_tag.go | 0 {internal/models => models}/querybuilder_gallery.go | 2 +- {internal/models => models}/querybuilder_joins.go | 0 {internal/models => models}/querybuilder_performer.go | 2 +- {internal/models => models}/querybuilder_scene.go | 2 +- .../models => models}/querybuilder_scene_marker.go | 2 +- .../models => models}/querybuilder_scraped_item.go | 2 +- {internal/models => models}/querybuilder_sql.go | 2 +- {internal/models => models}/querybuilder_studio.go | 2 +- {internal/models => models}/querybuilder_tag.go | 2 +- {internal/models => models}/sqlite_timestamp.go | 0 {internal/scraper => scraper}/freeones.go | 4 ++-- {internal/utils => utils}/crypto.go | 0 {internal/utils => utils}/date.go | 0 {internal/utils => utils}/file.go | 0 {internal/utils => utils}/image.go | 0 {internal/utils => utils}/natural_sort.go | 0 {internal/utils => utils}/string_collections.go | 0 {internal/utils => utils}/vtt.go | 0 92 files changed, 87 insertions(+), 85 deletions(-) rename {internal/api => api}/api-packr.go (100%) rename {internal/api => api}/resolver.go (98%) rename {internal/api => api}/resolver_model_gallery.go (91%) rename {internal/api => api}/resolver_model_performer.go (97%) rename {internal/api => api}/resolver_model_scene.go (94%) rename {internal/api => api}/resolver_model_scene_marker.go (93%) rename {internal/api => api}/resolver_model_studio.go (90%) rename {internal/api => api}/resolver_model_tag.go (93%) rename {internal/api => api}/resolver_mutation_performer.go (97%) rename {internal/api => api}/resolver_mutation_scene.go (98%) rename {internal/api => api}/resolver_mutation_studio.go (93%) rename {internal/api => api}/resolver_mutation_tag.go (94%) rename {internal/api => api}/resolver_query_find_gallery.go (92%) rename {internal/api => api}/resolver_query_find_performer.go (94%) rename {internal/api => api}/resolver_query_find_scene.go (94%) rename {internal/api => api}/resolver_query_find_scene_marker.go (90%) rename {internal/api => api}/resolver_query_find_studio.go (93%) rename {internal/api => api}/resolver_query_find_tag.go (88%) rename {internal/api => api}/resolver_query_metadata.go (93%) rename {internal/api => api}/resolver_subscription_metadata.go (100%) rename {internal/api => api}/routes_gallery.go (96%) rename {internal/api => api}/routes_performer.go (95%) rename {internal/api => api}/routes_scene.go (96%) rename {internal/api => api}/routes_studio.go (95%) rename {internal/api => api}/server.go (97%) rename {internal/api => api}/urlbuilders/gallery.go (100%) rename {internal/api => api}/urlbuilders/performer.go (100%) rename {internal/api => api}/urlbuilders/scene.go (100%) rename {internal/api => api}/urlbuilders/studio.go (100%) rename {internal/database => database}/database-packr.go (100%) rename {internal/database => database}/database.go (97%) rename {internal/database => database}/migrations/1_initial.down.sql (100%) rename {internal/database => database}/migrations/1_initial.up.sql (100%) rename {internal/database => database}/packr_source.go (100%) rename {internal/ffmpeg => ffmpeg}/encoder.go (98%) rename {internal/ffmpeg => ffmpeg}/ffprobe.go (100%) rename {internal/ffmpeg => ffmpeg}/types.go (100%) rename {internal/logger => logger}/logger.go (100%) rename {internal/logger => logger}/progress_formatter.go (100%) rename {internal/manager => manager}/job_status.go (100%) rename {internal/manager => manager}/json_utils.go (96%) rename {internal/manager => manager}/jsonschema/config.go (93%) rename {internal/manager => manager}/jsonschema/mappings.go (100%) rename {internal/manager => manager}/jsonschema/performer.go (100%) rename {internal/manager => manager}/jsonschema/scene.go (100%) rename {internal/manager => manager}/jsonschema/scraped.go (100%) rename {internal/manager => manager}/jsonschema/studio.go (100%) rename {internal/manager => manager}/jsonschema/time_rails.go (100%) rename {internal/manager => manager}/jsonschema/utils.go (100%) rename {internal/manager => manager}/manager.go (93%) rename {internal/manager => manager}/paths/paths.go (91%) rename {internal/manager => manager}/paths/paths_fixed.go (97%) rename {internal/manager => manager}/paths/paths_gallery.go (89%) rename {internal/manager => manager}/paths/paths_generated.go (95%) rename {internal/manager => manager}/paths/paths_json.go (96%) rename {internal/manager => manager}/paths/paths_scene_markers.go (100%) rename {internal/manager => manager}/paths/paths_scenes.go (96%) rename {internal/manager => manager}/task.go (100%) rename {internal/manager => manager}/task_export.go (98%) rename {internal/manager => manager}/task_import.go (98%) rename {internal/manager => manager}/task_scan.go (95%) rename {internal/manager => manager}/utils.go (90%) rename {internal/models => models}/extension_find_filter.go (100%) rename {internal/models => models}/generated_exec.go (100%) rename {internal/models => models}/generated_models.go (100%) rename {internal/models => models}/model_gallery.go (94%) rename {internal/models => models}/model_joins.go (100%) rename {internal/models => models}/model_performer.go (100%) rename {internal/models => models}/model_scene.go (100%) rename {internal/models => models}/model_scene_marker.go (100%) rename {internal/models => models}/model_scraped_item.go (100%) rename {internal/models => models}/model_studio.go (100%) rename {internal/models => models}/model_tag.go (100%) rename {internal/models => models}/querybuilder_gallery.go (98%) rename {internal/models => models}/querybuilder_joins.go (100%) rename {internal/models => models}/querybuilder_performer.go (99%) rename {internal/models => models}/querybuilder_scene.go (99%) rename {internal/models => models}/querybuilder_scene_marker.go (99%) rename {internal/models => models}/querybuilder_scraped_item.go (98%) rename {internal/models => models}/querybuilder_sql.go (99%) rename {internal/models => models}/querybuilder_studio.go (98%) rename {internal/models => models}/querybuilder_tag.go (98%) rename {internal/models => models}/sqlite_timestamp.go (100%) rename {internal/scraper => scraper}/freeones.go (98%) rename {internal/utils => utils}/crypto.go (100%) rename {internal/utils => utils}/date.go (100%) rename {internal/utils => utils}/file.go (100%) rename {internal/utils => utils}/image.go (100%) rename {internal/utils => utils}/natural_sort.go (100%) rename {internal/utils => utils}/string_collections.go (100%) rename {internal/utils => utils}/vtt.go (100%) diff --git a/internal/api/api-packr.go b/api/api-packr.go similarity index 100% rename from internal/api/api-packr.go rename to api/api-packr.go diff --git a/internal/api/resolver.go b/api/resolver.go similarity index 98% rename from internal/api/resolver.go rename to api/resolver.go index bf9b0e7b2..8109c0519 100644 --- a/internal/api/resolver.go +++ b/api/resolver.go @@ -2,8 +2,8 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/scraper" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/scraper" "sort" "strconv" ) diff --git a/internal/api/resolver_model_gallery.go b/api/resolver_model_gallery.go similarity index 91% rename from internal/api/resolver_model_gallery.go rename to api/resolver_model_gallery.go index 4ab18fb7d..fbbfadd3d 100644 --- a/internal/api/resolver_model_gallery.go +++ b/api/resolver_model_gallery.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_model_performer.go b/api/resolver_model_performer.go similarity index 97% rename from internal/api/resolver_model_performer.go rename to api/resolver_model_performer.go index c7753a91f..135eb1fec 100644 --- a/internal/api/resolver_model_performer.go +++ b/api/resolver_model_performer.go @@ -2,8 +2,8 @@ package api import ( "context" - "github.com/stashapp/stash/internal/api/urlbuilders" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/api/urlbuilders" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_model_scene.go b/api/resolver_model_scene.go similarity index 94% rename from internal/api/resolver_model_scene.go rename to api/resolver_model_scene.go index 273c37693..ed63c1254 100644 --- a/internal/api/resolver_model_scene.go +++ b/api/resolver_model_scene.go @@ -2,10 +2,10 @@ package api import ( "context" - "github.com/stashapp/stash/internal/api/urlbuilders" - "github.com/stashapp/stash/internal/manager" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/api/urlbuilders" + "github.com/stashapp/stash/manager" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/utils" "strconv" ) diff --git a/internal/api/resolver_model_scene_marker.go b/api/resolver_model_scene_marker.go similarity index 93% rename from internal/api/resolver_model_scene_marker.go rename to api/resolver_model_scene_marker.go index 97b2a8735..e82911f9a 100644 --- a/internal/api/resolver_model_scene_marker.go +++ b/api/resolver_model_scene_marker.go @@ -2,8 +2,8 @@ package api import ( "context" - "github.com/stashapp/stash/internal/api/urlbuilders" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/api/urlbuilders" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_model_studio.go b/api/resolver_model_studio.go similarity index 90% rename from internal/api/resolver_model_studio.go rename to api/resolver_model_studio.go index e98f5119d..729135dd7 100644 --- a/internal/api/resolver_model_studio.go +++ b/api/resolver_model_studio.go @@ -2,8 +2,8 @@ package api import ( "context" - "github.com/stashapp/stash/internal/api/urlbuilders" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/api/urlbuilders" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_model_tag.go b/api/resolver_model_tag.go similarity index 93% rename from internal/api/resolver_model_tag.go rename to api/resolver_model_tag.go index cd589f799..1bb516887 100644 --- a/internal/api/resolver_model_tag.go +++ b/api/resolver_model_tag.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_mutation_performer.go b/api/resolver_mutation_performer.go similarity index 97% rename from internal/api/resolver_mutation_performer.go rename to api/resolver_mutation_performer.go index 89c195426..cf29c416f 100644 --- a/internal/api/resolver_mutation_performer.go +++ b/api/resolver_mutation_performer.go @@ -3,9 +3,9 @@ package api import ( "context" "database/sql" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/utils" "strconv" "time" ) diff --git a/internal/api/resolver_mutation_scene.go b/api/resolver_mutation_scene.go similarity index 98% rename from internal/api/resolver_mutation_scene.go rename to api/resolver_mutation_scene.go index e60c9e1cf..051aebfb8 100644 --- a/internal/api/resolver_mutation_scene.go +++ b/api/resolver_mutation_scene.go @@ -3,8 +3,8 @@ package api import ( "context" "database/sql" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/models" "strconv" "time" ) diff --git a/internal/api/resolver_mutation_studio.go b/api/resolver_mutation_studio.go similarity index 93% rename from internal/api/resolver_mutation_studio.go rename to api/resolver_mutation_studio.go index 29802371b..50abcd369 100644 --- a/internal/api/resolver_mutation_studio.go +++ b/api/resolver_mutation_studio.go @@ -3,9 +3,9 @@ package api import ( "context" "database/sql" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/utils" "strconv" "time" ) diff --git a/internal/api/resolver_mutation_tag.go b/api/resolver_mutation_tag.go similarity index 94% rename from internal/api/resolver_mutation_tag.go rename to api/resolver_mutation_tag.go index 3a6931a21..9b0a3528a 100644 --- a/internal/api/resolver_mutation_tag.go +++ b/api/resolver_mutation_tag.go @@ -2,8 +2,8 @@ package api import ( "context" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/models" "strconv" "time" ) diff --git a/internal/api/resolver_query_find_gallery.go b/api/resolver_query_find_gallery.go similarity index 92% rename from internal/api/resolver_query_find_gallery.go rename to api/resolver_query_find_gallery.go index 15e1a2418..25164560b 100644 --- a/internal/api/resolver_query_find_gallery.go +++ b/api/resolver_query_find_gallery.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_query_find_performer.go b/api/resolver_query_find_performer.go similarity index 94% rename from internal/api/resolver_query_find_performer.go rename to api/resolver_query_find_performer.go index 4c914f66a..f4ebf5572 100644 --- a/internal/api/resolver_query_find_performer.go +++ b/api/resolver_query_find_performer.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_query_find_scene.go b/api/resolver_query_find_scene.go similarity index 94% rename from internal/api/resolver_query_find_scene.go rename to api/resolver_query_find_scene.go index dbcdc83ab..92a287567 100644 --- a/internal/api/resolver_query_find_scene.go +++ b/api/resolver_query_find_scene.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_query_find_scene_marker.go b/api/resolver_query_find_scene_marker.go similarity index 90% rename from internal/api/resolver_query_find_scene_marker.go rename to api/resolver_query_find_scene_marker.go index 7ac711554..beac78808 100644 --- a/internal/api/resolver_query_find_scene_marker.go +++ b/api/resolver_query_find_scene_marker.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" ) func (r *queryResolver) FindSceneMarkers(ctx context.Context, scene_marker_filter *models.SceneMarkerFilterType, filter *models.FindFilterType) (models.FindSceneMarkersResultType, error) { diff --git a/internal/api/resolver_query_find_studio.go b/api/resolver_query_find_studio.go similarity index 93% rename from internal/api/resolver_query_find_studio.go rename to api/resolver_query_find_studio.go index 9e78455e6..9678fa965 100644 --- a/internal/api/resolver_query_find_studio.go +++ b/api/resolver_query_find_studio.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_query_find_tag.go b/api/resolver_query_find_tag.go similarity index 88% rename from internal/api/resolver_query_find_tag.go rename to api/resolver_query_find_tag.go index 9d1f2c910..0ba2f8a70 100644 --- a/internal/api/resolver_query_find_tag.go +++ b/api/resolver_query_find_tag.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "strconv" ) diff --git a/internal/api/resolver_query_metadata.go b/api/resolver_query_metadata.go similarity index 93% rename from internal/api/resolver_query_metadata.go rename to api/resolver_query_metadata.go index 156cecc2f..b0e9f63cf 100644 --- a/internal/api/resolver_query_metadata.go +++ b/api/resolver_query_metadata.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/stashapp/stash/internal/manager" + "github.com/stashapp/stash/manager" ) func (r *queryResolver) MetadataScan(ctx context.Context) (string, error) { diff --git a/internal/api/resolver_subscription_metadata.go b/api/resolver_subscription_metadata.go similarity index 100% rename from internal/api/resolver_subscription_metadata.go rename to api/resolver_subscription_metadata.go diff --git a/internal/api/routes_gallery.go b/api/routes_gallery.go similarity index 96% rename from internal/api/routes_gallery.go rename to api/routes_gallery.go index 63a9021ba..334eaf685 100644 --- a/internal/api/routes_gallery.go +++ b/api/routes_gallery.go @@ -3,7 +3,7 @@ package api import ( "context" "github.com/go-chi/chi" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "net/http" "strconv" ) diff --git a/internal/api/routes_performer.go b/api/routes_performer.go similarity index 95% rename from internal/api/routes_performer.go rename to api/routes_performer.go index 8e59739db..e73b954e8 100644 --- a/internal/api/routes_performer.go +++ b/api/routes_performer.go @@ -3,7 +3,7 @@ package api import ( "context" "github.com/go-chi/chi" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "net/http" "strconv" ) diff --git a/internal/api/routes_scene.go b/api/routes_scene.go similarity index 96% rename from internal/api/routes_scene.go rename to api/routes_scene.go index ac963fb90..15c58286e 100644 --- a/internal/api/routes_scene.go +++ b/api/routes_scene.go @@ -3,10 +3,10 @@ package api import ( "context" "github.com/go-chi/chi" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/manager" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/manager" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/utils" "net/http" "strconv" "strings" diff --git a/internal/api/routes_studio.go b/api/routes_studio.go similarity index 95% rename from internal/api/routes_studio.go rename to api/routes_studio.go index 41a4dbf62..6c993fad4 100644 --- a/internal/api/routes_studio.go +++ b/api/routes_studio.go @@ -3,7 +3,7 @@ package api import ( "context" "github.com/go-chi/chi" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/models" "net/http" "strconv" ) diff --git a/internal/api/server.go b/api/server.go similarity index 97% rename from internal/api/server.go rename to api/server.go index a07865155..e38c37b12 100644 --- a/internal/api/server.go +++ b/api/server.go @@ -10,8 +10,8 @@ import ( "github.com/go-chi/chi/middleware" "github.com/gobuffalo/packr/v2" "github.com/rs/cors" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/models" "net/http" "path" "runtime/debug" diff --git a/internal/api/urlbuilders/gallery.go b/api/urlbuilders/gallery.go similarity index 100% rename from internal/api/urlbuilders/gallery.go rename to api/urlbuilders/gallery.go diff --git a/internal/api/urlbuilders/performer.go b/api/urlbuilders/performer.go similarity index 100% rename from internal/api/urlbuilders/performer.go rename to api/urlbuilders/performer.go diff --git a/internal/api/urlbuilders/scene.go b/api/urlbuilders/scene.go similarity index 100% rename from internal/api/urlbuilders/scene.go rename to api/urlbuilders/scene.go diff --git a/internal/api/urlbuilders/studio.go b/api/urlbuilders/studio.go similarity index 100% rename from internal/api/urlbuilders/studio.go rename to api/urlbuilders/studio.go diff --git a/internal/database/database-packr.go b/database/database-packr.go similarity index 100% rename from internal/database/database-packr.go rename to database/database-packr.go diff --git a/internal/database/database.go b/database/database.go similarity index 97% rename from internal/database/database.go rename to database/database.go index 7d6442d1f..f6f448cbb 100644 --- a/internal/database/database.go +++ b/database/database.go @@ -7,7 +7,7 @@ import ( "github.com/golang-migrate/migrate/v4/source" "github.com/jmoiron/sqlx" _ "github.com/mattn/go-sqlite3" - "github.com/stashapp/stash/internal/logger" + "github.com/stashapp/stash/logger" "runtime" "strings" ) diff --git a/internal/database/migrations/1_initial.down.sql b/database/migrations/1_initial.down.sql similarity index 100% rename from internal/database/migrations/1_initial.down.sql rename to database/migrations/1_initial.down.sql diff --git a/internal/database/migrations/1_initial.up.sql b/database/migrations/1_initial.up.sql similarity index 100% rename from internal/database/migrations/1_initial.up.sql rename to database/migrations/1_initial.up.sql diff --git a/internal/database/packr_source.go b/database/packr_source.go similarity index 100% rename from internal/database/packr_source.go rename to database/packr_source.go diff --git a/internal/ffmpeg/encoder.go b/ffmpeg/encoder.go similarity index 98% rename from internal/ffmpeg/encoder.go rename to ffmpeg/encoder.go index 5a8b1b779..b5ceff2ae 100644 --- a/internal/ffmpeg/encoder.go +++ b/ffmpeg/encoder.go @@ -2,7 +2,7 @@ package ffmpeg import ( "fmt" - "github.com/stashapp/stash/internal/logger" + "github.com/stashapp/stash/logger" "io/ioutil" "os/exec" "regexp" diff --git a/internal/ffmpeg/ffprobe.go b/ffmpeg/ffprobe.go similarity index 100% rename from internal/ffmpeg/ffprobe.go rename to ffmpeg/ffprobe.go diff --git a/internal/ffmpeg/types.go b/ffmpeg/types.go similarity index 100% rename from internal/ffmpeg/types.go rename to ffmpeg/types.go diff --git a/internal/logger/logger.go b/logger/logger.go similarity index 100% rename from internal/logger/logger.go rename to logger/logger.go diff --git a/internal/logger/progress_formatter.go b/logger/progress_formatter.go similarity index 100% rename from internal/logger/progress_formatter.go rename to logger/progress_formatter.go diff --git a/main.go b/main.go index 44afee922..684bd1cd3 100644 --- a/main.go +++ b/main.go @@ -1,9 +1,9 @@ package main import ( - "github.com/stashapp/stash/internal/api" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/manager" + "github.com/stashapp/stash/api" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/manager" _ "github.com/golang-migrate/migrate/v4/database/sqlite3" _ "github.com/golang-migrate/migrate/v4/source/file" diff --git a/internal/manager/job_status.go b/manager/job_status.go similarity index 100% rename from internal/manager/job_status.go rename to manager/job_status.go diff --git a/internal/manager/json_utils.go b/manager/json_utils.go similarity index 96% rename from internal/manager/json_utils.go rename to manager/json_utils.go index 81a16ddd8..fd42e7bf7 100644 --- a/internal/manager/json_utils.go +++ b/manager/json_utils.go @@ -1,6 +1,8 @@ package manager -import "github.com/stashapp/stash/internal/manager/jsonschema" +import ( + "github.com/stashapp/stash/manager/jsonschema" +) type jsonUtils struct {} diff --git a/internal/manager/jsonschema/config.go b/manager/jsonschema/config.go similarity index 93% rename from internal/manager/jsonschema/config.go rename to manager/jsonschema/config.go index 40920e241..f477a597f 100644 --- a/internal/manager/jsonschema/config.go +++ b/manager/jsonschema/config.go @@ -2,7 +2,7 @@ package jsonschema import ( "encoding/json" - "github.com/stashapp/stash/internal/logger" + "github.com/stashapp/stash/logger" "os" ) diff --git a/internal/manager/jsonschema/mappings.go b/manager/jsonschema/mappings.go similarity index 100% rename from internal/manager/jsonschema/mappings.go rename to manager/jsonschema/mappings.go diff --git a/internal/manager/jsonschema/performer.go b/manager/jsonschema/performer.go similarity index 100% rename from internal/manager/jsonschema/performer.go rename to manager/jsonschema/performer.go diff --git a/internal/manager/jsonschema/scene.go b/manager/jsonschema/scene.go similarity index 100% rename from internal/manager/jsonschema/scene.go rename to manager/jsonschema/scene.go diff --git a/internal/manager/jsonschema/scraped.go b/manager/jsonschema/scraped.go similarity index 100% rename from internal/manager/jsonschema/scraped.go rename to manager/jsonschema/scraped.go diff --git a/internal/manager/jsonschema/studio.go b/manager/jsonschema/studio.go similarity index 100% rename from internal/manager/jsonschema/studio.go rename to manager/jsonschema/studio.go diff --git a/internal/manager/jsonschema/time_rails.go b/manager/jsonschema/time_rails.go similarity index 100% rename from internal/manager/jsonschema/time_rails.go rename to manager/jsonschema/time_rails.go diff --git a/internal/manager/jsonschema/utils.go b/manager/jsonschema/utils.go similarity index 100% rename from internal/manager/jsonschema/utils.go rename to manager/jsonschema/utils.go diff --git a/internal/manager/manager.go b/manager/manager.go similarity index 93% rename from internal/manager/manager.go rename to manager/manager.go index 4518c0d05..45093af7c 100644 --- a/internal/manager/manager.go +++ b/manager/manager.go @@ -2,8 +2,8 @@ package manager import ( "github.com/bmatcuk/doublestar" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/manager/paths" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/manager/paths" "path/filepath" "sync" ) diff --git a/internal/manager/paths/paths.go b/manager/paths/paths.go similarity index 91% rename from internal/manager/paths/paths.go rename to manager/paths/paths.go index b9096d301..7383da75a 100644 --- a/internal/manager/paths/paths.go +++ b/manager/paths/paths.go @@ -1,8 +1,8 @@ package paths import ( - "github.com/stashapp/stash/internal/manager/jsonschema" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/manager/jsonschema" + "github.com/stashapp/stash/utils" "os" "os/user" "path/filepath" diff --git a/internal/manager/paths/paths_fixed.go b/manager/paths/paths_fixed.go similarity index 97% rename from internal/manager/paths/paths_fixed.go rename to manager/paths/paths_fixed.go index 56d920045..011a8bf66 100644 --- a/internal/manager/paths/paths_fixed.go +++ b/manager/paths/paths_fixed.go @@ -2,7 +2,7 @@ package paths import ( "fmt" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/utils" "path/filepath" "runtime" "strings" diff --git a/internal/manager/paths/paths_gallery.go b/manager/paths/paths_gallery.go similarity index 89% rename from internal/manager/paths/paths_gallery.go rename to manager/paths/paths_gallery.go index 2044e4028..19dada4c2 100644 --- a/internal/manager/paths/paths_gallery.go +++ b/manager/paths/paths_gallery.go @@ -1,7 +1,7 @@ package paths import ( - "github.com/stashapp/stash/internal/manager/jsonschema" + "github.com/stashapp/stash/manager/jsonschema" "path/filepath" ) diff --git a/internal/manager/paths/paths_generated.go b/manager/paths/paths_generated.go similarity index 95% rename from internal/manager/paths/paths_generated.go rename to manager/paths/paths_generated.go index 232c0de0e..7c252e1fb 100644 --- a/internal/manager/paths/paths_generated.go +++ b/manager/paths/paths_generated.go @@ -1,7 +1,7 @@ package paths import ( - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/utils" "path/filepath" ) diff --git a/internal/manager/paths/paths_json.go b/manager/paths/paths_json.go similarity index 96% rename from internal/manager/paths/paths_json.go rename to manager/paths/paths_json.go index f4eff4b4b..2841265a3 100644 --- a/internal/manager/paths/paths_json.go +++ b/manager/paths/paths_json.go @@ -1,7 +1,7 @@ package paths import ( - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/utils" "path/filepath" ) diff --git a/internal/manager/paths/paths_scene_markers.go b/manager/paths/paths_scene_markers.go similarity index 100% rename from internal/manager/paths/paths_scene_markers.go rename to manager/paths/paths_scene_markers.go diff --git a/internal/manager/paths/paths_scenes.go b/manager/paths/paths_scenes.go similarity index 96% rename from internal/manager/paths/paths_scenes.go rename to manager/paths/paths_scenes.go index 629d4dbf3..d3211a832 100644 --- a/internal/manager/paths/paths_scenes.go +++ b/manager/paths/paths_scenes.go @@ -1,7 +1,7 @@ package paths import ( - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/utils" "path/filepath" ) diff --git a/internal/manager/task.go b/manager/task.go similarity index 100% rename from internal/manager/task.go rename to manager/task.go diff --git a/internal/manager/task_export.go b/manager/task_export.go similarity index 98% rename from internal/manager/task_export.go rename to manager/task_export.go index 0d8fb54e7..b4d6f2ee7 100644 --- a/internal/manager/task_export.go +++ b/manager/task_export.go @@ -3,11 +3,11 @@ package manager import ( "context" "fmt" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/manager/jsonschema" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/manager/jsonschema" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/utils" "math" "strconv" "sync" diff --git a/internal/manager/task_import.go b/manager/task_import.go similarity index 98% rename from internal/manager/task_import.go rename to manager/task_import.go index e354bc2a2..97ff0b81c 100644 --- a/internal/manager/task_import.go +++ b/manager/task_import.go @@ -4,11 +4,11 @@ import ( "context" "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/manager/jsonschema" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/manager/jsonschema" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/utils" "strconv" "sync" "time" diff --git a/internal/manager/task_scan.go b/manager/task_scan.go similarity index 95% rename from internal/manager/task_scan.go rename to manager/task_scan.go index 262de667b..7d588a5d0 100644 --- a/internal/manager/task_scan.go +++ b/manager/task_scan.go @@ -3,11 +3,11 @@ package manager import ( "context" "database/sql" - "github.com/stashapp/stash/internal/database" - "github.com/stashapp/stash/internal/ffmpeg" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/models" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/database" + "github.com/stashapp/stash/ffmpeg" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/models" + "github.com/stashapp/stash/utils" "path/filepath" "strconv" "sync" diff --git a/internal/manager/utils.go b/manager/utils.go similarity index 90% rename from internal/manager/utils.go rename to manager/utils.go index c3e65e840..61cac3829 100644 --- a/internal/manager/utils.go +++ b/manager/utils.go @@ -1,6 +1,6 @@ package manager -import "github.com/stashapp/stash/internal/utils" +import "github.com/stashapp/stash/utils" func IsStreamable(videoPath string, checksum string) (bool, error) { fileType, err := utils.FileType(videoPath) diff --git a/internal/models/extension_find_filter.go b/models/extension_find_filter.go similarity index 100% rename from internal/models/extension_find_filter.go rename to models/extension_find_filter.go diff --git a/internal/models/generated_exec.go b/models/generated_exec.go similarity index 100% rename from internal/models/generated_exec.go rename to models/generated_exec.go diff --git a/internal/models/generated_models.go b/models/generated_models.go similarity index 100% rename from internal/models/generated_models.go rename to models/generated_models.go diff --git a/internal/models/model_gallery.go b/models/model_gallery.go similarity index 94% rename from internal/models/model_gallery.go rename to models/model_gallery.go index d939515e0..13012485d 100644 --- a/internal/models/model_gallery.go +++ b/models/model_gallery.go @@ -5,9 +5,9 @@ import ( "bytes" "database/sql" "github.com/disintegration/imaging" - "github.com/stashapp/stash/internal/api/urlbuilders" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/utils" + "github.com/stashapp/stash/api/urlbuilders" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/utils" "image" "image/jpeg" "io/ioutil" diff --git a/internal/models/model_joins.go b/models/model_joins.go similarity index 100% rename from internal/models/model_joins.go rename to models/model_joins.go diff --git a/internal/models/model_performer.go b/models/model_performer.go similarity index 100% rename from internal/models/model_performer.go rename to models/model_performer.go diff --git a/internal/models/model_scene.go b/models/model_scene.go similarity index 100% rename from internal/models/model_scene.go rename to models/model_scene.go diff --git a/internal/models/model_scene_marker.go b/models/model_scene_marker.go similarity index 100% rename from internal/models/model_scene_marker.go rename to models/model_scene_marker.go diff --git a/internal/models/model_scraped_item.go b/models/model_scraped_item.go similarity index 100% rename from internal/models/model_scraped_item.go rename to models/model_scraped_item.go diff --git a/internal/models/model_studio.go b/models/model_studio.go similarity index 100% rename from internal/models/model_studio.go rename to models/model_studio.go diff --git a/internal/models/model_tag.go b/models/model_tag.go similarity index 100% rename from internal/models/model_tag.go rename to models/model_tag.go diff --git a/internal/models/querybuilder_gallery.go b/models/querybuilder_gallery.go similarity index 98% rename from internal/models/querybuilder_gallery.go rename to models/querybuilder_gallery.go index 3237280c1..41c84dc90 100644 --- a/internal/models/querybuilder_gallery.go +++ b/models/querybuilder_gallery.go @@ -3,7 +3,7 @@ package models import ( "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" "path/filepath" ) diff --git a/internal/models/querybuilder_joins.go b/models/querybuilder_joins.go similarity index 100% rename from internal/models/querybuilder_joins.go rename to models/querybuilder_joins.go diff --git a/internal/models/querybuilder_performer.go b/models/querybuilder_performer.go similarity index 99% rename from internal/models/querybuilder_performer.go rename to models/querybuilder_performer.go index 26f7e3b4c..1463b0b50 100644 --- a/internal/models/querybuilder_performer.go +++ b/models/querybuilder_performer.go @@ -3,7 +3,7 @@ package models import ( "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" ) type performerQueryBuilder struct {} diff --git a/internal/models/querybuilder_scene.go b/models/querybuilder_scene.go similarity index 99% rename from internal/models/querybuilder_scene.go rename to models/querybuilder_scene.go index 595f29fb9..df07242aa 100644 --- a/internal/models/querybuilder_scene.go +++ b/models/querybuilder_scene.go @@ -3,7 +3,7 @@ package models import ( "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" "strconv" "strings" ) diff --git a/internal/models/querybuilder_scene_marker.go b/models/querybuilder_scene_marker.go similarity index 99% rename from internal/models/querybuilder_scene_marker.go rename to models/querybuilder_scene_marker.go index ff6b9d2fc..8439dd494 100644 --- a/internal/models/querybuilder_scene_marker.go +++ b/models/querybuilder_scene_marker.go @@ -3,7 +3,7 @@ package models import ( "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" "strconv" ) diff --git a/internal/models/querybuilder_scraped_item.go b/models/querybuilder_scraped_item.go similarity index 98% rename from internal/models/querybuilder_scraped_item.go rename to models/querybuilder_scraped_item.go index 215b53134..535c71f78 100644 --- a/internal/models/querybuilder_scraped_item.go +++ b/models/querybuilder_scraped_item.go @@ -3,7 +3,7 @@ package models import ( "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" ) type scrapedItemQueryBuilder struct{} diff --git a/internal/models/querybuilder_sql.go b/models/querybuilder_sql.go similarity index 99% rename from internal/models/querybuilder_sql.go rename to models/querybuilder_sql.go index 9132783ef..1f1bf640c 100644 --- a/internal/models/querybuilder_sql.go +++ b/models/querybuilder_sql.go @@ -4,7 +4,7 @@ import ( "database/sql" "fmt" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" "reflect" "strconv" "strings" diff --git a/internal/models/querybuilder_studio.go b/models/querybuilder_studio.go similarity index 98% rename from internal/models/querybuilder_studio.go rename to models/querybuilder_studio.go index 7637cc3ce..c16ad7349 100644 --- a/internal/models/querybuilder_studio.go +++ b/models/querybuilder_studio.go @@ -3,7 +3,7 @@ package models import ( "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" ) type studioQueryBuilder struct {} diff --git a/internal/models/querybuilder_tag.go b/models/querybuilder_tag.go similarity index 98% rename from internal/models/querybuilder_tag.go rename to models/querybuilder_tag.go index 69f28ce6b..02b93ca1a 100644 --- a/internal/models/querybuilder_tag.go +++ b/models/querybuilder_tag.go @@ -3,7 +3,7 @@ package models import ( "database/sql" "github.com/jmoiron/sqlx" - "github.com/stashapp/stash/internal/database" + "github.com/stashapp/stash/database" ) type tagQueryBuilder struct {} diff --git a/internal/models/sqlite_timestamp.go b/models/sqlite_timestamp.go similarity index 100% rename from internal/models/sqlite_timestamp.go rename to models/sqlite_timestamp.go diff --git a/internal/scraper/freeones.go b/scraper/freeones.go similarity index 98% rename from internal/scraper/freeones.go rename to scraper/freeones.go index b82d93a1b..3376bab03 100644 --- a/internal/scraper/freeones.go +++ b/scraper/freeones.go @@ -3,8 +3,8 @@ package scraper import ( "fmt" "github.com/PuerkitoBio/goquery" - "github.com/stashapp/stash/internal/logger" - "github.com/stashapp/stash/internal/models" + "github.com/stashapp/stash/logger" + "github.com/stashapp/stash/models" "net/http" "net/url" "regexp" diff --git a/internal/utils/crypto.go b/utils/crypto.go similarity index 100% rename from internal/utils/crypto.go rename to utils/crypto.go diff --git a/internal/utils/date.go b/utils/date.go similarity index 100% rename from internal/utils/date.go rename to utils/date.go diff --git a/internal/utils/file.go b/utils/file.go similarity index 100% rename from internal/utils/file.go rename to utils/file.go diff --git a/internal/utils/image.go b/utils/image.go similarity index 100% rename from internal/utils/image.go rename to utils/image.go diff --git a/internal/utils/natural_sort.go b/utils/natural_sort.go similarity index 100% rename from internal/utils/natural_sort.go rename to utils/natural_sort.go diff --git a/internal/utils/string_collections.go b/utils/string_collections.go similarity index 100% rename from internal/utils/string_collections.go rename to utils/string_collections.go diff --git a/internal/utils/vtt.go b/utils/vtt.go similarity index 100% rename from internal/utils/vtt.go rename to utils/vtt.go