Update SDK dependencies (#100)

* Update dependencies

* Fix tests

* Fix field assignment

* Update field assignment

* Remove unused functions

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
Henrique Santos 2023-10-24 14:54:04 +01:00 committed by GitHub
parent 9937717104
commit c3618f2b63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 249 additions and 224 deletions

View file

@ -9,22 +9,6 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
)
func ToPtrInt32(source types.Int64) *int32 {
if source.IsNull() || source.IsUnknown() {
return nil
}
ttlInt64 := source.ValueInt64()
ttlInt32 := int32(ttlInt64)
return &ttlInt32
}
func ToTypeInt64(i *int32) types.Int64 {
if i == nil {
return types.Int64PointerValue(nil)
}
return types.Int64Value(int64(*i))
}
func ToString(ctx context.Context, v attr.Value) (string, error) {
if t := v.Type(ctx); t != types.StringType {
return "", fmt.Errorf("type mismatch. expected 'types.StringType' but got '%s'", t.String())