Documentation
¶
Index ¶
- func CastInt(v any) int
- func CastInt64(v any) int64
- func Dedent(s string) string
- func FormatID[T ~int | ~int64](v T) string
- func InvalidImportID(expected string, id string) diag.Diagnostic
- func MarkdownDescription(s string) string
- func ParseID(v string) (int64, error)
- func SetSchemaFromAttributes(d *schema.ResourceData, attrs map[string]any)
- func TitleCase(s string) string
- type ModelFromAPI
- type ModelFromTerraform
- type ModelToAPI
- type ModelToTerraform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dedent ¶ added in v1.55.0
Dedent is a helper function that dedent a tab indented text. The first line defines the number of tabs to remove for the rest of the text.
func InvalidImportID ¶ added in v1.54.0
func InvalidImportID(expected string, id string) diag.Diagnostic
func MarkdownDescription ¶ added in v1.55.0
MarkdownDescription is a helper function that transforms a Go friendly markdown text into real markdown.
- Dedent the description - Replace 2 single quote with a backtick
func SetSchemaFromAttributes ¶
func SetSchemaFromAttributes(d *schema.ResourceData, attrs map[string]any)
Types ¶
type ModelFromAPI ¶ added in v1.54.0
type ModelFromAPI[API any] interface { FromAPI(ctx context.Context, hc API) diag.Diagnostics }
ModelFromAPI defines a model than can be read from an API resource.
type ModelFromTerraform ¶ added in v1.54.0
type ModelFromTerraform[TF any] interface { FromTerraform(ctx context.Context, tf TF) diag.Diagnostics }
ModelFromTerraform defines a model than can be read from a Terraform type.
type ModelToAPI ¶ added in v1.54.0
type ModelToAPI[API any] interface { ToAPI(ctx context.Context) (API, diag.Diagnostics) }
ModelToAPI defines a model than can be written to an API resource.
type ModelToTerraform ¶ added in v1.54.0
type ModelToTerraform[TF any] interface { ToTerraform(ctx context.Context) (TF, diag.Diagnostics) }
ModelToTerraform defines a model than can be written to a Terraform type.
Click to show internal directories.
Click to hide internal directories.