-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add framework schema interface (#668)
- Loading branch information
1 parent
a02c48f
commit 7a344fd
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package fwxschema | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-framework/internal/fwschema" | ||
"github.com/hashicorp/terraform-plugin-framework/resource/schema/defaults" | ||
) | ||
|
||
// AttributeWithBoolDefaultValue is an optional interface on Attribute which | ||
// enables Bool default value support. | ||
type AttributeWithBoolDefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.Bool | ||
} | ||
|
||
// AttributeWithFloat64DefaultValue is an optional interface on Attribute which | ||
// enables Float64 default value support. | ||
type AttributeWithFloat64DefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.Float64 | ||
} | ||
|
||
// AttributeWithInt64DefaultValue is an optional interface on Attribute which | ||
// enables Int64 default value support. | ||
type AttributeWithInt64DefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.Int64 | ||
} | ||
|
||
// AttributeWithListDefaultValue is an optional interface on Attribute which | ||
// enables List default value support. | ||
type AttributeWithListDefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.List | ||
} | ||
|
||
// AttributeWithMapDefaultValue is an optional interface on Attribute which | ||
// enables Map default value support. | ||
type AttributeWithMapDefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.Map | ||
} | ||
|
||
// AttributeWithNumberDefaultValue is an optional interface on Attribute which | ||
// enables Number default value support. | ||
type AttributeWithNumberDefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.Number | ||
} | ||
|
||
// AttributeWithObjectDefaultValue is an optional interface on Attribute which | ||
// enables Object default value support. | ||
type AttributeWithObjectDefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.Object | ||
} | ||
|
||
// AttributeWithSetDefaultValue is an optional interface on Attribute which | ||
// enables Set default value support. | ||
type AttributeWithSetDefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.Set | ||
} | ||
|
||
// AttributeWithStringDefaultValue is an optional interface on Attribute which | ||
// enables String default value support. | ||
type AttributeWithStringDefaultValue interface { | ||
fwschema.Attribute | ||
|
||
DefaultValue() defaults.String | ||
} |