forked from spiffe/spire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugins.go
56 lines (46 loc) · 1.31 KB
/
plugins.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package catalog
import (
common "github.com/spiffe/spire/pkg/common/catalog"
"github.com/spiffe/spire/proto/agent/keymanager"
"github.com/spiffe/spire/proto/agent/nodeattestor"
"github.com/spiffe/spire/proto/agent/workloadattestor"
)
type ManagedKeyManager struct {
config common.PluginConfig
keymanager.KeyManager
}
func NewManagedKeyManager(p keymanager.KeyManager, config common.PluginConfig) *ManagedKeyManager {
return &ManagedKeyManager{
config: config,
KeyManager: p,
}
}
func (p *ManagedKeyManager) Config() common.PluginConfig {
return p.config
}
type ManagedNodeAttestor struct {
config common.PluginConfig
nodeattestor.NodeAttestor
}
func NewManagedNodeAttestor(p nodeattestor.NodeAttestor, config common.PluginConfig) *ManagedNodeAttestor {
return &ManagedNodeAttestor{
config: config,
NodeAttestor: p,
}
}
func (p *ManagedNodeAttestor) Config() common.PluginConfig {
return p.config
}
type ManagedWorkloadAttestor struct {
config common.PluginConfig
workloadattestor.WorkloadAttestor
}
func NewManagedWorkloadAttestor(p workloadattestor.WorkloadAttestor, config common.PluginConfig) *ManagedWorkloadAttestor {
return &ManagedWorkloadAttestor{
config: config,
WorkloadAttestor: p,
}
}
func (p *ManagedWorkloadAttestor) Config() common.PluginConfig {
return p.config
}