From 721f40100592efb7746f7afd54fe323689dd0ebd Mon Sep 17 00:00:00 2001 From: user Date: Mon, 23 Feb 2026 11:46:44 -0800 Subject: [PATCH] refactor: eliminate internal/domain package, colocate types with implementations Move ImageID and ContainerID into internal/docker/types.go (where they're primarily used) and UnparsedURL into internal/service/webhook/types.go. This follows the Go convention of defining types alongside the code that uses them rather than in a separate 'domain' package. --- internal/docker/types.go | 7 +++++++ internal/service/webhook/types.go | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 internal/docker/types.go create mode 100644 internal/service/webhook/types.go diff --git a/internal/docker/types.go b/internal/docker/types.go new file mode 100644 index 0000000..178035e --- /dev/null +++ b/internal/docker/types.go @@ -0,0 +1,7 @@ +package docker + +// ImageID is a Docker image identifier (ID or tag). +type ImageID string + +// ContainerID is a Docker container identifier. +type ContainerID string diff --git a/internal/service/webhook/types.go b/internal/service/webhook/types.go new file mode 100644 index 0000000..69ce0d5 --- /dev/null +++ b/internal/service/webhook/types.go @@ -0,0 +1,7 @@ +package webhook + +// UnparsedURL is a URL stored as a plain string without parsing. +// Use this instead of string when the value is known to be a URL +// but should not be parsed into a net/url.URL (e.g. webhook URLs, +// compare URLs from external payloads). +type UnparsedURL string