provider

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MPL-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const ABX_API_VERSION = "2019-09-12"
View Source
const BLUEPRINT_API_VERSION = "2019-09-12"
View Source
const CATALOG_API_VERSION = "2020-08-25"
View Source
const EVENT_BROKER_API_VERSION = ""

TODO then ensure its used (check related TODOs). 7.6 ?? https://developer.vmware.com/apis/576/#api

View Source
const FORM_API_VERSION = "1.0"
View Source
const IAAS_API_VERSION = "2021-07-15"
View Source
const ICON_API_VERSION = ""

TODO then ensure its used (check related TODOs).

View Source
const JSON_INSTEAD_OF_DYNAMIC_DISCLAIMER = "" +
	" (JSON encoded)\n" +
	"\n" +
	"We should have implemented this attribute as a dynamic type (and not JSON).\n" +
	"Unfortunately Terraform SDK returns this issue:\n" +
	"Dynamic types inside of collections are not currently supported in " +
	"terraform-plugin-framework.\n"
View Source
const PLATFORM_API_VERSION = ""

TODO then ensure its used (check related TODOs).

View Source
const POLICY_API_VERSION = "2020-08-25"
View Source
const PROJECT_API_VERSION = "2019-01-15"

Variables

This section is empty.

Functions

func ABXActionSchema added in v0.4.1

func ABXActionSchema() schema.Schema

func ABXConstantSchema added in v0.4.1

func ABXConstantSchema() schema.Schema

func ABXSensitiveConstantSchema added in v0.4.1

func ABXSensitiveConstantSchema() schema.Schema

func CatalogTypeDataSourceSchema added in v0.4.1

func CatalogTypeDataSourceSchema() schema.Schema

func CheckDeepEqual added in v0.2.3

func CheckDeepEqual(t *testing.T, actual interface{}, expected interface{})

func CheckDiagnostics added in v0.2.3

func CheckDiagnostics(
	t *testing.T,
	diags diag.Diagnostics,
	warningMessage string,
	errorMessage string,
)

func CheckEqual added in v0.2.3

func CheckEqual(t *testing.T, actual interface{}, expected interface{})

func CleanString added in v0.1.1

func CleanString(value string) string

func CloudTemplateResourceSchema added in v0.5.0

func CloudTemplateResourceSchema() schema.NestedAttributeObject

func CloudTemplateResourcesSchema added in v0.5.0

func CloudTemplateResourcesSchema() schema.MapNestedAttribute

func CloudTemplateV1Schema added in v0.5.0

func CloudTemplateV1Schema() schema.Schema

func CloudTemplateV1ValidationMessageAttributeTypes added in v0.5.0

func CloudTemplateV1ValidationMessageAttributeTypes() map[string]attr.Type

Used to convert structure to a types.Object.

func ComputedDescriptionSchema added in v0.4.1

func ComputedDescriptionSchema() schema.StringAttribute

func ComputedIdentifierSchema added in v0.3.0

func ComputedIdentifierSchema(description string) schema.StringAttribute

func ComputedMutableIdentifierSchema added in v0.3.0

func ComputedMutableIdentifierSchema() schema.StringAttribute

func ComputedOrganizationIdSchema added in v0.3.0

func ComputedOrganizationIdSchema() schema.StringAttribute

func CustomFormModelAttributeTypes added in v0.3.1

func CustomFormModelAttributeTypes() map[string]attr.Type

Used to convert structure to a types.Object.

func CustomFormSchema added in v0.3.1

func CustomFormSchema() schema.SingleNestedAttribute

Optional, only used by the ResourceActionSchema (as of current version).

func CustomNamingSchema added in v0.4.1

func CustomNamingSchema() schema.Schema

func CustomResourceSchema added in v0.4.1

func CustomResourceSchema() schema.Schema

func GetIdFromLocation

func GetIdFromLocation(response *resty.Response) (string, error)

func GetVersionFromPath added in v0.5.0

func GetVersionFromPath(path string) string

func IconDataSourceSchema added in v0.4.1

func IconDataSourceSchema() dataschema.Schema

func IconSchema added in v0.4.1

func IconSchema() schema.Schema

func JSONNormalizedFromAny added in v0.5.0

func JSONNormalizedFromAny(name string, value any) (jsontypes.Normalized, diag.Diagnostics)

Convert raw value to JSON encoded attribute.

func JSONNormalizedToAny added in v0.5.0

func JSONNormalizedToAny(attribute jsontypes.Normalized) (any, diag.Diagnostics)

Convert JSON encoded attribute to raw value.

func New

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

func NewABXActionResource added in v0.1.1

func NewABXActionResource() resource.Resource

func NewABXConstantResource

func NewABXConstantResource() resource.Resource

func NewABXSensitiveConstantResource added in v0.2.0

func NewABXSensitiveConstantResource() resource.Resource

func NewCatalogTypeDataSource added in v0.1.1

func NewCatalogTypeDataSource() datasource.DataSource

func NewCloudTemplateV1Resource added in v0.5.0

func NewCloudTemplateV1Resource() resource.Resource

func NewCustomNamingResource added in v0.2.5

func NewCustomNamingResource() resource.Resource

func NewCustomResourceResource added in v0.2.3

func NewCustomResourceResource() resource.Resource

func NewExampleFunction

func NewExampleFunction() function.Function

func NewIconDataSource

func NewIconDataSource() datasource.DataSource

func NewIconResource

func NewIconResource() resource.Resource

func NewProjectResource added in v0.5.0

func NewProjectResource() resource.Resource

func NewPropertyGroupResource added in v0.3.0

func NewPropertyGroupResource() resource.Resource

func NewResourceActionResource added in v0.2.3

func NewResourceActionResource() resource.Resource

func NewSecretDataSource added in v0.2.2

func NewSecretDataSource() datasource.DataSource

func NewSubscriptionResource added in v0.1.1

func NewSubscriptionResource() resource.Resource

func OptionalImmutableProjectIdSchema added in v0.3.1

func OptionalImmutableProjectIdSchema() schema.StringAttribute

func OrderedPropertiesSchema added in v0.3.0

func OrderedPropertiesSchema(description string) schema.ListNestedAttribute

func ProjectConstraintsSchema added in v0.5.0

func ProjectConstraintsSchema() schema.SingleNestedAttribute

func ProjectSchema added in v0.5.0

func ProjectSchema() schema.Schema

func PropertyGroupSchema added in v0.4.1

func PropertyGroupSchema() schema.Schema

func PropertyOneOfSchema added in v0.3.0

func PropertyOneOfSchema() schema.ListNestedAttribute

func PropertySchema added in v0.3.0

func PropertySchema() schema.NestedAttributeObject

func RequiredDescriptionSchema added in v0.4.1

func RequiredDescriptionSchema() schema.StringAttribute

func RequiredIdentifierSchema added in v0.3.0

func RequiredIdentifierSchema() schema.StringAttribute

func RequiredImmutableProjectIdSchema added in v0.4.1

func RequiredImmutableProjectIdSchema() schema.StringAttribute

func RequiredProjectIdSchema added in v0.4.1

func RequiredProjectIdSchema() schema.StringAttribute

func ResourceActionRunnableSchema added in v0.3.0

func ResourceActionRunnableSchema(description string) schema.SingleNestedAttribute

func ResourceActionSchema added in v0.4.1

func ResourceActionSchema() schema.Schema

func SecretDataSourceSchema added in v0.4.1

func SecretDataSourceSchema() schema.Schema

func SkipEmpty added in v0.1.1

func SkipEmpty(value []string) []string

func StringOrNullValue added in v0.1.1

func StringOrNullValue(value string) types.String

func SubscriptionSchema added in v0.4.1

func SubscriptionSchema() schema.Schema

func UnorderedPropertiesSchema added in v0.3.0

func UnorderedPropertiesSchema(description string) schema.MapNestedAttribute

Types

type ABXActionAPIModel added in v0.1.1

