Skip to content

Commit

Permalink
#81 replace simpleDoguName with the one from the lib
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-dammeier committed Oct 7, 2024
1 parent f088bec commit 1833746
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/adapter/config/kubernetes/doguConfigRepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func NewDoguConfigRepository(repo repository.DoguConfigRepository) *DoguConfigRe

func (e DoguConfigRepository) Get(ctx context.Context, doguName common.SimpleDoguName) (config.DoguConfig, error) {
// TODO: There seems to be no way to know, if we have a NotFoundError or a connection error.
return e.repo.Get(ctx, config.SimpleDoguName(doguName))
return e.repo.Get(ctx, doguName)
}

func (e DoguConfigRepository) Update(ctx context.Context, entry config.DoguConfig) (config.DoguConfig, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func NewSensitiveDoguConfigRepository(repo repository.DoguConfigRepository) *Sen

func (e SensitiveDoguConfigRepository) Get(ctx context.Context, doguName common.SimpleDoguName) (config.DoguConfig, error) {
// TODO: There seems to be no way to know, if we have a NotFoundError or a connection error.
return e.repo.Get(ctx, config.SimpleDoguName(doguName))
return e.repo.Get(ctx, doguName)
}

func (e SensitiveDoguConfigRepository) Update(ctx context.Context, entry config.DoguConfig) (config.DoguConfig, error) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/domain/common/doguName.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package common
import (
"errors"
"fmt"
"github.com/cloudogu/k8s-registry-lib/config"
"strings"
)

Expand All @@ -12,7 +13,7 @@ type QualifiedDoguName struct {
}

type DoguNamespace string
type SimpleDoguName string
type SimpleDoguName = config.SimpleDoguName

func NewQualifiedDoguName(namespace DoguNamespace, simpleName SimpleDoguName) (QualifiedDoguName, error) {
doguName := QualifiedDoguName{Namespace: namespace, SimpleName: simpleName}
Expand Down

0 comments on commit 1833746

Please sign in to comment.