Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-10-11 11:15:23 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-23 17:06:40 +0300
commit23c07620ed3366180819fe56c4d2ca23e5fd3e2c (patch)
tree9a907a2129755087bddc9e7cab06c8b4ab476c3e /internal/source/domains.go
parentbabdf5ea9aae2bff2267c5047b2714e00649fd11 (diff)
Make it possible to switch source for some domains
Diffstat (limited to 'internal/source/domains.go')
-rw-r--r--internal/source/domains.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/source/domains.go b/internal/source/domains.go
index eadf25c4..df375883 100644
--- a/internal/source/domains.go
+++ b/internal/source/domains.go
@@ -1,6 +1,7 @@
package source
import (
+ "gitlab.com/gitlab-org/gitlab-pages/internal/domain"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/disk"
)
@@ -18,3 +19,10 @@ func NewDomains() *Domains {
Source: disk.New(),
}
}
+
+// GetDomain overridden here allows us to switch behavior and the domains
+// source for some subset of domains, to test / PoC the new GitLab Domains
+// Source that we plan to introduce
+func (d *Domains) GetDomain(name string) *domain.Domain {
+ return d.Source.GetDomain(name)
+}