type ABXActionAPIModel struct {
	Id           string `json:"id,omitempty"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	FAASProvider string `json:"provider"`
	Type         string `json:"actionType"`

	RuntimeName    string `json:"runtime"`
	RuntimeVersion string `json:"runtimeVersion"`

	CPUShares                int32 `json:"cpuShares"`
	MemoryInMB               int32 `json:"memoryInMB"`
	TimeoutSeconds           int32 `json:"timeoutSeconds"`
	DeploymentTimeoutSeconds int32 `json:"deploymentTimeoutSeconds"`

	Entrypoint   string            `json:"entrypoint"`
	Dependencies string            `json:"dependencies"`
	Inputs       map[string]string `json:"inputs"`

	Source string `json:"source"`

	Shared        bool `json:"shared"`
	System        bool `json:"system"`
	AsyncDeployed bool `json:"asyncDeployed"`

	ProjectId string `json:"projectId"`
	OrgId     string `json:"orgId"`
}

ABXActionAPIModel describes the resource API model.

type ABXActionModel added in v0.1.1

type ABXActionModel struct {
	Id           types.String `tfsdk:"id"`
	Name         types.String `tfsdk:"name"`
	Description  types.String `tfsdk:"description"`
	FAASProvider types.String `tfsdk:"faas_provider"`
	Type         types.String `tfsdk:"type"`

	RuntimeName    types.String `tfsdk:"runtime_name"`
	RuntimeVersion types.String `tfsdk:"runtime_version"`

	CPUShares                types.Int32 `tfsdk:"cpu_shares"`
	MemoryInMB               types.Int32 `tfsdk:"memory_in_mb"`
	TimeoutSeconds           types.Int32 `tfsdk:"timeout_seconds"`
	DeploymentTimeoutSeconds types.Int32 `tfsdk:"deployment_timeout_seconds"`

	Entrypoint   types.String `tfsdk:"entrypoint"`
	Dependencies types.List   `tfsdk:"dependencies"`
	Constants    types.Set    `tfsdk:"constants"`
	Secrets      types.Set    `tfsdk:"secrets"`

	Source types.String `tfsdk:"source"`

	Shared        types.Bool `tfsdk:"shared"`
	System        types.Bool `tfsdk:"system"`
	AsyncDeployed types.Bool `tfsdk:"async_deployed"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

ABXActionModel describes the resource data model.

func (ABXActionModel) CreatePath added in v0.5.0

func (self ABXActionModel) CreatePath() string

func (ABXActionModel) DeletePath added in v0.5.0

func (self ABXActionModel) DeletePath() string

func (*ABXActionModel) FromAPI added in v0.1.1

func (self *ABXActionModel) FromAPI(
	ctx context.Context,
	raw ABXActionAPIModel,
) diag.Diagnostics

func (ABXActionModel) LockKey added in v0.5.0

func (self ABXActionModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of ABX actions. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (ABXActionModel) ReadPath added in v0.5.0

func (self ABXActionModel) ReadPath() string

func (ABXActionModel) String added in v0.2.3

func (self ABXActionModel) String() string

func (ABXActionModel) ToAPI added in v0.1.1

func (ABXActionModel) UpdatePath added in v0.5.0

func (self ABXActionModel) UpdatePath() string

type ABXActionResource added in v0.1.1

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

ABXActionResource defines the resource implementation.

func (*ABXActionResource) Configure added in v0.1.1

func (*ABXActionResource) Create added in v0.1.1

func (*ABXActionResource) Delete added in v0.1.1

func (*ABXActionResource) ImportState added in v0.1.1

func (*ABXActionResource) Metadata added in v0.1.1

func (*ABXActionResource) Read added in v0.1.1

func (*ABXActionResource) Schema added in v0.1.1

func (*ABXActionResource) Update added in v0.1.1

type ABXConstantAPIModel added in v0.1.1

type ABXConstantAPIModel struct {
	Id            string `json:"id,omitempty"`
	Name          string `json:"name"`
	Value         string `json:"value"`
	Encrypted     bool   `json:"encrypted"`
	OrgId         string `json:"orgId"`
	CreatedMillis uint64 `json:"createdMillis"`
}

ABXConstantAPIModel describes the resource API model.

type ABXConstantModel added in v0.1.1

type ABXConstantModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Value     types.String `tfsdk:"value"`
	Encrypted types.Bool   `tfsdk:"encrypted"`
	OrgId     types.String `tfsdk:"org_id"`
}

ABXConstantModel describes the resource data model.

func (ABXConstantModel) CreatePath added in v0.5.0

func (self ABXConstantModel) CreatePath() string

func (ABXConstantModel) DeletePath added in v0.5.0

func (self ABXConstantModel) DeletePath() string

func (*ABXConstantModel) FromAPI added in v0.1.1

func (ABXConstantModel) LockKey added in v0.5.0

func (self ABXConstantModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of ABX constants. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (ABXConstantModel) ReadPath added in v0.5.0

func (self ABXConstantModel) ReadPath() string

func (ABXConstantModel) String added in v0.2.3

func (self ABXConstantModel) String() string

func (ABXConstantModel) ToAPI added in v0.1.1

func (ABXConstantModel) UpdatePath added in v0.5.0

func (self ABXConstantModel) UpdatePath() string

type ABXConstantResource

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

ABXConstantResource defines the resource implementation.

func (*ABXConstantResource) Configure

func (*ABXConstantResource) Create

func (*ABXConstantResource) Delete

func (*ABXConstantResource) ImportState

func (*ABXConstantResource) Metadata

func (*ABXConstantResource) Read

func (*ABXConstantResource) Schema

func (*ABXConstantResource) Update

type ABXSensitiveConstantAPIModel added in v0.2.0

type ABXSensitiveConstantAPIModel struct {
	Id            string `json:"id,omitempty"`
	Name          string `json:"name"`
	Value         string `json:"value"`
	Encrypted     bool   `json:"encrypted"`
	OrgId         string `json:"orgId"`
	CreatedMillis uint64 `json:"createdMillis"`
}

ABXSensitiveConstantAPIModel describes the resource API model.

type ABXSensitiveConstantModel added in v0.2.0

type ABXSensitiveConstantModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Value     types.String `tfsdk:"value"`
	Encrypted types.Bool   `tfsdk:"encrypted"`
	OrgId     types.String `tfsdk:"org_id"`
}

ABXSensitiveConstantModel describes the resource data model.

func (ABXSensitiveConstantModel) CreatePath added in v0.5.0

func (self ABXSensitiveConstantModel) CreatePath() string

func (ABXSensitiveConstantModel) DeletePath added in v0.5.0

func (self ABXSensitiveConstantModel) DeletePath() string

func (*ABXSensitiveConstantModel) FromAPI added in v0.2.0

func (ABXSensitiveConstantModel) LockKey added in v0.5.0

func (self ABXSensitiveConstantModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of ABX constants. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (ABXSensitiveConstantModel) ReadPath added in v0.5.0

func (self ABXSensitiveConstantModel) ReadPath() string

func (ABXSensitiveConstantModel) String added in v0.2.3

func (self ABXSensitiveConstantModel) String() string

func (ABXSensitiveConstantModel) ToAPI added in v0.2.0

func (ABXSensitiveConstantModel) UpdatePath added in v0.5.0

func (self ABXSensitiveConstantModel) UpdatePath() string

type ABXSensitiveConstantResource added in v0.2.0

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

ABXSensitiveConstantResource defines the resource implementation.

func (*ABXSensitiveConstantResource) Configure added in v0.2.0

func (*ABXSensitiveConstantResource) Create added in v0.2.0

func (*ABXSensitiveConstantResource) Delete added in v0.2.0

func (*ABXSensitiveConstantResource) Metadata added in v0.2.0

func (*ABXSensitiveConstantResource) Read added in v0.2.0

func (*ABXSensitiveConstantResource) Schema added in v0.2.0

func (*ABXSensitiveConstantResource) Update added in v0.2.0

type APIModel added in v0.5.0

type APIModel interface{}

type AccessTokenResponse

type AccessTokenResponse struct {
	TokenType string `json:"tokenType"`
	Token     string `json:"token"`
}

type ActionParameterAPIModel added in v0.2.3

type ActionParameterAPIModel struct {
	Type        string `json:"type"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

ActionParameterAPIModel describes the resource API model.

type ActionParameterModel added in v0.2.3

type ActionParameterModel struct {
	Type        types.String `tfsdk:"type"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
}

ActionParameterModel describes the resource data model.

func (*ActionParameterModel) FromAPI added in v0.2.3

func (ActionParameterModel) ToAPI added in v0.2.3

type AriaClient added in v0.5.0

type AriaClient struct {

	// Host must be a the URL to the base of the API.
	Host string

	RefreshToken string `datapolicy:"token"`
	AccessToken  string `datapolicy:"token"`

	// Transport Layer.
	Insecure bool

	// UserAgent is an optional field that specifies the caller of this request.
	UserAgent string

	Context context.Context

	Client *resty.Client

	// Named read-write mutexes for managing resources
	Mutex *RWMutexKV
}

func (*AriaClient) CheckConfig added in v0.5.0

func (self *AriaClient) CheckConfig() diag.Diagnostics

func (AriaClient) DeleteIt added in v0.5.0

func (self AriaClient) DeleteIt(
	ctx context.Context,
	instance Model,
) diag.Diagnostics

func (*AriaClient) GetAccessToken added in v0.5.0

func (self *AriaClient) GetAccessToken() diag.Diagnostics

func (*AriaClient) Init added in v0.5.0

func (self *AriaClient) Init() diag.Diagnostics

func (AriaClient) ReadIt added in v0.5.0

func (self AriaClient) ReadIt(
	ctx context.Context,
	instance Model,
	instanceRaw APIModel,
) (bool, diag.Diagnostics)

type AriaProvider

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

AriaProvider defines the provider implementation.

func (*AriaProvider) Configure

func (self *AriaProvider) Configure(
	ctx context.Context,
	req provider.ConfigureRequest,
	resp *provider.ConfigureResponse,
)

func (*AriaProvider) DataSources

func (self *AriaProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*AriaProvider) Functions

func (self *AriaProvider) Functions(ctx context.Context) []func() function.Function

func (*AriaProvider) Metadata

func (self *AriaProvider) Metadata(
	ctx context.Context,
	req provider.MetadataRequest,
	resp *provider.MetadataResponse,
)

func (*AriaProvider) Resources

func (self *AriaProvider) Resources(ctx context.Context) []func() resource.Resource

func (*AriaProvider) Schema

func (self *AriaProvider) Schema(
	ctx context.Context,
	req provider.SchemaRequest,
	resp *provider.SchemaResponse,
)

type AriaProviderModel

type AriaProviderModel struct {
	Host         types.String `tfsdk:"host"`
	Insecure     types.Bool   `tfsdk:"insecure"`
	RefreshToken types.String `tfsdk:"refresh_token"`
	AccessToken  types.String `tfsdk:"access_token"`
}

AriaProviderModel describes the provider data model.

type CatalogTypeAPIModel added in v0.1.1

type CatalogTypeAPIModel struct {
	Id        string `json:"id,omitempty"`
	Name      string `json:"name"`
	BaseURI   string `json:"baseUri"`
	CreatedAt string `json:"createdAt"`
	CreatedBy string `json:"createdBy"`
	IconId    string `json:"iconId"`
}

CatalogTypeAPIModel describes the catalog type API model.

type CatalogTypeDataSource added in v0.1.1

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

CatalogTypeDataSource defines the data source implementation.

func (*CatalogTypeDataSource) Configure added in v0.1.1

func (*CatalogTypeDataSource) Metadata added in v0.1.1

func (*CatalogTypeDataSource) Read added in v0.1.1

func (*CatalogTypeDataSource) Schema added in v0.1.1

type CatalogTypeModel added in v0.1.1

type CatalogTypeModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	BaseURI   types.String `tfsdk:"base_uri"`
	CreatedAt types.String `tfsdk:"created_at"`
	CreatedBy types.String `tfsdk:"created_by"`
	IconId    types.String `tfsdk:"icon_id"`
}

CatalogTypeModel describes the catalog type model.

func (*CatalogTypeModel) FromAPI added in v0.1.1

type CloudTemplateResourceAPIModel added in v0.5.0

type CloudTemplateResourceAPIModel struct {
	Type string `yaml:"type"`

	AllocatePerInstance *bool `yaml:"allocatePerInstance,omitempty"`
}

CloudTemplateResourceAPIModel describes the resource API model.

type CloudTemplateResourceModel added in v0.5.0

type CloudTemplateResourceModel struct {
	Name types.String `tfsdk:"name"`
	Type types.String `tfsdk:"type"`

	AllocatePerInstance types.Bool `tfsdk:"allocate_per_instance"`
}

CustomResourcPropertyeModel describes the resource data model.

func (*CloudTemplateResourceModel) FromAPI added in v0.5.0

func (CloudTemplateResourceModel) String added in v0.5.0

func (self CloudTemplateResourceModel) String() string

func (CloudTemplateResourceModel) ToAPI added in v0.5.0

type CloudTemplateResourcesAPIModel added in v0.5.0

type CloudTemplateResourcesAPIModel map[string]CloudTemplateResourceAPIModel

CloudTemplateResourcesAPIModel describes the resource API model.

type CloudTemplateResourcesModel added in v0.5.0

type CloudTemplateResourcesModel map[string]CloudTemplateResourceModel

CloudTemplateResourcesModel describes the resource data model.

func (*CloudTemplateResourcesModel) FromAPI added in v0.5.0

func (CloudTemplateResourcesModel) ToAPI added in v0.5.0

type CloudTemplateV1APIModel added in v0.5.0

type CloudTemplateV1APIModel struct {
	Id              string `json:"id,omitempty"`
	Name            string `json:"name"`
	Description     string `json:"description"`
	RequestScopeOrg bool   `json:"requestScopeOrg"`
	Status          string `json:"status"`
	Content         string `json:"content"`

	Valid              bool                                       `json:"valid"`
	ValidationMessages []CloudTemplateV1ValidationMessageAPIModel `json:"ValidationMessages,omitempty"`

	ProjectId string `json:"projectId"`
	OrgId     string `json:"orgId,omitempty"`
}

CloudTemplateV1APIModel describes the resource API model.

type CloudTemplateV1ContentAPIModel added in v0.5.0

type CloudTemplateV1ContentAPIModel struct {
	/*FormatVersion string                         `json:"formatVersion"`*/
	Inputs    UnorderedPropertiesAPIModel    `yaml:"inputs"`
	Resources CloudTemplateResourcesAPIModel `yaml:"resources"`
}

CloudTemplateV1ContentAPIModel describes the resource API model.

type CloudTemplateV1Model added in v0.5.0

type CloudTemplateV1Model struct {
	Id              types.String `tfsdk:"id"`
	Name            types.String `tfsdk:"name"`
	Description     types.String `tfsdk:"description"`
	RequestScopeOrg types.Bool   `tfsdk:"request_scope_org"`
	Status          types.String `tfsdk:"status"`

	Inputs    UnorderedPropertiesModel    `tfsdk:"inputs"`
	Resources CloudTemplateResourcesModel `tfsdk:"resources"`

	Valid              types.Bool `tfsdk:"valid"`
	ValidationMessages types.List `tfsdk:"validation_messages"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

CloudTemplateV1Model describes the resource data model.

func (CloudTemplateV1Model) CreatePath added in v0.5.0

func (self CloudTemplateV1Model) CreatePath() string

func (CloudTemplateV1Model) DeletePath added in v0.5.0

func (self CloudTemplateV1Model) DeletePath() string

func (*CloudTemplateV1Model) FromAPI added in v0.5.0

func (CloudTemplateV1Model) LockKey added in v0.5.0

func (self CloudTemplateV1Model) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of cloud templates. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (CloudTemplateV1Model) ReadPath added in v0.5.0

func (self CloudTemplateV1Model) ReadPath() string

func (CloudTemplateV1Model) String added in v0.5.0

func (self CloudTemplateV1Model) String() string

func (CloudTemplateV1Model) ToAPI added in v0.5.0

func (CloudTemplateV1Model) UpdatePath added in v0.5.0

func (self CloudTemplateV1Model) UpdatePath() string

type CloudTemplateV1Resource added in v0.5.0

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

CloudTemplateV1Resource defines the resource implementation.

func (*CloudTemplateV1Resource) Configure added in v0.5.0

func (*CloudTemplateV1Resource) Create added in v0.5.0

func (*CloudTemplateV1Resource) Delete added in v0.5.0

func (*CloudTemplateV1Resource) ImportState added in v0.5.0

func (*CloudTemplateV1Resource) Metadata added in v0.5.0

func (*CloudTemplateV1Resource) Read added in v0.5.0

func (*CloudTemplateV1Resource) Schema added in v0.5.0

func (*CloudTemplateV1Resource) Update added in v0.5.0

type CloudTemplateV1ValidationMessageAPIModel added in v0.5.0

type CloudTemplateV1ValidationMessageAPIModel struct {
	ResourceName string `json:"resourceName,omitempty"`
	Path         string `json:"path"`
	Message      string `json:"message"`
}

CloudTemplateV1ValidationMessageAPIModel describes the resource API model.

func CloudTemplateV1ValidationMessageAPIModelFromObject added in v0.5.0

func CloudTemplateV1ValidationMessageAPIModelFromObject(
	ctx context.Context,
	object types.Object,
) (*CloudTemplateV1ValidationMessageAPIModel, diag.Diagnostics)

Convert an object to a CloudTemplateV1ValidationMessageAPIModel.

func (*CloudTemplateV1ValidationMessageAPIModel) ToObject added in v0.5.0

Convert a CloudTemplateV1ValidationMessageAPIModel to an object.

type CloudTemplateV1ValidationMessageModel added in v0.5.0

type CloudTemplateV1ValidationMessageModel struct {
	ResourceName types.String `tfsdk:"resource_name"`
	Path         types.String `tfsdk:"path"`
	Message      types.String `tfsdk:"message"`
}

CloudTemplateV1ValidationMessageModel describes the resource data model.

func (*CloudTemplateV1ValidationMessageModel) FromAPI added in v0.5.0

func (CloudTemplateV1ValidationMessageModel) String added in v0.5.0

func (CloudTemplateV1ValidationMessageModel) ToAPI added in v0.5.0

type CustomFormAPIModel added in v0.2.3

type CustomFormAPIModel struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name"`
	Type       string `json:"type,omitempty"`
	Form       string `json:"form,omitempty"` // TODO A struct to define this attribute
	FormFormat string `json:"formFormat,omitempty"`
	Styles     string `json:"styles,omitempty"`
	SourceId   string `json:"sourceId,omitempty"`
	SourceType string `json:"sourceType,omitempty"`
	Tenant     string `json:"tenant,omitempty"`
	Status     string `json:"status,omitempty"`
}

CustomFormAPIModel describes the resource API model.

func CustomFormAPIModelFromObject added in v0.3.1

func CustomFormAPIModelFromObject(
	ctx context.Context,
	object types.Object,
) (*CustomFormAPIModel, diag.Diagnostics)

Convert an object to a CustomFormAPIModel.

func (*CustomFormAPIModel) ToObject added in v0.3.1

func (self *CustomFormAPIModel) ToObject(
	ctx context.Context,
) (types.Object, diag.Diagnostics)

Convert a CustomFormAPIModel to an object.

type CustomFormModel added in v0.2.3

type CustomFormModel struct {
	Id         types.String         `tfsdk:"id"`
	Name       types.String         `tfsdk:"name"`
	Type       types.String         `tfsdk:"type"`
	Form       jsontypes.Normalized `tfsdk:"form"` // TODO A struct to define this attribute
	FormFormat types.String         `tfsdk:"form_format"`
	Styles     types.String         `tfsdk:"styles"`
	SourceId   types.String         `tfsdk:"source_id"`
	SourceType types.String         `tfsdk:"source_type"`
	Tenant     types.String         `tfsdk:"tenant"`
	Status     types.String         `tfsdk:"status"`
}

CustomFormModel describes the resource data model.

func (*CustomFormModel) FromAPI added in v0.2.3

func (*CustomFormModel) String added in v0.3.1

func (self *CustomFormModel) String() string

func (*CustomFormModel) ToAPI added in v0.2.3

type CustomNamingAPIModel added in v0.2.5

type CustomNamingAPIModel struct {
	Id          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`

	Projects  []CustomNamingProjectFilterAPIModel `json:"projects"`
	Templates []CustomNamingTemplateAPIModel      `json:"templates"`
}

CustomNamingAPIModel describes the resource API model.

type CustomNamingModel added in v0.2.5

type CustomNamingModel struct {
	Id          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`

	Projects  []CustomNamingProjectFilterModel     `tfsdk:"projects"`
	Templates map[string]CustomNamingTemplateModel `tfsdk:"templates"`
}

CustomNamingModel describes the resource data model.

func (CustomNamingModel) CreatePath added in v0.5.0

func (self CustomNamingModel) CreatePath() string

func (CustomNamingModel) DeletePath added in v0.5.0

func (self CustomNamingModel) DeletePath() string

func (*CustomNamingModel) FromAPI added in v0.2.5

func (CustomNamingModel) LockKey added in v0.5.0

func (self CustomNamingModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of custom naming. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (CustomNamingModel) ReadPath added in v0.5.0

func (self CustomNamingModel) ReadPath() string

func (*CustomNamingModel) String added in v0.2.5

func (self *CustomNamingModel) String() string

func (*CustomNamingModel) ToAPI added in v0.2.5

func (CustomNamingModel) UpdatePath added in v0.5.0

func (self CustomNamingModel) UpdatePath() string

type CustomNamingProjectFilterAPIModel added in v0.2.5

type CustomNamingProjectFilterAPIModel struct {
	Id          string `json:"id,omitempty"`
	Active      bool   `json:"active"`
	OrgDefault  bool   `json:"defaultOrg"`
	OrgId       string `json:"orgId"`
	ProjectId   string `json:"projectId"`
	ProjectName string `json:"projectName"`
}

CustomNamingProjectFilterAPIModel describes the resource API model.

type CustomNamingProjectFilterModel added in v0.2.5

type CustomNamingProjectFilterModel struct {
	Id          types.String `tfsdk:"id"`
	Active      types.Bool   `tfsdk:"active"`
	OrgDefault  types.Bool   `tfsdk:"org_default"`
	OrgId       types.String `tfsdk:"org_id"`
	ProjectId   types.String `tfsdk:"project_id"`
	ProjectName types.String `tfsdk:"project_name"`
}

CustomNamingProjectFilterModel describes the resource data model.

func (*CustomNamingProjectFilterModel) FromAPI added in v0.2.5

func (CustomNamingProjectFilterModel) String added in v0.2.5

func (self CustomNamingProjectFilterModel) String() string

func (CustomNamingProjectFilterModel) ToAPI added in v0.2.5

type CustomNamingResource added in v0.2.5

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

CustomNamingResource defines the resource implementation.

func (*CustomNamingResource) Configure added in v0.2.5

func (*CustomNamingResource) Create added in v0.2.5

func (*CustomNamingResource) Delete added in v0.2.5

func (*CustomNamingResource) ImportState added in v0.2.5

func (*CustomNamingResource) Metadata added in v0.2.5

func (*CustomNamingResource) Read added in v0.2.5

func (*CustomNamingResource) Schema added in v0.2.5

func (*CustomNamingResource) Update added in v0.2.5

type CustomNamingTemplateAPIModel added in v0.2.5

type CustomNamingTemplateAPIModel struct {
	Id               string `json:"id,omitempty"`
	Name             string `json:"name,omitempty"`
	ResourceType     string `json:"resourceType"`
	ResourceTypeName string `json:"resourceTypeName"`
	ResourceDefault  bool   `json:"resourceDefault"`
	UniqueName       bool   `json:"uniqueName"`
	Pattern          string `json:"pattern"`
	StaticPattern    string `json:"staticPattern"`
	StartCounter     int32  `json:"startCounter"`
	IncrementStep    int32  `json:"incrementStep"`
}

CustomNamingTemplateAPIModel describes the resource API model.

type CustomNamingTemplateModel added in v0.2.5

type CustomNamingTemplateModel struct {
	Id               types.String `tfsdk:"id"`
	Name             types.String `tfsdk:"name"`
	ResourceType     types.String `tfsdk:"resource_type"`
	ResourceTypeName types.String `tfsdk:"resource_type_name"`
	ResourceDefault  types.Bool   `tfsdk:"resource_default"`
	Pattern          types.String `tfsdk:"pattern"`
	StaticPattern    types.String `tfsdk:"static_pattern"`
	UniqueName       types.Bool   `tfsdk:"unique_name"`
	StartCounter     types.Int32  `tfsdk:"start_counter"`
	IncrementStep    types.Int32  `tfsdk:"increment_step"`
}

CustomNamingTemplateModel describes the resource data model.

func (*CustomNamingTemplateModel) FromAPI added in v0.2.5

func (CustomNamingTemplateModel) Key added in v0.2.5

func (self CustomNamingTemplateModel) Key() string

func (CustomNamingTemplateModel) String added in v0.2.5

func (self CustomNamingTemplateModel) String() string

func (CustomNamingTemplateModel) ToAPI added in v0.2.5

type CustomResourceAPIModel added in v0.2.3

type CustomResourceAPIModel struct {
	Id           string `json:"id,omitempty"`
	DisplayName  string `json:"displayName"`
	Description  string `json:"description"`
	ResourceType string `json:"resourceType"`
	SchemaType   string `json:"schemaType"`
	Status       string `json:"status"`

	Properties CustomResourcePropertiesAPIModel `json:"properties"`

	MainActions       map[string]ResourceActionRunnableAPIModel `json:"mainActions"`
	AdditionalActions []ResourceActionAPIModel                  `json:"additionalActions"`

	ProjectId string `json:"projectId"`
	OrgId     string `json:"orgId"`
}

CustomResourceAPIModel describes the resource API model.

type CustomResourceModel added in v0.2.3

type CustomResourceModel struct {
	Id           types.String `tfsdk:"id"`
	DisplayName  types.String `tfsdk:"display_name"`
	Description  types.String `tfsdk:"description"`
	ResourceType types.String `tfsdk:"resource_type"`
	SchemaType   types.String `tfsdk:"schema_type"`
	Status       types.String `tfsdk:"status"`

	Properties UnorderedPropertiesModel `tfsdk:"properties"`

	Create ResourceActionRunnableModel `tfsdk:"create"`
	Read   ResourceActionRunnableModel `tfsdk:"read"`
	Update ResourceActionRunnableModel `tfsdk:"update"`
	Delete ResourceActionRunnableModel `tfsdk:"delete"`

	AdditionalActions []ResourceActionModel `tfsdk:"-"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

CustomResourceModel describes the resource data model.

func (CustomResourceModel) CreatePath added in v0.5.0

func (self CustomResourceModel) CreatePath() string

func (CustomResourceModel) DeletePath added in v0.5.0

func (self CustomResourceModel) DeletePath() string

func (*CustomResourceModel) FromAPI added in v0.2.3

func (CustomResourceModel) LockKey added in v0.5.0

func (self CustomResourceModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of custom resources. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (CustomResourceModel) ReadPath added in v0.5.0

func (self CustomResourceModel) ReadPath() string

func (CustomResourceModel) String added in v0.2.3

func (self CustomResourceModel) String() string

func (CustomResourceModel) ToAPI added in v0.2.3

func (CustomResourceModel) UpdatePath added in v0.5.0

func (self CustomResourceModel) UpdatePath() string

type CustomResourcePropertiesAPIModel added in v0.2.3

type CustomResourcePropertiesAPIModel struct {
	Properties UnorderedPropertiesAPIModel `json:"properties"`
}

CustomResourcePropertiesAPIModel describes the resource API model.

type CustomResourceResource added in v0.2.3

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

CustomResourceResource defines the resource implementation.

func (*CustomResourceResource) Configure added in v0.2.3

func (*CustomResourceResource) Create added in v0.2.3

func (*CustomResourceResource) Delete added in v0.2.3

func (*CustomResourceResource) ImportState added in v0.2.3

func (*CustomResourceResource) Metadata added in v0.2.3

func (*CustomResourceResource) Read added in v0.2.3

func (*CustomResourceResource) Schema added in v0.2.3

func (*CustomResourceResource) Update added in v0.2.3

type ExampleFunction

type ExampleFunction struct{}

func (ExampleFunction) Definition

func (ExampleFunction) Metadata

func (ExampleFunction) Run

type IconDataSource

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

IconDataSource defines the data source implementation.

func (*IconDataSource) Configure

func (*IconDataSource) Metadata

func (*IconDataSource) Read

func (*IconDataSource) Schema

type IconModel added in v0.1.1

type IconModel struct {
	Id      types.String `tfsdk:"id"`
	Content types.String `tfsdk:"content"`
}

IconModel describes the resource data model.

func (IconModel) CreatePath added in v0.5.0

func (self IconModel) CreatePath() string

func (IconModel) DeletePath added in v0.5.0

func (self IconModel) DeletePath() string

func (IconModel) LockKey added in v0.5.0

func (self IconModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of icons. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (IconModel) ReadPath added in v0.5.0

func (self IconModel) ReadPath() string

func (IconModel) String added in v0.2.3

func (self IconModel) String() string

func (IconModel) UpdatePath added in v0.5.0

func (self IconModel) UpdatePath() string

type IconResource

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

IconResource defines the resource implementation.

func (*IconResource) Configure

func (self *IconResource) Configure(
	ctx context.Context,
	req resource.ConfigureRequest,
	resp *resource.ConfigureResponse,
)

func (*IconResource) Create

func (self *IconResource) Create(
	ctx context.Context,
	req resource.CreateRequest,
	resp *resource.CreateResponse,
)

func (*IconResource) Delete

func (self *IconResource) Delete(
	ctx context.Context,
	req resource.DeleteRequest,
	resp *resource.DeleteResponse,
)

func (*IconResource) ImportState

func (self *IconResource) ImportState(
	ctx context.Context,
	req resource.ImportStateRequest,
	resp *resource.ImportStateResponse,
)

func (*IconResource) Metadata

func (self *IconResource) Metadata(
	ctx context.Context,
	req resource.MetadataRequest,
	resp *resource.MetadataResponse,
)

func (*IconResource) Read

func (self *IconResource) Read(
	ctx context.Context,
	req resource.ReadRequest,
	resp *resource.ReadResponse,
)

func (*IconResource) Schema

func (self *IconResource) Schema(
	ctx context.Context,
	req resource.SchemaRequest,
	resp *resource.SchemaResponse,
)

func (*IconResource) Update

func (self *IconResource) Update(
	ctx context.Context,
	req resource.UpdateRequest,
	resp *resource.UpdateResponse,
)

type Model added in v0.5.0

type Model interface {
	String() string

	LockKey() string

	CreatePath() string
	ReadPath() string
	UpdatePath() string
	DeletePath() string
}

type OrderedPropertiesAPIModel added in v0.4.0

type OrderedPropertiesAPIModel struct {
	Names []string
	Data  map[string]PropertyAPIModel
}

OrderedPropertiesAPIModel describes the resource API model. Refers

JSON and Go        https://blog.golang.org/json-and-go
Go-Ordered-JSON    https://github.com/virtuald/go-ordered-json
Python OrderedDict https://github.com/python/cpython/blob/2.7/Lib/collections.py#L38
port OrderedDict   https://github.com/cevaris/ordered_map

func (OrderedPropertiesAPIModel) Get added in v0.4.0

Return a property matching given name, nil if not exists.

func (*OrderedPropertiesAPIModel) Init added in v0.4.0

func (self *OrderedPropertiesAPIModel) Init()

Reset the structure (prepare it for collecting new data).

func (OrderedPropertiesAPIModel) Items added in v0.4.0

Return a slice with given the name, property pair in insertion order.

func (OrderedPropertiesAPIModel) MarshalJSON added in v0.4.0

func (self OrderedPropertiesAPIModel) MarshalJSON() ([]byte, error)

Implement type json.Marshaler interface. Will be called when marshaling OrderedPropertiesAPIModel.

func (*OrderedPropertiesAPIModel) Pop added in v0.4.0

func (self *OrderedPropertiesAPIModel) Pop(
	name string,
) (PropertyAPIModel, bool)

Drop the property if present. Return the property (if found) and a flag indicating if the property was found.

func (*OrderedPropertiesAPIModel) Set added in v0.4.0

func (self *OrderedPropertiesAPIModel) Set(
	name string,
	property PropertyAPIModel,
) bool

Set the property by name, this will remember the order of insertion. The initial insertion order is kept even if the property is overwritten. Returns a boolean indicating if the value is newly inserted (not overwritten).

func (*OrderedPropertiesAPIModel) UnmarshalJSON added in v0.4.0

func (self *OrderedPropertiesAPIModel) UnmarshalJSON(data []byte) error

Implement type json.Unmarshaler interface. Will be called when unmarshaling OrderedPropertiesAPIModel.

type OrderedPropertiesAPIModelItem added in v0.4.0

type OrderedPropertiesAPIModelItem struct {
	Name     string
	Property PropertyAPIModel
}

type OrderedPropertiesModel added in v0.4.0

type OrderedPropertiesModel []PropertyModel

OrderedPropertiesModel describes the resource data model.

func (*OrderedPropertiesModel) FromAPI added in v0.4.0

func (OrderedPropertiesModel) ToAPI added in v0.4.0

type ProjectAPIModel added in v0.5.0

type ProjectAPIModel struct {
	Id               string `json:"id,omitempty"`
	Name             string `json:"name"`
	OperationTimeout int32  `json:"operationTimeout"`
	SharedResources  bool   `json:"sharedResources"`

	Constraints ProjectConstraintsAPIModel `json:"constraints"`
	Properties  map[string]string          `json:"properties"`

	OrgId string `json:"orgId,omitempty"`
}

ProjectAPIModel describes the resource API model.

type ProjectConstraintsAPIModel added in v0.5.0

type ProjectConstraintsAPIModel struct {
}

ProjectConstraintsAPIModel describes the resource API model.

type ProjectConstraintsModel added in v0.5.0

type ProjectConstraintsModel struct {
}

ProjectConstraintsModel describes the resource data model.

func (*ProjectConstraintsModel) FromAPI added in v0.5.0

func (ProjectConstraintsModel) String added in v0.5.0

func (self ProjectConstraintsModel) String() string

func (ProjectConstraintsModel) ToAPI added in v0.5.0

type ProjectMembershipAPIModel added in v0.5.0

type ProjectMembershipAPIModel struct {
	Email string `json:"email"`
	Type  string `json:"type"`
	Role  string `json:"role"`
}

ProjectMembershipAPIModel describes the resource API model.

type ProjectMembershipModel added in v0.5.0

type ProjectMembershipModel struct {
	Email types.String `tfsdk:"email"`
	Type  types.String `tfsdk:"type"`
	Role  types.String `tfsdk:"role"`
}

ProjectMembershipModel describes the resource data model.

func (*ProjectMembershipModel) FromAPI added in v0.5.0

func (ProjectMembershipModel) String added in v0.5.0

func (self ProjectMembershipModel) String() string

func (ProjectMembershipModel) ToAPI added in v0.5.0

type ProjectModel added in v0.5.0

type ProjectModel struct {
	Id               types.String `tfsdk:"id"`
	Name             types.String `tfsdk:"name"`
	OperationTimeout types.Int32  `tfsdk:"operation_timeout"`
	SharedResources  types.Bool   `tfsdk:"shared_resources"`

	Constraints ProjectConstraintsModel `tfsdk:"constraints"`
	Properties  types.Map               `tfsdk:"properties"`

	OrgId types.String `tfsdk:"org_id"`
}

ProjectModel describes the resource data model.

func (ProjectModel) CreatePath added in v0.5.0

func (self ProjectModel) CreatePath() string

func (ProjectModel) DeletePath added in v0.5.0

func (self ProjectModel) DeletePath() string

func (*ProjectModel) FromAPI added in v0.5.0

func (self *ProjectModel) FromAPI(
	ctx context.Context,
	raw ProjectAPIModel,
) diag.Diagnostics

func (ProjectModel) LockKey added in v0.5.0

func (self ProjectModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of projects. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (ProjectModel) ReadPath added in v0.5.0

func (self ProjectModel) ReadPath() string

func (ProjectModel) String added in v0.5.0

func (self ProjectModel) String() string

func (ProjectModel) ToAPI added in v0.5.0

func (ProjectModel) UpdatePath added in v0.5.0

func (self ProjectModel) UpdatePath() string

type ProjectResource added in v0.5.0

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

ProjectResource defines the resource implementation.

func (*ProjectResource) Configure added in v0.5.0

func (*ProjectResource) Create added in v0.5.0

func (self *ProjectResource) Create(
	ctx context.Context,
	req resource.CreateRequest,
	resp *resource.CreateResponse,
)

func (*ProjectResource) Delete added in v0.5.0

func (self *ProjectResource) Delete(
	ctx context.Context,
	req resource.DeleteRequest,
	resp *resource.DeleteResponse,
)

func (*ProjectResource) ImportState added in v0.5.0

func (*ProjectResource) Metadata added in v0.5.0

func (*ProjectResource) Read added in v0.5.0

func (self *ProjectResource) Read(
	ctx context.Context,
	req resource.ReadRequest,
	resp *resource.ReadResponse,
)

func (*ProjectResource) Schema added in v0.5.0

func (self *ProjectResource) Schema(
	ctx context.Context,
	req resource.SchemaRequest,
	resp *resource.SchemaResponse,
)

func (*ProjectResource) Update added in v0.5.0

func (self *ProjectResource) Update(
	ctx context.Context,
	req resource.UpdateRequest,
	resp *resource.UpdateResponse,
)

type PropertyAPIModel added in v0.2.3

type PropertyAPIModel struct {
	Title            string `json:"title" yaml:"title"`
	Description      string `json:"description" yaml:"description"`
	Type             string `json:"type" yaml:"type"`
	Default          any    `json:"default,omitempty" yaml:"default"`
	Encrypted        bool   `json:"encrypted" yaml:"encrypted"`
	ReadOnly         bool   `json:"readOnly" yaml:"readOnly"`
	RecreateOnUpdate bool   `json:"recreateOnUpdate" yaml:"recreateOnUpdate"`

	// Specifications
	Minimum   *int64  `json:"minimum,omitempty" yaml:"minimum,omitempty"`
	Maximum   *int64  `json:"maximum,omitempty" yaml:"maximum,omitempty"`
	MinLength *int32  `json:"minLength,omitempty" yaml:"minLength,omitempty"`
	MaxLength *int32  `json:"maxLength,omitempty" yaml:"maxLength,omitempty"`
	Pattern   *string `json:"pattern,omitempty" yaml:"pattern,omitempty"`
	/*Items*/
	OneOf []PropertyOneOfAPIModel `json:"oneOf,omitempty" yaml:"oneOf,omitempty"`
}

PropertyAPIModel describes the resource API model.

type PropertyGroupAPIModel added in v0.3.0

type PropertyGroupAPIModel struct {
	Id          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Type        string `json:"type"`

	Properties UnorderedPropertiesAPIModel `json:"properties"`

	ProjectId string `json:"projectId,omitempty"`
	OrgId     string `json:"orgId,omitempty"`
}

PropertyGroupAPIModel describes the resource API model.

type PropertyGroupModel added in v0.3.0

type PropertyGroupModel struct {
	Id          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	Type        types.String `tfsdk:"type"`

	Properties UnorderedPropertiesModel `tfsdk:"properties"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

PropertyGroupModel describes the resource data model.

func (PropertyGroupModel) CreatePath added in v0.5.0

func (self PropertyGroupModel) CreatePath() string

func (PropertyGroupModel) DeletePath added in v0.5.0

func (self PropertyGroupModel) DeletePath() string

func (*PropertyGroupModel) FromAPI added in v0.3.0

func (PropertyGroupModel) LockKey added in v0.5.0

func (self PropertyGroupModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of property groups. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (PropertyGroupModel) ReadPath added in v0.5.0

func (self PropertyGroupModel) ReadPath() string

func (PropertyGroupModel) String added in v0.3.0

func (self PropertyGroupModel) String() string

func (PropertyGroupModel) ToAPI added in v0.3.0

func (PropertyGroupModel) UpdatePath added in v0.5.0

func (self PropertyGroupModel) UpdatePath() string

type PropertyGroupResource added in v0.3.0

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

PropertyGroupResource defines the resource implementation.

func (*PropertyGroupResource) Configure added in v0.3.0

func (*PropertyGroupResource) Create added in v0.3.0

func (*PropertyGroupResource) Delete added in v0.3.0

func (*PropertyGroupResource) ImportState added in v0.3.0

func (*PropertyGroupResource) Metadata added in v0.3.0

func (*PropertyGroupResource) Read added in v0.3.0

func (*PropertyGroupResource) Schema added in v0.3.0

func (*PropertyGroupResource) Update added in v0.3.0

type PropertyModel added in v0.2.3

type PropertyModel struct {
	Name             types.String         `tfsdk:"name"`
	Title            types.String         `tfsdk:"title"`
	Description      types.String         `tfsdk:"description"`
	Type             types.String         `tfsdk:"type"`
	Default          jsontypes.Normalized `tfsdk:"default"`
	Encrypted        types.Bool           `tfsdk:"encrypted"`
	ReadOnly         types.Bool           `tfsdk:"read_only"`
	RecreateOnUpdate types.Bool           `tfsdk:"recreate_on_update"`

	// Specifications
	Minimum   types.Int64  `tfsdk:"minimum"`
	Maximum   types.Int64  `tfsdk:"maximum"`
	MinLength types.Int32  `tfsdk:"min_length"`
	MaxLength types.Int32  `tfsdk:"max_length"`
	Pattern   types.String `tfsdk:"pattern"`
	/*Items*/
	OneOf []PropertyOneOfModel `tfsdk:"one_of"`
}

CustomResourcPropertyeModel describes the resource data model.

func (*PropertyModel) FromAPI added in v0.2.3

func (self *PropertyModel) FromAPI(
	ctx context.Context,
	name string,
	raw PropertyAPIModel,
) diag.Diagnostics

func (PropertyModel) String added in v0.4.0

func (self PropertyModel) String() string

func (PropertyModel) ToAPI added in v0.2.3

type PropertyOneOfAPIModel added in v0.2.3

type PropertyOneOfAPIModel struct {
	Const     string `json:"const"`
	Title     string `json:"title"`
	Encrypted bool   `json:"encrypted"`
}

PropertyOneOfAPIModel describes the resource API model.

type PropertyOneOfModel added in v0.2.3

type PropertyOneOfModel struct {
	Const     types.String `tfsdk:"const"`
	Title     types.String `tfsdk:"title"`
	Encrypted types.Bool   `tfsdk:"encrypted"`
}

PropertyOneOfModel describes the resource data model.

func (*PropertyOneOfModel) FromAPI added in v0.2.3

func (PropertyOneOfModel) ToAPI added in v0.2.3

type RWMutexKV added in v0.5.0

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

RWMutexKV is a simple key/value store for arbitrary read-write mutexes.

It can be used to serialize changes across arbitrary collaborators that share knowledge of the keys they must serialize on. The lock can be held by an arbitrary number of readers or a single writer. See https://pkg.go.dev/sync#RWMutex for further details.

func NewRWMutexKV added in v0.5.0

func NewRWMutexKV() *RWMutexKV

Returns a properly initialized RWMutexKV.

func (*RWMutexKV) Lock added in v0.5.0

func (self *RWMutexKV) Lock(ctx context.Context, key string)

Lock the named mutex for writing purposes (exclusive). If the lock is already locked for reading or writing, blocks until the lock is available.

func (*RWMutexKV) RLock added in v0.5.0

func (self *RWMutexKV) RLock(ctx context.Context, key string)

Lock the named mutex for reading purposes (concurrent friendly). If the lock is already locked for writing, blocks until the lock is available.

func (*RWMutexKV) RUnlock added in v0.5.0

func (self *RWMutexKV) RUnlock(ctx context.Context, key string)

Release a single lock for reading. It is a run-time error if the mutex is not locked for reading.

func (*RWMutexKV) Unlock added in v0.5.0

func (self *RWMutexKV) Unlock(ctx context.Context, key string)

Release a single lock for writing. It is a run-time error if the mutex is not locked for writing.

type ResourceActionAPIModel added in v0.2.3

type ResourceActionAPIModel struct {
	Id           string                         `json:"id,omitempty"`
	Name         string                         `json:"name"`
	DisplayName  string                         `json:"displayName"`
	Description  string                         `json:"description"`
	ProviderName string                         `json:"providerName"`
	ResourceType string                         `json:"resourceType"`
	RunnableItem ResourceActionRunnableAPIModel `json:"runnableItem"`
	Criteria     any                            `json:"criteria,omitempty"`
	Status       string                         `json:"status"`

	FormDefinition *CustomFormAPIModel `json:"formDefinition,omitempty"`

	ProjectId string `json:"projectId,omitempty"`
	OrgId     string `json:"orgId,omitempty"`
}

ResourceActionAPIModel describes the resource API model.

type ResourceActionModel added in v0.2.3

type ResourceActionModel struct {
	Id           types.String                `tfsdk:"id"`
	Name         types.String                `tfsdk:"name"`
	DisplayName  types.String                `tfsdk:"display_name"`
	Description  types.String                `tfsdk:"description"`
	ProviderName types.String                `tfsdk:"provider_name"`
	ResourceId   types.String                `tfsdk:"resource_id"`
	ResourceType types.String                `tfsdk:"resource_type"`
	RunnableItem ResourceActionRunnableModel `tfsdk:"runnable_item"`
	Criteria     jsontypes.Normalized        `tfsdk:"criteria"`
	Status       types.String                `tfsdk:"status"`

	// Of type CustomFormModel
	FormDefinition types.Object `tfsdk:"form_definition"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

ResourceActionModel describes the resource data model.

func (ResourceActionModel) CreatePath added in v0.5.0

func (self ResourceActionModel) CreatePath() string

func (ResourceActionModel) DeletePath added in v0.5.0

func (self ResourceActionModel) DeletePath() string

func (ResourceActionModel) ForCustom added in v0.5.0

func (self ResourceActionModel) ForCustom() bool

func (*ResourceActionModel) FromAPI added in v0.2.3

func (ResourceActionModel) LockKey added in v0.5.0

func (self ResourceActionModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of resource actions. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (ResourceActionModel) ReadPath added in v0.5.0

func (self ResourceActionModel) ReadPath() string

func (ResourceActionModel) String added in v0.2.3

func (self ResourceActionModel) String() string

func (ResourceActionModel) ToAPI added in v0.2.3

func (ResourceActionModel) UpdatePath added in v0.5.0

func (self ResourceActionModel) UpdatePath() string

type ResourceActionResource added in v0.2.3

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

ResourceActionResource defines the resource implementation.

func (*ResourceActionResource) Configure added in v0.2.3

func (*ResourceActionResource) Create added in v0.2.3

func (*ResourceActionResource) Delete added in v0.2.3

func (*ResourceActionResource) ImportState added in v0.2.3

func (*ResourceActionResource) ManageIt added in v0.5.0

Implement the magic behind the create, update and delete methods.

func (*ResourceActionResource) Metadata added in v0.2.3

func (*ResourceActionResource) Read added in v0.2.3

func (*ResourceActionResource) Schema added in v0.2.3

func (*ResourceActionResource) Update added in v0.2.3

type ResourceActionRunnableAPIModel added in v0.2.3

type ResourceActionRunnableAPIModel struct {
	Id               string                    `json:"id,omitempty"`
	Name             string                    `json:"name"`
	Type             string                    `json:"type"`
	ProjectId        string                    `json:"projectId"`
	InputParameters  []ActionParameterAPIModel `json:"inputParameters"`
	OutputParameters []ActionParameterAPIModel `json:"outputParameters"`
}

ResourceActionRunnableAPIModel describes the resource API model.

type ResourceActionRunnableModel added in v0.2.3

type ResourceActionRunnableModel struct {
	Id               types.String           `tfsdk:"id"`
	Name             types.String           `tfsdk:"name"`
	Type             types.String           `tfsdk:"type"`
	ProjectId        types.String           `tfsdk:"project_id"`
	InputParameters  []ActionParameterModel `tfsdk:"input_parameters"`
	OutputParameters []ActionParameterModel `tfsdk:"output_parameters"`
}

ResourceActionRunnableModel describes the resource data model.

func (*ResourceActionRunnableModel) FromAPI added in v0.2.3

func (*ResourceActionRunnableModel) String added in v0.5.0

func (self *ResourceActionRunnableModel) String() string

func (ResourceActionRunnableModel) ToAPI added in v0.2.3

type SecretAPIModel added in v0.2.2

type SecretAPIModel struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name"`
	// Value
	Description string   `json:"description"`
	OrgId       string   `json:"orgId"`
	OrgScoped   bool     `json:"orgScoped"`
	ProjectIds  []string `json:"projectIds"`
	CreatedAt   string   `json:"createdAt"`
	CreatedBy   string   `json:"createdBy"`
	UpdatedAt   string   `json:"updatedAt"`
	UpdatedBy   string   `json:"updatedBy"`
}

SecretAPIModel describes the secret API model.

type SecretDataSource added in v0.2.2

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

SecretDataSource defines the data source implementation.

func (*SecretDataSource) Configure added in v0.2.2

func (*SecretDataSource) Metadata added in v0.2.2

func (*SecretDataSource) Read added in v0.2.2

func (*SecretDataSource) Schema added in v0.2.2

type SecretModel added in v0.2.2

type SecretModel struct {
	Id   types.String `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
	// Value
	Description types.String `tfsdk:"description"`
	OrgId       types.String `tfsdk:"org_id"`
	OrgScoped   types.Bool   `tfsdk:"org_scoped"`
	ProjectIds  types.Set    `tfsdk:"project_ids"`
	CreatedAt   types.String `tfsdk:"created_at"`
	CreatedBy   types.String `tfsdk:"created_by"`
	UpdatedAt   types.String `tfsdk:"updated_at"`
	UpdatedBy   types.String `tfsdk:"updated_by"`
}

SecretModel describes the secret model.

func (*SecretModel) FromAPI added in v0.2.2

func (self *SecretModel) FromAPI(
	ctx context.Context,
	raw SecretAPIModel,
) diag.Diagnostics

type SubscriptionAPIModel added in v0.1.1

type SubscriptionAPIModel struct {
	Id                  string `json:"id,omitempty"`
	Name                string `json:"name"`
	Description         string `json:"description"`
	Type                string `json:"type"`
	RunnableType        string `json:"runnableType"`
	RunnableId          string `json:"runnableId"`
	RecoverRunnableType string `json:"recoverRunnableType"`
	RecoverRunnableId   string `json:"recoverRunnableId"`
	EventTopicId        string `json:"eventTopicId"`

	Constraints map[string][]string `json:"constraints"`

	Blocking   bool   `json:"blocking"`
	Broadcast  bool   `json:"broadcast"`
	Contextual bool   `json:"contextual"`
	Criteria   string `json:"criteria"`
	Disabled   bool   `json:"disabled"`
	Priority   int64  `json:"priority"`
	System     bool   `json:"system"`
	Timeout    int64  `json:"timeout"`

	OrgId        string `json:"orgId"`
	OwnerId      string `json:"ownerId"`
	SubscriberId string `json:"subscriberId"`
}

SubscriptionAPIModel describes the resource API model.

type SubscriptionModel added in v0.1.1

type SubscriptionModel struct {
	Id                  types.String `tfsdk:"id"`
	Name                types.String `tfsdk:"name"`
	Description         types.String `tfsdk:"description"`
	Type                types.String `tfsdk:"type"`
	RunnableType        types.String `tfsdk:"runnable_type"`
	RunnableId          types.String `tfsdk:"runnable_id"`
	RecoverRunnableType types.String `tfsdk:"recover_runnable_type"`
	RecoverRunnableId   types.String `tfsdk:"recover_runnable_id"`
	EventTopicId        types.String `tfsdk:"event_topic_id"`

	ProjectIds types.Set `tfsdk:"project_ids"`

	Blocking   types.Bool   `tfsdk:"blocking"`
	Broadcast  types.Bool   `tfsdk:"broadcast"`
	Contextual types.Bool   `tfsdk:"contextual"`
	Criteria   types.String `tfsdk:"criteria"`
	Disabled   types.Bool   `tfsdk:"disabled"`
	Priority   types.Int64  `tfsdk:"priority"`
	System     types.Bool   `tfsdk:"system"`
	Timeout    types.Int64  `tfsdk:"timeout"`

	OrgId        types.String `tfsdk:"org_id"`
	OwnerId      types.String `tfsdk:"owner_id"`
	SubscriberId types.String `tfsdk:"subscriber_id"`
}

SubscriptionModel describes the resource data model.

func (SubscriptionModel) CreatePath added in v0.5.0

func (self SubscriptionModel) CreatePath() string

func (SubscriptionModel) DeletePath added in v0.5.0

func (self SubscriptionModel) DeletePath() string

func (*SubscriptionModel) FromAPI added in v0.1.1

func (*SubscriptionModel) GenerateId added in v0.1.1

func (self *SubscriptionModel) GenerateId()

func (SubscriptionModel) LockKey added in v0.5.0

func (self SubscriptionModel) LockKey() string

Return an appropriate key that can be used for naming mutexes. Create: Identifier can be used to prevent concurrent creation of subscriptions. Read Update Delete: Identifier can be used to prevent concurrent modifications on the instance.

func (SubscriptionModel) ReadPath added in v0.5.0

func (self SubscriptionModel) ReadPath() string

func (SubscriptionModel) String added in v0.2.3

func (self SubscriptionModel) String() string

func (SubscriptionModel) ToAPI added in v0.1.1

func (SubscriptionModel) UpdatePath added in v0.5.0

func (self SubscriptionModel) UpdatePath() string

type SubscriptionResource added in v0.1.1

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

SubscriptionResource defines the resource implementation.

func (*SubscriptionResource) Configure added in v0.1.1

func (*SubscriptionResource) Create added in v0.1.1

func (*SubscriptionResource) Delete added in v0.1.1

func (*SubscriptionResource) ImportState added in v0.1.1

func (*SubscriptionResource) Metadata added in v0.1.1

func (*SubscriptionResource) Read added in v0.1.1

func (*SubscriptionResource) Schema added in v0.1.1

func (*SubscriptionResource) Update added in v0.1.1

type UnorderedPropertiesAPIModel added in v0.4.0

type UnorderedPropertiesAPIModel map[string]PropertyAPIModel

UnorderedPropertiesAPIModel describes the resource API model.

type UnorderedPropertiesModel added in v0.4.0

type UnorderedPropertiesModel map[string]PropertyModel

UnorderedPropertiesModel describes the resource data model.

func (*UnorderedPropertiesModel) FromAPI added in v0.4.0

func (UnorderedPropertiesModel) ToAPI added in v0.4.0

Source Files

Jump to

Keyboard shortcuts

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