/
catalog.go
35 lines (31 loc) · 1.23 KB
/
catalog.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package fakeservercatalog
import (
"github.com/spiffe/spire/pkg/server/datastore"
"github.com/spiffe/spire/pkg/server/plugin/bundlepublisher"
"github.com/spiffe/spire/pkg/server/plugin/credentialcomposer"
"github.com/spiffe/spire/pkg/server/plugin/keymanager"
"github.com/spiffe/spire/pkg/server/plugin/nodeattestor"
"github.com/spiffe/spire/pkg/server/plugin/notifier"
"github.com/spiffe/spire/pkg/server/plugin/upstreamauthority"
)
func New() *Catalog {
return new(Catalog)
}
type Catalog struct {
bundlePublisherRepository
credentialComposerRepository
dataStoreRepository
keyManagerRepository
nodeAttestorRepository
notifierRepository
upstreamAuthorityRepository
}
// We need distinct type names to embed in the Catalog above, since the types
// we want to actually embed are all named the same.
type bundlePublisherRepository struct{ bundlepublisher.Repository }
type credentialComposerRepository struct{ credentialcomposer.Repository }
type dataStoreRepository struct{ datastore.Repository }
type keyManagerRepository struct{ keymanager.Repository }
type nodeAttestorRepository struct{ nodeattestor.Repository }
type notifierRepository struct{ notifier.Repository }
type upstreamAuthorityRepository struct{ upstreamauthority.Repository }