feat: add documentation comments for Model and clientArg structures in resource.go
This commit is contained in:
parent
5d92c9b460
commit
b6d3eb3858
1 changed files with 3 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ var (
|
||||||
_ resource.ResourceWithModifyPlan = &userResource{}
|
_ resource.ResourceWithModifyPlan = &userResource{}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Model represents the Terraform resource state for a PostgreSQL Flex user.
|
||||||
type Model struct {
|
type Model struct {
|
||||||
postgresflexalpha.UserModel
|
postgresflexalpha.UserModel
|
||||||
TerraformID types.String `tfsdk:"id"`
|
TerraformID types.String `tfsdk:"id"`
|
||||||
|
|
@ -487,6 +488,7 @@ func (r *userResource) getUserResource(ctx context.Context, model *Model) (bool,
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clientArg holds the arguments for API calls.
|
||||||
type clientArg struct {
|
type clientArg struct {
|
||||||
projectId string
|
projectId string
|
||||||
instanceId string
|
instanceId string
|
||||||
|
|
@ -516,6 +518,7 @@ func (r *userResource) setTFLogFields(ctx context.Context, model *Model) context
|
||||||
return ctx
|
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 {
|
func (r *userResource) expandRoles(ctx context.Context, rolesSet types.List, diags *diag.Diagnostics) []string {
|
||||||
if rolesSet.IsNull() || rolesSet.IsUnknown() {
|
if rolesSet.IsNull() || rolesSet.IsUnknown() {
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue