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-11-24 13:29:53 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-24 13:29:53 +0300
commit5ffd39e41866614de47ff427d3156062a6879e1c (patch)
tree7c4b031596057329ca5dc3b7a406d2b631a11c7d /internal/source/domains.go
parentbc61f03703dffb79c3d9d887385b968315362caa (diff)
Respond with 502 if a domain can not be retrieved from a source
Diffstat (limited to 'internal/source/domains.go')
-rw-r--r--internal/source/domains.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/source/domains.go b/internal/source/domains.go
index 92bab663..f9dadef8 100644
--- a/internal/source/domains.go
+++ b/internal/source/domains.go
@@ -34,16 +34,10 @@ func NewDomains() *Domains {
// sources here because it allows us to switch behavior and the domain source
// for some subset of domains, to test / PoC the new GitLab Domains Source that
// we plan to use to replace the disk source.
-func (d *Domains) GetDomain(name string) *domain.Domain {
+func (d *Domains) GetDomain(name string) (*domain.Domain, error) {
return d.source(name).GetDomain(name)
}
-// HasDomain checks if domain exists. It is using new and the legacy domains
-// source.
-func (d *Domains) HasDomain(name string) bool {
- return d.source(name).HasDomain(name)
-}
-
// Start starts the disk domain source. It is DEPRECATED, because we want to
// remove it entirely when disk source gets removed.
func (d *Domains) Read(rootDomain string) {