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:
parent
9937717104
commit
c3618f2b63
35 changed files with 249 additions and 224 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue