github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl@v0.2.0/awscryptographymaterialproviderssmithygenerated/CryptographicMaterialsManagerNativeWrapper.go (about)

     1  // Code generated by smithy-go-codegen DO NOT EDIT.
     2  
     3  package awscryptographymaterialproviderssmithygenerated
     4  
     5  import (
     6  	"github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsCryptographyMaterialProvidersTypes"
     7  	"github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygeneratedtypes"
     8  	"github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Wrappers"
     9  )
    10  
    11  type CryptographicMaterialsManagerNativeWrapper struct {
    12  	AwsCryptographyMaterialProvidersTypes.ICryptographicMaterialsManager
    13  	Impl awscryptographymaterialproviderssmithygeneratedtypes.ICryptographicMaterialsManager
    14  }
    15  
    16  func (this *CryptographicMaterialsManagerNativeWrapper) GetEncryptionMaterials(input AwsCryptographyMaterialProvidersTypes.GetEncryptionMaterialsInput) Wrappers.Result {
    17  	var native_request = GetEncryptionMaterialsInput_FromDafny(input)
    18  	var native_response, native_error = this.Impl.GetEncryptionMaterials(native_request)
    19  	if native_error != nil {
    20  		return Wrappers.Companion_Result_.Create_Failure_(Error_ToDafny(native_error))
    21  	}
    22  	return Wrappers.Companion_Result_.Create_Success_(GetEncryptionMaterialsOutput_ToDafny(*native_response))
    23  }
    24  
    25  func (this *CryptographicMaterialsManagerNativeWrapper) DecryptMaterials(input AwsCryptographyMaterialProvidersTypes.DecryptMaterialsInput) Wrappers.Result {
    26  	var native_request = DecryptMaterialsInput_FromDafny(input)
    27  	var native_response, native_error = this.Impl.DecryptMaterials(native_request)
    28  	if native_error != nil {
    29  		return Wrappers.Companion_Result_.Create_Failure_(Error_ToDafny(native_error))
    30  	}
    31  	return Wrappers.Companion_Result_.Create_Success_(DecryptMaterialsOutput_ToDafny(*native_response))
    32  }