Skip to content

Commit

Permalink
Revert "Rename provider"
Browse files Browse the repository at this point in the history
This reverts commit 865ef07.
  • Loading branch information
danafallon committed Jul 22, 2024
1 parent 865ef07 commit f2633b9
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types"
)

// Ensure ArtieProvider satisfies various provider interfaces.
var _ provider.Provider = &ArtieProvider{}
var _ provider.ProviderWithFunctions = &ArtieProvider{}
// Ensure ScaffoldingProvider satisfies various provider interfaces.
var _ provider.Provider = &ScaffoldingProvider{}
var _ provider.ProviderWithFunctions = &ScaffoldingProvider{}

// ArtieProvider defines the provider implementation.
type ArtieProvider struct {
// ScaffoldingProvider defines the provider implementation.
type ScaffoldingProvider struct {
// version is set to the provider version on release, "dev" when the
// provider is built and ran locally, and "test" when running acceptance
// testing.
version string
}

// ArtieProviderModel describes the provider data model.
type ArtieProviderModel struct {
// ScaffoldingProviderModel describes the provider data model.
type ScaffoldingProviderModel struct {
Endpoint types.String `tfsdk:"endpoint"`
}

func (p *ArtieProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) {
resp.TypeName = "artie"
func (p *ScaffoldingProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) {
resp.TypeName = "scaffolding"
resp.Version = p.version
}

func (p *ArtieProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) {
func (p *ScaffoldingProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) {
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
"endpoint": schema.StringAttribute{
Expand All @@ -48,8 +48,8 @@ func (p *ArtieProvider) Schema(ctx context.Context, req provider.SchemaRequest,
}
}

func (p *ArtieProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {
var data ArtieProviderModel
func (p *ScaffoldingProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {
var data ScaffoldingProviderModel

resp.Diagnostics.Append(req.Config.Get(ctx, &data)...)

Expand All @@ -66,27 +66,27 @@ func (p *ArtieProvider) Configure(ctx context.Context, req provider.ConfigureReq
resp.ResourceData = client
}

func (p *ArtieProvider) Resources(ctx context.Context) []func() resource.Resource {
func (p *ScaffoldingProvider) Resources(ctx context.Context) []func() resource.Resource {
return []func() resource.Resource{
NewExampleResource,
}
}

func (p *ArtieProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
func (p *ScaffoldingProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
return []func() datasource.DataSource{
NewExampleDataSource,
}
}

func (p *ArtieProvider) Functions(ctx context.Context) []func() function.Function {
func (p *ScaffoldingProvider) Functions(ctx context.Context) []func() function.Function {
return []func() function.Function{
NewExampleFunction,
}
}

func New(version string) func() provider.Provider {
return func() provider.Provider {
return &ArtieProvider{
return &ScaffoldingProvider{
version: version,
}
}
Expand Down

0 comments on commit f2633b9

Please sign in to comment.