Documentation
¶
Index ¶
- Constants
- Variables
- type PluginProviderTransformer
- func (v PluginProviderTransformer) GetRegion(ctx context.Context, key cmkapi.Key) (string, error)
- func (v PluginProviderTransformer) SerializeKeyAccessData(ctx context.Context, keyAccessDetails *cmkapi.KeyAccessDetails) (*SerializedKeyAccessData, error)
- func (v PluginProviderTransformer) ValidateAPI(ctx context.Context, k cmkapi.Key) error
- func (v PluginProviderTransformer) ValidateKeyAccessData(ctx context.Context, accessDetails *cmkapi.KeyAccessDetails) error
- type ProviderTransformer
- type SerializedKeyAccessData
Constants ¶
View Source
const (
GRPCErrorCodeInvalidAccessData errs.GRPCErrorCode = "INVALID_ACCESS_DATA"
)
Variables ¶
View Source
var ( ErrValidateKey = errors.New("failed to validate key") ErrSerializeKeyAccessData = errors.New("failed to serialize key access data") ErrExtractKeyRegion = errors.New("failed to extract key region from provider") ErrGRPCInvalidAccessData = errs.GRPCError{ Code: GRPCErrorCodeInvalidAccessData, BaseMessage: "failed to validate access data for the keystore provider", } )
Functions ¶
This section is empty.
Types ¶
type PluginProviderTransformer ¶
type PluginProviderTransformer struct {
// contains filtered or unexported fields
}
func NewPluginProviderTransformer ¶
func NewPluginProviderTransformer(pluginCatalog *catalog.Catalog, provider string) (*PluginProviderTransformer, error)
func (PluginProviderTransformer) SerializeKeyAccessData ¶
func (v PluginProviderTransformer) SerializeKeyAccessData( ctx context.Context, keyAccessDetails *cmkapi.KeyAccessDetails, ) (*SerializedKeyAccessData, error)
func (PluginProviderTransformer) ValidateAPI ¶
func (PluginProviderTransformer) ValidateKeyAccessData ¶
func (v PluginProviderTransformer) ValidateKeyAccessData( ctx context.Context, accessDetails *cmkapi.KeyAccessDetails, ) error
type ProviderTransformer ¶
type ProviderTransformer interface {
// ValidateAPI validates the key received from API requests against the provider's requirements.
ValidateAPI(ctx context.Context, k cmkapi.Key) error
ValidateKeyAccessData(ctx context.Context, k *cmkapi.KeyAccessDetails) error
// SerializeKeyAccessData serializes the key access details into a format suitable for the provider.
SerializeKeyAccessData(ctx context.Context, k *cmkapi.KeyAccessDetails) (*SerializedKeyAccessData, error)
// GetRegion retrieves the region information for the given provider.
GetRegion(ctx context.Context, k cmkapi.Key) (string, error)
}
type SerializedKeyAccessData ¶
Click to show internal directories.
Click to hide internal directories.