diff --git a/main.go b/cmd/hardlink/main.go similarity index 91% rename from main.go rename to cmd/hardlink/main.go index 09c39ec..1db4956 100644 --- a/main.go +++ b/cmd/hardlink/main.go @@ -16,20 +16,20 @@ import ( log "github.com/sirupsen/logrus" - "gitea.futuresens.co.uk/futuresens/hardlink/bootstrap" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/bootstrap" "gitea.futuresens.co.uk/futuresens/hardlink/config" - "gitea.futuresens.co.uk/futuresens/hardlink/dispenser" - "gitea.futuresens.co.uk/futuresens/hardlink/errorhandlers" - "gitea.futuresens.co.uk/futuresens/hardlink/handlers" - "gitea.futuresens.co.uk/futuresens/hardlink/lockserver" - "gitea.futuresens.co.uk/futuresens/hardlink/logging" - "gitea.futuresens.co.uk/futuresens/hardlink/mail" - "gitea.futuresens.co.uk/futuresens/hardlink/payment" - "gitea.futuresens.co.uk/futuresens/hardlink/printer" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/dispenser" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/errorhandlers" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/handlers" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/lockserver" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/logging" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/mail" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/payment" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/printer" ) const ( - buildVersion = "1.2.7" + buildVersion = "1.2.8" serviceName = "hardlink" pollingFrequency = 8 * time.Second ) diff --git a/config/config.go b/config/config.go index fe934c7..8405b2f 100644 --- a/config/config.go +++ b/config/config.go @@ -5,7 +5,7 @@ import ( "os" "strings" - "gitea.futuresens.co.uk/futuresens/hardlink/errorhandlers" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/errorhandlers" log "github.com/sirupsen/logrus" yaml "gopkg.in/yaml.v3" ) diff --git a/hardlink-preauth-release/main.go b/hardlink-preauth-release/main.go index 4570e5c..97f73b2 100644 --- a/hardlink-preauth-release/main.go +++ b/hardlink-preauth-release/main.go @@ -6,10 +6,10 @@ import ( "os" "time" - "gitea.futuresens.co.uk/futuresens/hardlink/bootstrap" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/bootstrap" "gitea.futuresens.co.uk/futuresens/hardlink/config" - "gitea.futuresens.co.uk/futuresens/hardlink/logging" - "gitea.futuresens.co.uk/futuresens/hardlink/payment" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/logging" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/payment" log "github.com/sirupsen/logrus" ) diff --git a/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go similarity index 82% rename from bootstrap/bootstrap.go rename to internal/bootstrap/bootstrap.go index 124ce80..bdd42fe 100644 --- a/bootstrap/bootstrap.go +++ b/internal/bootstrap/bootstrap.go @@ -5,7 +5,7 @@ import ( "database/sql" "gitea.futuresens.co.uk/futuresens/hardlink/config" - "gitea.futuresens.co.uk/futuresens/hardlink/db" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/db" ) func OpenDB(cfg *config.ConfigRec) (*sql.DB, error) { diff --git a/db/db.go b/internal/db/db.go similarity index 99% rename from db/db.go rename to internal/db/db.go index 783c3fe..07db3b7 100644 --- a/db/db.go +++ b/internal/db/db.go @@ -12,7 +12,7 @@ import ( mssqldb "github.com/denisenkom/go-mssqldb" // for error inspection log "github.com/sirupsen/logrus" - "gitea.futuresens.co.uk/futuresens/hardlink/types" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/types" ) // InitMSSQL opens and pings the SQL Server instance (keeps your original behaviour) diff --git a/dispenser/dispenser.go b/internal/dispenser/dispenser.go similarity index 100% rename from dispenser/dispenser.go rename to internal/dispenser/dispenser.go diff --git a/dispenser/dispenserclient.go b/internal/dispenser/dispenserclient.go similarity index 100% rename from dispenser/dispenserclient.go rename to internal/dispenser/dispenserclient.go diff --git a/errorhandlers/errorhandlers.go b/internal/errorhandlers/errorhandlers.go similarity index 100% rename from errorhandlers/errorhandlers.go rename to internal/errorhandlers/errorhandlers.go diff --git a/handlers/db_helpers.go b/internal/handlers/db_helpers.go similarity index 98% rename from handlers/db_helpers.go rename to internal/handlers/db_helpers.go index 6951a0f..57e7273 100644 --- a/handlers/db_helpers.go +++ b/internal/handlers/db_helpers.go @@ -10,7 +10,7 @@ import ( "path/filepath" "time" - "gitea.futuresens.co.uk/futuresens/hardlink/db" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/db" log "github.com/sirupsen/logrus" ) diff --git a/handlers/handlers.go b/internal/handlers/handlers.go similarity index 97% rename from handlers/handlers.go rename to internal/handlers/handlers.go index d0a175d..7247a2a 100644 --- a/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -13,13 +13,13 @@ import ( "gitea.futuresens.co.uk/futuresens/cmstypes" "gitea.futuresens.co.uk/futuresens/hardlink/config" - "gitea.futuresens.co.uk/futuresens/hardlink/dispenser" - "gitea.futuresens.co.uk/futuresens/hardlink/errorhandlers" - "gitea.futuresens.co.uk/futuresens/hardlink/lockserver" - "gitea.futuresens.co.uk/futuresens/hardlink/mail" - "gitea.futuresens.co.uk/futuresens/hardlink/payment" - "gitea.futuresens.co.uk/futuresens/hardlink/printer" - "gitea.futuresens.co.uk/futuresens/hardlink/types" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/dispenser" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/errorhandlers" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/lockserver" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/mail" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/payment" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/printer" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/types" "gitea.futuresens.co.uk/futuresens/logging" log "github.com/sirupsen/logrus" ) diff --git a/handlers/http_helpers.go b/internal/handlers/http_helpers.go similarity index 92% rename from handlers/http_helpers.go rename to internal/handlers/http_helpers.go index 7c8477b..0eeb10f 100644 --- a/handlers/http_helpers.go +++ b/internal/handlers/http_helpers.go @@ -9,8 +9,8 @@ import ( "time" "gitea.futuresens.co.uk/futuresens/cmstypes" - "gitea.futuresens.co.uk/futuresens/hardlink/payment" - "gitea.futuresens.co.uk/futuresens/hardlink/types" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/payment" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/types" "gitea.futuresens.co.uk/futuresens/logging" log "github.com/sirupsen/logrus" ) diff --git a/handlers/testhandlers.go b/internal/handlers/testhandlers.go similarity index 95% rename from handlers/testhandlers.go rename to internal/handlers/testhandlers.go index 17767f7..92b221c 100644 --- a/handlers/testhandlers.go +++ b/internal/handlers/testhandlers.go @@ -9,11 +9,11 @@ import ( "time" "gitea.futuresens.co.uk/futuresens/cmstypes" - "gitea.futuresens.co.uk/futuresens/hardlink/errorhandlers" - "gitea.futuresens.co.uk/futuresens/hardlink/lockserver" - "gitea.futuresens.co.uk/futuresens/hardlink/mail" - "gitea.futuresens.co.uk/futuresens/hardlink/payment" - "gitea.futuresens.co.uk/futuresens/hardlink/types" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/errorhandlers" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/lockserver" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/mail" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/payment" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/types" "gitea.futuresens.co.uk/futuresens/logging" log "github.com/sirupsen/logrus" ) diff --git a/lockserver/assalockserver.go b/internal/lockserver/assalockserver.go similarity index 100% rename from lockserver/assalockserver.go rename to internal/lockserver/assalockserver.go diff --git a/lockserver/lockservercommon.go b/internal/lockserver/lockservercommon.go similarity index 100% rename from lockserver/lockservercommon.go rename to internal/lockserver/lockservercommon.go diff --git a/lockserver/omnilockserver.go b/internal/lockserver/omnilockserver.go similarity index 100% rename from lockserver/omnilockserver.go rename to internal/lockserver/omnilockserver.go diff --git a/lockserver/saltolockserver.go b/internal/lockserver/saltolockserver.go similarity index 100% rename from lockserver/saltolockserver.go rename to internal/lockserver/saltolockserver.go diff --git a/lockserver/tljlockserver.go b/internal/lockserver/tljlockserver.go similarity index 100% rename from lockserver/tljlockserver.go rename to internal/lockserver/tljlockserver.go diff --git a/logging/logging.go b/internal/logging/logging.go similarity index 100% rename from logging/logging.go rename to internal/logging/logging.go diff --git a/mail/mail.go b/internal/mail/mail.go similarity index 100% rename from mail/mail.go rename to internal/mail/mail.go diff --git a/mail/mail_test.go b/internal/mail/mail_test.go similarity index 100% rename from mail/mail_test.go rename to internal/mail/mail_test.go diff --git a/payment/chipdnastatus.go b/internal/payment/chipdnastatus.go similarity index 99% rename from payment/chipdnastatus.go rename to internal/payment/chipdnastatus.go index dfc4246..ae4d9ae 100644 --- a/payment/chipdnastatus.go +++ b/internal/payment/chipdnastatus.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "gitea.futuresens.co.uk/futuresens/hardlink/types" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/types" "gitea.futuresens.co.uk/futuresens/logging" ) diff --git a/payment/creditcall.go b/internal/payment/creditcall.go similarity index 98% rename from payment/creditcall.go rename to internal/payment/creditcall.go index 05b549c..a77b455 100644 --- a/payment/creditcall.go +++ b/internal/payment/creditcall.go @@ -9,7 +9,7 @@ import ( "strings" "gitea.futuresens.co.uk/futuresens/cmstypes" - "gitea.futuresens.co.uk/futuresens/hardlink/types" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/types" _ "github.com/denisenkom/go-mssqldb" log "github.com/sirupsen/logrus" ) diff --git a/payment/preauthReleaser.go b/internal/payment/preauthReleaser.go similarity index 97% rename from payment/preauthReleaser.go rename to internal/payment/preauthReleaser.go index f77c5c8..5825336 100644 --- a/payment/preauthReleaser.go +++ b/internal/payment/preauthReleaser.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "gitea.futuresens.co.uk/futuresens/hardlink/db" - "gitea.futuresens.co.uk/futuresens/hardlink/types" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/db" + "gitea.futuresens.co.uk/futuresens/hardlink/internal/types" log "github.com/sirupsen/logrus" ) diff --git a/printer/printer.go b/internal/printer/printer.go similarity index 100% rename from printer/printer.go rename to internal/printer/printer.go diff --git a/types/types.go b/internal/types/types.go similarity index 100% rename from types/types.go rename to internal/types/types.go diff --git a/release notes.md b/release notes.md index 3934ad0..0179d4b 100644 --- a/release notes.md +++ b/release notes.md @@ -2,6 +2,9 @@ builtVersion is a const in main.go +#### 1.2.8 - 14 May 2026 +Updated hardlink source layout to use cmd/hardlink for the main application entry point and internal/ for application packages. Runtime files and preauth-release layout remain unchanged. No functional changes. + #### 1.2.7 - 13 May 2026 retrieve CardType from the ChepDNA response