* NewService for the project service now returns a non pointer and an error. * Replacing t.Fatal calls with require.NoError calls. * Initialize empty slices following the recommended way. * Don't inline the prefix strings when validating requests. * Check error when cleaning up the test. * Add check that update updates the time. * Use google.golang.org/protobuf where possible instead of github.com/golang/protobuf. * Shorten the validateX function names. * Inline API responses. * Change test cleanup error logging to t.Errorf. * Remove unneeded creation of an extra project. * Inline regex check for invalid id. * Build the pb.Project inline when converting from db to wire proto. * Change stored repos into repo creating functions. * Using iam.TestScopes instead of creating them myself. * Remove out of date comments. * Update name to match go test naming standards. * Adding project service comments. * Using scopeType's new prefix method inside scope.go * Setting test project's name and desc to default to pass tests. * Change host catalog to project in test. * Fixing merge errors. * Fixing some more merge errors. * Fix typo in comments. * Fix typos in project_service.go. * Update error indicating provided id and the expected prefix. * Make the RepoFactory types in a common directory.
12 lines
246 B
Go
12 lines
246 B
Go
package common
|
|
|
|
import (
|
|
"github.com/hashicorp/watchtower/internal/host/static"
|
|
"github.com/hashicorp/watchtower/internal/iam"
|
|
)
|
|
|
|
type (
|
|
IamRepoFactory func() (*iam.Repository, error)
|
|
StaticRepoFactory func() (*static.Repository, error)
|
|
)
|