provider

package
v0.0.0-...-8b60d80 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_GENERIC_CLIENT_ERROR   = "client error"
	ERROR_GENERIC_API_ERROR      = "api error"
	ERROR_AUTHENTICATION_FAILURE = "not authorized. check api key and secret."
	ERROR_ENDPOINT_LOOKUP        = "could not fetch endpoints for meshStack."
)

Variables

This section is empty.

Functions

func New

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

func NewBuildingBlockResource

func NewBuildingBlockResource() resource.Resource

func NewBuildingBlockSource

func NewBuildingBlockSource() datasource.DataSource

func NewExampleResource

func NewExampleResource() resource.Resource

Types

type BuildingBlockDataSource

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

func (*BuildingBlockDataSource) Configure

func (*BuildingBlockDataSource) Metadata

func (*BuildingBlockDataSource) Read

func (*BuildingBlockDataSource) Schema

type BuildingBlockDataSourceModel

type BuildingBlockDataSourceModel struct {
}

type BuildingBlockResource

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

func (*BuildingBlockResource) Configure

func (*BuildingBlockResource) Create

func (*BuildingBlockResource) Delete

func (*BuildingBlockResource) ImportState

func (*BuildingBlockResource) Metadata

func (*BuildingBlockResource) Read

func (*BuildingBlockResource) Schema

func (*BuildingBlockResource) Update

type BuildingBlockResourceModel

type BuildingBlockResourceModel struct {
	Uuid              types.String `tfsdk:"uuid"`
	DefinitionUUid    types.String `tfsdk:"definition_uuid"`
	DefinitionVersion types.Int64  `tfsdk:"definition_version"`
	TenantIdentifier  types.String `tfsdk:"tenant_identifier"`
	DisplayName       types.String `tfsdk:"display_name"`
	Inputs            types.Map    `tfsdk:"inputs"`
	Parents           types.Set    `tfsdk:"parents"`
}

type ExampleResource

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

ExampleResource defines the resource implementation.

func (*ExampleResource) Configure

func (*ExampleResource) Create

func (*ExampleResource) Delete

func (*ExampleResource) ImportState

func (*ExampleResource) Metadata

func (*ExampleResource) Read

func (*ExampleResource) Schema

func (*ExampleResource) Update

type ExampleResourceModel

type ExampleResourceModel struct {
	ConfigurableAttribute types.String `tfsdk:"configurable_attribute"`
	Defaulted             types.String `tfsdk:"defaulted"`
	Id                    types.String `tfsdk:"id"`
}

ExampleResourceModel describes the resource data model.

type MeshBuildingBlock

type MeshBuildingBlock struct {
	ApiVersion string                    `json:"apiVersion"`
	Kind       string                    `json:"kind"`
	Metadata   MeshBuildingBlockMetadata `json:"metadata"`
	Spec       MeshBuildingBlockSpec     `json:"spec"`
	Status     MeshBuildingBlockStatus   `json:"status"`
}

type MeshBuildingBlockIO

type MeshBuildingBlockIO struct {
	Key       string `json:"key"`
	Value     any    `json:"value"`
	ValueType string `json:"valueType"`
}

type MeshBuildingBlockMetadata

type MeshBuildingBlockMetadata struct {
	Uuid                string    `json:"uuid"`
	DefinitionUuid      string    `json:"definitionUuid"`
	DefinitionVersion   int64     `json:"definitionVersion"`
	TenantIdentifier    string    `json:"tenantIdentifier"`
	CreatedOn           time.Time `json:"createdOn"`
	MarkedForDeletionOn time.Time `json:"markedForDeletionOn"`
	MarkedForDeletionBy string    `json:"markedForDeletionBy"`
}

type MeshBuildingBlockSpec

type MeshBuildingBlockSpec struct {
	DisplayName          string                `json:"displayName"`
	Inputs               []MeshBuildingBlockIO `json:"inputs"`
	ParentBuildingBlocks []ParentBuildingBlock `json:"parentBuildingBlocks"`
}

type MeshBuildingBlockStatus

type MeshBuildingBlockStatus struct {
	Status  string                `json:"status"`
	Outputs []MeshBuildingBlockIO `json:"outputs"`
}

type MeshStackProvider

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

func (*MeshStackProvider) Configure

func (*MeshStackProvider) DataSources

func (p *MeshStackProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*MeshStackProvider) Metadata

func (*MeshStackProvider) Resources

func (p *MeshStackProvider) Resources(ctx context.Context) []func() resource.Resource

func (*MeshStackProvider) Schema

type MeshStackProviderClient

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

TODO this will be an abstraction that does the login call, get a token and then use this token in the Auth header.

func NewClient

func NewClient(url *url.URL, apiKey string, apiSecret string) (*MeshStackProviderClient, error)

func (*MeshStackProviderClient) ReadBuildingBlock

func (c *MeshStackProviderClient) ReadBuildingBlock(uuid string) (*MeshBuildingBlock, error)

type MeshStackProviderModel

type MeshStackProviderModel struct {
	Endpoint  types.String `tfsdk:"endpoint"`
	ApiKey    types.String `tfsdk:"apikey"`
	ApiSecret types.String `tfsdk:"apisecret"`
}

type ParentBuildingBlock

type ParentBuildingBlock struct {
	BuildingBlockUuid string `json:"buildingBlockUuid"`
	DefinitionUuid    string `json:"definitionUuid"`
}

Jump to

Keyboard shortcuts

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