// CreateTransformator creates a new Transformator ready to run transformation handlers
CreateTransformator creates a new Transformator ready to run transformation handlers
// CreateTransformator creates a new Transformator ready to run transformation handlers
func CreateTransformator(spec *akvs.AzureKeyVaultOutput) (*Transformator, error) {
	var transforms []TransformationHandler
	if spec == nil {
		return &Transformator{
			transHandlers: transforms,
		}, nil
	}
	for _, transform := range spec.Transforms {
		switch transform {
		case "trim":
			transforms = append(transforms, &TrimHandler{})
		case "base64encode":
			transforms = append(transforms, &Base64EncodeHandler{})
		case "base64decode":
			transforms = append(transforms, &Base64DecodeHandler{})
		default:
			return nil, fmt.Errorf("transform type '%s' not currently supported", transform)
		}
	}
	return &Transformator{
		transHandlers: transforms,
	}, nil
}
func CreateTransformator ( spec * akvs . AzureKeyVaultOutput ) ( * Transformator , error ) { var transforms [ ] TransformationHandler if spec == nil { return & Transformator { transHandlers : transforms , } , nil } for _ , transform := range spec . Transforms { switch transform { case " " : transforms = append ( transforms , & TrimHandler { } ) case " " : transforms = append ( transforms , & Base64EncodeHandler { } ) case " " : transforms = append ( transforms , & Base64DecodeHandler { } ) default : return nil , fmt . Errorf ( " " , transform ) } } return & Transformator { transHandlers : transforms , } , nil }
CreateTransformator creates a new Transformator ready to run transformation handlers
CreateTransformator creates a new Transformator ready to run transformation handlers