Create the alias service and resource (#4276)

* Create the alias service and resource

* Add alias generated API files and tests
This commit is contained in:
Todd committed 2024-02-29 15:51:24 -08:00
1 parent e848e76b48
commit 92181e272a
24 files changed
+5814 -50

No files matched your search

+5
View File
@@ -11,6 +11,7 @@ import (
"sync"
"sync/atomic"
target2 "github.com/hashicorp/boundary/internal/alias/target"
"github.com/hashicorp/boundary/internal/auth"
"github.com/hashicorp/boundary/internal/auth/ldap"
"github.com/hashicorp/boundary/internal/auth/oidc"
@@ -150,6 +151,7 @@ type Controller struct {
TargetRepoFn target.RepositoryFactory
WorkerAuthRepoStorageFn common.WorkerAuthRepoStorageFactory
BillingRepoFn common.BillingRepoFactory
TargetAliasRepoFn common.TargetAliasRepoFactory
scheduler *scheduler.Scheduler
@@ -453,6 +455,9 @@ func New(ctx context.Context, conf *Config) (*Controller, error) {
c.BillingRepoFn = func() (*billing.Repository, error) {
return billing.NewRepository(ctx, dbase)
}
c.TargetAliasRepoFn = func() (*target2.Repository, error) {
return target2.NewRepository(ctx, dbase, dbase, c.kms)
}
// Check that credentials are available at startup, to avoid some harmless
// but nasty-looking errors