Skip to content

Commit

Permalink
Remove scaffolding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreascreten committed Apr 2, 2023
1 parent e02d9d3 commit 590a435
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 105 deletions.
32 changes: 0 additions & 32 deletions docs/data-sources/scaffolding_example.md

This file was deleted.

26 changes: 0 additions & 26 deletions docs/index.md

This file was deleted.

33 changes: 0 additions & 33 deletions docs/resources/scaffolding_example.md

This file was deleted.

26 changes: 13 additions & 13 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ import (
ForgeClient "github.com/madewithlove/forge-go-sdk"
)

// Ensure LaravelForgeProvider satisfies various provider interfaces.
var _ provider.Provider = &LaravelForgeProvider{}
// Ensure ForgeProvider satisfies various provider interfaces.
var _ provider.Provider = &ForgeProvider{}

// LaravelForgeProvider defines the provider implementation.
type LaravelForgeProvider struct {
// ForgeProvider defines the provider implementation.
type ForgeProvider 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
}

// LaravelForgeProviderModel describes the provider data model.
type LaravelForgeProviderModel struct {
// ForgeProviderModel describes the provider data model.
type ForgeProviderModel struct {
Token types.String `tfsdk:"token"`
}

func (p *LaravelForgeProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) {
func (p *ForgeProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) {
resp.TypeName = "forge"
resp.Version = p.version
}

func (p *LaravelForgeProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) {
func (p *ForgeProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) {
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
"token": schema.StringAttribute{
Expand All @@ -44,8 +44,8 @@ func (p *LaravelForgeProvider) Schema(ctx context.Context, req provider.SchemaRe
}
}

func (p *LaravelForgeProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {
var data LaravelForgeProviderModel
func (p *ForgeProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {
var data ForgeProviderModel

apiToken := os.Getenv("FORGE_API_TOKEN")

Expand Down Expand Up @@ -77,21 +77,21 @@ func (p *LaravelForgeProvider) Configure(ctx context.Context, req provider.Confi
resp.ResourceData = client
}

func (p *LaravelForgeProvider) Resources(ctx context.Context) []func() resource.Resource {
func (p *ForgeProvider) Resources(ctx context.Context) []func() resource.Resource {
return []func() resource.Resource{
NewResourceServer,
}
}

func (p *LaravelForgeProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
func (p *ForgeProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
return []func() datasource.DataSource{
NewDaemonDataSource,
}
}

func New(version string) func() provider.Provider {
return func() provider.Provider {
return &LaravelForgeProvider{
return &ForgeProvider{
version: version,
}
}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
flag.Parse()

opts := providerserver.ServeOpts{
Address: "registry.terraform.io/madewithlove/terraform-provider-forge",
Address: "registry.terraform.io/madewithlove/forge",
Debug: debug,
}

Expand Down

0 comments on commit 590a435

Please sign in to comment.