provider

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewWorkspaceResource

func NewWorkspaceResource() resource.Resource

NewWorkspaceResource is a helper function to simplify the provider implementation.

func NewWorkspacesDataSource

func NewWorkspacesDataSource() datasource.DataSource

NewWorkspacesDataSource is a helper function to simplify the provider implementation.

Types

type Structurizr

type Structurizr struct {
	// contains filtered or unexported fields
}

Structurizr defines the provider implementation.

func (*Structurizr) Configure

func (*Structurizr) DataSources

func (p *Structurizr) DataSources(_ context.Context) []func() datasource.DataSource

DataSources registers all available data sources that can be used to retrieve data

func (*Structurizr) Metadata

Metadata returns the provider type name and version. It can be used to register other type of information

func (*Structurizr) Resources

func (p *Structurizr) Resources(_ context.Context) []func() resource.Resource

Resources registers all available resource to be managed by Terraform

func (*Structurizr) Schema

Schema defines the schema for the resource

type StructurizrProviderModel

type StructurizrProviderModel struct {
	Host        types.String `tfsdk:"host"`
	AdminAPIKey types.String `tfsdk:"admin_api_key"`
	TLSInsecure types.Bool   `tfsdk:"tls_insecure"`
}

StructurizrProviderModel describes the provider data model.

type WorkspaceModel

type WorkspaceModel struct {
	ID           types.Int64  `tfsdk:"id"`
	Name         types.String `tfsdk:"name"`
	Description  types.String `tfsdk:"description"`
	APIKey       types.String `tfsdk:"api_key"`
	APISecret    types.String `tfsdk:"api_secret"`
	PublicURL    types.String `tfsdk:"public_url"`
	PrivateURL   types.String `tfsdk:"private_url"`
	ShareableURL types.String `tfsdk:"shareable_url"`
}

WorkspaceModel represents a workspace configured in the structurizr

type WorkspaceResourceModel

type WorkspaceResourceModel struct {
	ID               types.Int64  `tfsdk:"id"`
	Name             types.String `tfsdk:"name"`
	Description      types.String `tfsdk:"description"`
	APIKey           types.String `tfsdk:"api_key"`
	APISecret        types.String `tfsdk:"api_secret"`
	PublicURL        types.String `tfsdk:"public_url"`
	PrivateURL       types.String `tfsdk:"private_url"`
	ShareableURL     types.String `tfsdk:"shareable_url"`
	Source           types.String `tfsdk:"source"`
	SourceChecksum   types.String `tfsdk:"source_checksum"`
	SourcePassphrase types.String `tfsdk:"source_passphrase"`
	LastUpdated      types.String `tfsdk:"last_updated"`
}

WorkspaceResourceModel represents a workspace in the structurizr

type WorkspacesModel

type WorkspacesModel struct {
	Workspaces []WorkspaceModel `tfsdk:"workspaces"`
}

WorkspacesModel is the response body for any CRU methods

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL