|
| 1 | +// Copyright (c) HashiCorp, Inc. |
| 2 | +// SPDX-License-Identifier: MPL-2.0 |
| 3 | + |
| 4 | +package resource_test |
| 5 | + |
| 6 | +import ( |
| 7 | + "context" |
| 8 | + |
| 9 | + "github.com/hashicorp/terraform-plugin-framework/resource" |
| 10 | +) |
| 11 | + |
| 12 | +type ComputeInstance struct { |
| 13 | +} |
| 14 | + |
| 15 | +func (c *ComputeInstance) Configure(_ context.Context, _ resource.ConfigureRequest, _ *resource.ConfigureResponse) { |
| 16 | + panic("not implemented") |
| 17 | +} |
| 18 | + |
| 19 | +func (c *ComputeInstance) ValidateListConfig(_ context.Context, _ resource.ValidateListConfigRequest, _ *resource.ValidateListConfigResponse) { |
| 20 | + panic("not implemented") |
| 21 | +} |
| 22 | + |
| 23 | +func (c *ComputeInstance) ListSchema(_ context.Context, _ resource.SchemaRequest, _ resource.SchemaResponse) { |
| 24 | + panic("not implemented") |
| 25 | +} |
| 26 | + |
| 27 | +func (c *ComputeInstance) ListResources(_ context.Context, _ resource.ListRequest, _ resource.ListResponse) { |
| 28 | + panic("not implemented") |
| 29 | +} |
| 30 | + |
| 31 | +func (c *ComputeInstance) Metadata(_ context.Context, _ resource.MetadataRequest, _ *resource.MetadataResponse) { |
| 32 | + panic("not implemented") |
| 33 | +} |
| 34 | + |
| 35 | +func (c *ComputeInstance) Schema(_ context.Context, _ resource.SchemaRequest, _ *resource.SchemaResponse) { |
| 36 | + panic("not implemented") |
| 37 | +} |
| 38 | + |
| 39 | +func (c *ComputeInstance) Create(_ context.Context, _ resource.CreateRequest, _ *resource.CreateResponse) { |
| 40 | + panic("not implemented") |
| 41 | +} |
| 42 | + |
| 43 | +func (c *ComputeInstance) Read(_ context.Context, _ resource.ReadRequest, _ *resource.ReadResponse) { |
| 44 | + panic("not implemented") |
| 45 | +} |
| 46 | + |
| 47 | +func (c *ComputeInstance) Update(_ context.Context, _ resource.UpdateRequest, _ *resource.UpdateResponse) { |
| 48 | + panic("not implemented") |
| 49 | +} |
| 50 | + |
| 51 | +func (c *ComputeInstance) Delete(_ context.Context, _ resource.DeleteRequest, _ *resource.DeleteResponse) { |
| 52 | + panic("not implemented") |
| 53 | +} |
| 54 | + |
| 55 | +// ExampleResource_listable demonstrates a resource.Resource that implements resource.List interfaces |
| 56 | +func ExampleResource_listable() { |
| 57 | + |
| 58 | + var _ resource.List = &ComputeInstance{} |
| 59 | + var _ resource.ListWithConfigure = &ComputeInstance{} |
| 60 | + var _ resource.ListWithValidateConfig = &ComputeInstance{} |
| 61 | + |
| 62 | + var _ resource.Resource = &ComputeInstance{} |
| 63 | + var _ resource.ResourceWithConfigure = &ComputeInstance{} |
| 64 | + |
| 65 | + // Output: |
| 66 | +} |
0 commit comments