provider

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MPL-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanString added in v0.1.1

func CleanString(value string) string

func GetDataSourceClient

func GetDataSourceClient(
	ctx context.Context,
	req datasource.ConfigureRequest,
	resp *datasource.ConfigureResponse,
) *resty.Client

func GetIdFromLocation

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

func GetResourceClient

func GetResourceClient(
	ctx context.Context,
	req resource.ConfigureRequest,
	resp *resource.ConfigureResponse,
) *resty.Client

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 NewExampleFunction

func NewExampleFunction() function.Function

func NewIconDataSource

func NewIconDataSource() datasource.DataSource

func NewIconResource

func NewIconResource() resource.Resource

func NewSubscriptionResource added in v0.1.1

func NewSubscriptionResource() resource.Resource

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

Types

type ABXActionAPIModel added in v0.1.1

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

	RuntimeName    string            `json:"runtime"`
	RuntimeVersion string            `json:"runtimeVersion"`
	MemoryInMB     int64             `json:"memoryInMB"`
	TimeoutSeconds int64             `json:"timeoutSeconds"`
	Entrypoint     string            `json:"entrypoint"`
	Dependencies   string            `json:"dependencies"`
	Inputs         map[string]string `json:"inputs"`

	Source string `json:"source"`

	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"`
	MemoryInMB     types.Int64  `tfsdk:"memory_in_mb"`
	TimeoutSeconds types.Int64  `tfsdk:"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"`

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

ABXActionModel describes the resource data model.

func (*ABXActionModel) FromAPI added in v0.1.1

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

func (*ABXActionModel) ToAPI added in v0.1.1

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"`
	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) FromAPI added in v0.1.1

func (*ABXConstantModel) ToAPI added in v0.1.1

func (self *ABXConstantModel) ToAPI() ABXConstantAPIModel

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"`
	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) FromAPI added in v0.2.0

func (*ABXSensitiveConstantModel) ToAPI added in v0.2.0

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 AccessTokenResponse

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

type AriaClientConfig

type AriaClientConfig 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
}

func (*AriaClientConfig) Check

func (self *AriaClientConfig) Check() error

func (*AriaClientConfig) Client

func (self *AriaClientConfig) Client() *resty.Client

func (*AriaClientConfig) GetAccessToken

func (self *AriaClientConfig) GetAccessToken() error

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"`
	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 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.

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 SubscriptionAPIModel added in v0.1.1

type SubscriptionAPIModel struct {
	Id                  string `json:"id"`
	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) FromAPI added in v0.1.1

func (*SubscriptionModel) GenerateId added in v0.1.1

func (self *SubscriptionModel) GenerateId()

func (*SubscriptionModel) ToAPI added in v0.1.1

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

Jump to

Keyboard shortcuts

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