in v3/materials/cryptographic_materials_manager.go [27:42]
func NewCryptographicMaterialsManager(keyring Keyring) (*DefaultCryptographicMaterialsManager, error) {
cmm := &DefaultCryptographicMaterialsManager{
Keyring: &keyring,
}
if keyring != nil {
// Check if the passed in type is a fixture, if not log a warning message to the user
if fixture, ok := keyring.(awsFixture); !ok || !fixture.isAWSFixture() {
log.Default().Println(customTypeWarningMessage)
}
} else {
// keyring MUST NOT be nil
return nil, fmt.Errorf("keyring provided to new cryptographic materials manager MUST NOT be nil")
}
return cmm, nil
}