feat: add documentation comments for Model and clientArg structures in resource.go

This commit is contained in:
Andre_Harms 2026-02-05 16:52:32 +01:00
parent 5d92c9b460
commit b6d3eb3858

View file

@ -33,6 +33,7 @@ var (
_ resource.ResourceWithModifyPlan = &userResource{}
)
// Model represents the Terraform resource state for a PostgreSQL Flex user.
type Model struct {
postgresflexalpha.UserModel
TerraformID types.String `tfsdk:"id"`
@ -487,6 +488,7 @@ func (r *userResource) getUserResource(ctx context.Context, model *Model) (bool,
return true, nil
}
// clientArg holds the arguments for API calls.
type clientArg struct {
projectId string
instanceId string
@ -516,6 +518,7 @@ func (r *userResource) setTFLogFields(ctx context.Context, model *Model) context
return ctx
}
// expandRoles converts a Terraform list of roles to a string slice.
func (r *userResource) expandRoles(ctx context.Context, rolesSet types.List, diags *diag.Diagnostics) []string {
if rolesSet.IsNull() || rolesSet.IsUnknown() {
return nil