Skip to content

Commit c9b04eb

Browse files
committed
Some renaming.
1 parent 05bd25c commit c9b04eb

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

internal/service/notifications/exports_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package notifications
55

66
// Exports for use in tests only.
77
var (
8-
ResourceNotificationHub = newResourceNotificationHub
8+
ResourceNotificationHub = newNotificationHubResource
99

1010
FindNotificationHubByRegion = findNotificationHubByRegion
1111
)

internal/service/notifications/notification_hub.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ import (
3131
)
3232

3333
// @FrameworkResource("aws_notifications_notification_hub", name="Notification Hub")
34-
func newResourceNotificationHub(_ context.Context) (resource.ResourceWithConfigure, error) {
35-
r := &resourceNotificationHub{}
34+
func newNotificationHubResource(context.Context) (resource.ResourceWithConfigure, error) {
35+
r := &notificationHubResource{}
3636

3737
r.SetDefaultCreateTimeout(20 * time.Minute)
3838
r.SetDefaultDeleteTimeout(20 * time.Minute)
3939

4040
return r, nil
4141
}
4242

43-
type resourceNotificationHub struct {
43+
type notificationHubResource struct {
4444
framework.ResourceWithConfigure
4545
framework.WithTimeouts
4646
framework.WithNoUpdate
4747
}
4848

49-
func (r *resourceNotificationHub) Schema(ctx context.Context, request resource.SchemaRequest, response *resource.SchemaResponse) {
49+
func (r *notificationHubResource) Schema(ctx context.Context, request resource.SchemaRequest, response *resource.SchemaResponse) {
5050
response.Schema = schema.Schema{
5151
Attributes: map[string]schema.Attribute{
5252
"notification_hub_region": schema.StringAttribute{
@@ -65,8 +65,8 @@ func (r *resourceNotificationHub) Schema(ctx context.Context, request resource.S
6565
}
6666
}
6767

68-
func (r *resourceNotificationHub) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) {
69-
var data resourceNotificationHubModel
68+
func (r *notificationHubResource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) {
69+
var data notificationHubResourceModel
7070
response.Diagnostics.Append(request.Plan.Get(ctx, &data)...)
7171
if response.Diagnostics.HasError() {
7272
return
@@ -95,8 +95,8 @@ func (r *resourceNotificationHub) Create(ctx context.Context, request resource.C
9595
response.Diagnostics.Append(response.State.Set(ctx, data)...)
9696
}
9797

98-
func (r *resourceNotificationHub) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) {
99-
var data resourceNotificationHubModel
98+
func (r *notificationHubResource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) {
99+
var data notificationHubResourceModel
100100
response.Diagnostics.Append(request.State.Get(ctx, &data)...)
101101
if response.Diagnostics.HasError() {
102102
return
@@ -122,8 +122,8 @@ func (r *resourceNotificationHub) Read(ctx context.Context, request resource.Rea
122122
response.Diagnostics.Append(response.State.Set(ctx, &data)...)
123123
}
124124

125-
func (r *resourceNotificationHub) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) {
126-
var data resourceNotificationHubModel
125+
func (r *notificationHubResource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) {
126+
var data notificationHubResourceModel
127127
response.Diagnostics.Append(request.State.Get(ctx, &data)...)
128128
if response.Diagnostics.HasError() {
129129
return
@@ -158,7 +158,7 @@ func (r *resourceNotificationHub) Delete(ctx context.Context, request resource.D
158158
}
159159
}
160160

161-
func (r *resourceNotificationHub) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) {
161+
func (r *notificationHubResource) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) {
162162
resource.ImportStatePassthroughID(ctx, path.Root("notification_hub_region"), request, response)
163163
}
164164

@@ -272,7 +272,7 @@ func waitNotificationHubDeleted(ctx context.Context, conn *notifications.Client,
272272
return nil, err
273273
}
274274

275-
type resourceNotificationHubModel struct {
275+
type notificationHubResourceModel struct {
276276
NotificationHubRegion types.String `tfsdk:"notification_hub_region"`
277277
Timeouts timeouts.Value `tfsdk:"timeouts"`
278278
}

internal/service/notifications/service_package_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)