provider

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSystemActor

func IsSystemActor(a *models.User) bool

func New

func New() provider.Provider

New is a helper function to simplify provider server and testing implementation.

func NewCheckoutKeyResource added in v0.7.0

func NewCheckoutKeyResource() resource.Resource

func NewCheckoutKeysDataSource added in v0.7.0

func NewCheckoutKeysDataSource() datasource.DataSource

func NewContextDataSource added in v0.8.2

func NewContextDataSource() datasource.DataSource

func NewContextEnvVarResource added in v0.9.0

func NewContextEnvVarResource() resource.Resource

func NewContextResource added in v0.8.0

func NewContextResource() resource.Resource

func NewEnvVarResource added in v0.6.0

func NewEnvVarResource() resource.Resource

func NewProjectDataSource added in v0.5.0

func NewProjectDataSource() datasource.DataSource

func NewProjectResource added in v0.12.0

func NewProjectResource() resource.Resource

func NewRunnerResourceClassResource added in v0.10.0

func NewRunnerResourceClassResource() resource.Resource

func NewRunnerResourceClassesDataSource added in v0.10.0

func NewRunnerResourceClassesDataSource() datasource.DataSource

func NewRunnerTokenResource added in v0.10.0

func NewRunnerTokenResource() resource.Resource

func NewRunnerTokensDataSource added in v0.10.0

func NewRunnerTokensDataSource() datasource.DataSource

func NewScheduleResource

func NewScheduleResource() resource.Resource

func NewWebhookResource

func NewWebhookResource() resource.Resource

func NewWebhooksDataSource

func NewWebhooksDataSource() datasource.DataSource

Types

type CheckoutKeyResource added in v0.7.0

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

func (*CheckoutKeyResource) Configure added in v0.7.0

Configure adds the provider configured client to the data source.

func (*CheckoutKeyResource) Create added in v0.7.0

Create creates the resource and sets the initial Terraform state.

func (*CheckoutKeyResource) Delete added in v0.7.0

func (*CheckoutKeyResource) Metadata added in v0.7.0

func (*CheckoutKeyResource) Read added in v0.7.0

Read refreshes the Terraform state with the latest data.

func (*CheckoutKeyResource) Schema added in v0.7.0

func (*CheckoutKeyResource) Update added in v0.7.0

type CheckoutKeyResourceModel added in v0.7.0

type CheckoutKeyResourceModel struct {
	ProjectSlug types.String `tfsdk:"project_slug"`
	PublicKey   types.String `tfsdk:"public_key"`
	Fingerprint types.String `tfsdk:"fingerprint"`
	Type        types.String `tfsdk:"type"`
	Preferred   types.Bool   `tfsdk:"preferred"`
	CreatedAt   types.String `tfsdk:"created_at"`
	Id          types.String `tfsdk:"id"`
}

type CheckoutKeysDataSource added in v0.7.0

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

func (*CheckoutKeysDataSource) Configure added in v0.7.0

func (*CheckoutKeysDataSource) Metadata added in v0.7.0

func (*CheckoutKeysDataSource) Read added in v0.7.0

func (*CheckoutKeysDataSource) Schema added in v0.7.0

type CheckoutKeysDataSourceModel added in v0.7.0

type CheckoutKeysDataSourceModel struct {
	ProjectSlug types.String `tfsdk:"project_slug"`
	Keys        []keyModel   `tfsdk:"keys"`
	Id          types.String `tfsdk:"id"`
}

CheckoutKeysDataSourceModel describes the data source data model.

type CircleciAPIClient

type CircleciAPIClient struct {
	Client       *api.Circleci
	RunnerClient *rapi.Circleci
	V1Client     *http.Client
	Hostname     string
	Auth         runtime.ClientAuthInfoWriter
}

type CircleciProvider

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

CircleciProvider defines the provider implementation.

func (*CircleciProvider) Configure

func (*CircleciProvider) DataSources

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

func (*CircleciProvider) Metadata

func (*CircleciProvider) Resources

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

func (*CircleciProvider) Schema

type CircleciProviderModel

type CircleciProviderModel struct {
	ApiToken types.String `tfsdk:"api_token"`
	Hostname types.String `tfsdk:"hostname"`
}

CircleciProviderModel describes the provider data model.

type ContextDataSource added in v0.8.2

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

func (*ContextDataSource) Configure added in v0.8.2

func (*ContextDataSource) Metadata added in v0.8.2

func (*ContextDataSource) Read added in v0.8.2

func (*ContextDataSource) Schema added in v0.8.2

type ContextDataSourceModel added in v0.8.2

type ContextDataSourceModel struct {
	Name      types.String `tfsdk:"name"`
	Owner     ownerModel   `tfsdk:"owner"`
	Id        types.String `tfsdk:"id"`
	CreatedAt types.String `tfsdk:"created_at"`
}

ContextDataSourceModel describes the data source data model.

type ContextEnvVarResource added in v0.9.0

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

func (*ContextEnvVarResource) Configure added in v0.9.0

Configure adds the provider configured client to the data source.

func (*ContextEnvVarResource) Create added in v0.9.0

Create creates the resource and sets the initial Terraform state.

func (*ContextEnvVarResource) Delete added in v0.9.0

func (*ContextEnvVarResource) Metadata added in v0.9.0

func (*ContextEnvVarResource) Read added in v0.9.0

Read refreshes the Terraform state with the latest data.

func (*ContextEnvVarResource) Schema added in v0.9.0

func (*ContextEnvVarResource) Update added in v0.9.0

type ContextEnvVarResourceModel added in v0.9.0

type ContextEnvVarResourceModel struct {
	ContextId types.String `tfsdk:"context_id"`
	Name      types.String `tfsdk:"name"`
	Value     types.String `tfsdk:"value"`
	Id        types.String `tfsdk:"id"`
	CreatedAt types.String `tfsdk:"created_at"`
	UpdatedAt types.String `tfsdk:"updated_at"`
}

type ContextResource added in v0.8.0

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

func (*ContextResource) Configure added in v0.8.0

Configure adds the provider configured client to the data source.

func (*ContextResource) Create added in v0.8.0

Create creates the resource and sets the initial Terraform state.

func (*ContextResource) Delete added in v0.8.0

func (*ContextResource) ImportState added in v0.11.1

func (*ContextResource) Metadata added in v0.8.0

func (*ContextResource) Read added in v0.8.0

Read refreshes the Terraform state with the latest data.

func (*ContextResource) Schema added in v0.8.0

func (*ContextResource) Update added in v0.8.0

type ContextResourceModel added in v0.8.0

type ContextResourceModel struct {
	Id        types.String `tfsdk:"id"`
	CreatedAt types.String `tfsdk:"created_at"`
	Name      types.String `tfsdk:"name"`
	Owner     ownerModel   `tfsdk:"owner"`
}

type EnvVarResource added in v0.6.0

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

func (*EnvVarResource) Configure added in v0.6.0

Configure adds the provider configured client to the data source.

func (*EnvVarResource) Create added in v0.6.0

Create creates the resource and sets the initial Terraform state.

func (*EnvVarResource) Delete added in v0.6.0

func (*EnvVarResource) Metadata added in v0.6.0

func (*EnvVarResource) Read added in v0.6.0

Read refreshes the Terraform state with the latest data.

func (*EnvVarResource) Schema added in v0.6.0

func (*EnvVarResource) Update added in v0.6.0

type EnvVarResourceModel added in v0.6.0

type EnvVarResourceModel struct {
	ProjectSlug types.String `tfsdk:"project_slug"`
	Name        types.String `tfsdk:"name"`
	Value       types.String `tfsdk:"value"`
	Id          types.String `tfsdk:"id"`
}

type ProjectDataSource added in v0.5.0

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

func (*ProjectDataSource) Configure added in v0.5.0

func (*ProjectDataSource) Metadata added in v0.5.0

func (*ProjectDataSource) Read added in v0.5.0

func (*ProjectDataSource) Schema added in v0.5.0

type ProjectDataSourceModel added in v0.5.0

type ProjectDataSourceModel struct {
	Id               types.String `tfsdk:"id"`
	Slug             types.String `tfsdk:"slug"`
	Name             types.String `tfsdk:"name"`
	OrganizationName types.String `tfsdk:"organization_name"`
	OrganizationSlug types.String `tfsdk:"organization_slug"`
	OrganizationId   types.String `tfsdk:"organization_id"`
	VcsProvider      types.String `tfsdk:"vcs_provider"`
	VcsDefaultBranch types.String `tfsdk:"vcs_default_branch"`
	VcsURL           types.String `tfsdk:"vcs_url"`
}

ProjectDataSourceModel describes the data source data model.

type ProjectResource added in v0.12.0

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

func (*ProjectResource) Configure added in v0.12.0

Configure adds the provider configured client to the data source.

func (*ProjectResource) Create added in v0.12.0

Create creates the resource and sets the initial Terraform state.

func (*ProjectResource) Delete added in v0.12.0

func (*ProjectResource) Metadata added in v0.12.0

func (*ProjectResource) Read added in v0.12.0

Read refreshes the Terraform state with the latest data.

func (*ProjectResource) Schema added in v0.12.0

func (*ProjectResource) Update added in v0.12.0

type ProjectResourceModel added in v0.12.0

type ProjectResourceModel struct {
	Id               types.String `tfsdk:"id"`
	Slug             types.String `tfsdk:"slug"`
	Name             types.String `tfsdk:"name"`
	OrganizationName types.String `tfsdk:"organization_name"`
	OrganizationSlug types.String `tfsdk:"organization_slug"`
	OrganizationId   types.String `tfsdk:"organization_id"`
	VcsProvider      types.String `tfsdk:"vcs_provider"`
	VcsDefaultBranch types.String `tfsdk:"vcs_default_branch"`
	VcsURL           types.String `tfsdk:"vcs_url"`
}

type RunnerResourceClassResource added in v0.10.0

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

func (*RunnerResourceClassResource) Configure added in v0.10.0

Configure adds the provider configured client to the data source.

func (*RunnerResourceClassResource) Create added in v0.10.0

Create creates the resource and sets the initial Terraform state.

func (*RunnerResourceClassResource) Delete added in v0.10.0

func (*RunnerResourceClassResource) ImportState added in v0.11.1

func (*RunnerResourceClassResource) Metadata added in v0.10.0

func (*RunnerResourceClassResource) Read added in v0.10.0

Read refreshes the Terraform state with the latest data.

func (*RunnerResourceClassResource) Schema added in v0.10.0

func (*RunnerResourceClassResource) Update added in v0.10.0

type RunnerResourceClassResourceModel added in v0.10.0

type RunnerResourceClassResourceModel struct {
	Id            types.String `tfsdk:"id"`
	Description   types.String `tfsdk:"description"`
	ResourceClass types.String `tfsdk:"resource_class"`
}

type RunnerResourceClassesDataSource added in v0.10.0

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

func (*RunnerResourceClassesDataSource) Configure added in v0.10.0

func (*RunnerResourceClassesDataSource) Metadata added in v0.10.0

func (*RunnerResourceClassesDataSource) Read added in v0.10.0

func (*RunnerResourceClassesDataSource) Schema added in v0.10.0

type RunnerResourceClassesDataSourceModel added in v0.10.0

type RunnerResourceClassesDataSourceModel struct {
	Namespace       types.String         `tfsdk:"namespace"`
	ResourceClasses []resourceClassModel `tfsdk:"resource_classes"`
	Id              types.String         `tfsdk:"id"`
}

type RunnerTokenResource added in v0.10.0

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

func (*RunnerTokenResource) Configure added in v0.10.0

Configure adds the provider configured client to the data source.

func (*RunnerTokenResource) Create added in v0.10.0

Create creates the resource and sets the initial Terraform state.

func (*RunnerTokenResource) Delete added in v0.10.0

func (*RunnerTokenResource) Metadata added in v0.10.0

func (*RunnerTokenResource) Read added in v0.10.0

Read refreshes the Terraform state with the latest data.

func (*RunnerTokenResource) Schema added in v0.10.0

func (*RunnerTokenResource) Update added in v0.10.0

type RunnerTokenResourceModel added in v0.10.0

type RunnerTokenResourceModel struct {
	Id            types.String `tfsdk:"id"`
	Nickname      types.String `tfsdk:"nickname"`
	ResourceClass types.String `tfsdk:"resource_class"`
	Token         types.String `tfsdk:"token"`
	CreatedAt     types.String `tfsdk:"created_at"`
}

type RunnerTokensDataSource added in v0.10.0

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

func (*RunnerTokensDataSource) Configure added in v0.10.0

func (*RunnerTokensDataSource) Metadata added in v0.10.0

func (*RunnerTokensDataSource) Read added in v0.10.0

func (*RunnerTokensDataSource) Schema added in v0.10.0

type RunnerTokensDataSourceModel added in v0.10.0

type RunnerTokensDataSourceModel struct {
	ResourceClass types.String `tfsdk:"resource_class"`
	Tokens        []tokenModel `tfsdk:"tokens"`
	Id            types.String `tfsdk:"id"`
}

type ScheduleResource

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

func (*ScheduleResource) Configure

Configure adds the provider configured client to the data source.

func (*ScheduleResource) Create

Create creates the resource and sets the initial Terraform state.

func (*ScheduleResource) Delete

func (*ScheduleResource) ImportState added in v0.7.2

func (*ScheduleResource) Metadata

func (*ScheduleResource) Read

Read refreshes the Terraform state with the latest data.

func (*ScheduleResource) Schema

func (*ScheduleResource) Update

type ScheduleResourceModel

type ScheduleResourceModel struct {
	Id                 types.String   `tfsdk:"id"`
	CreatedAt          types.String   `tfsdk:"created_at"`
	UpdatedAt          types.String   `tfsdk:"updated_at"`
	ProjectSlug        types.String   `tfsdk:"project_slug"`
	Name               types.String   `tfsdk:"name"`
	Description        types.String   `tfsdk:"description"`
	AttributionActor   types.String   `tfsdk:"actor"`
	PipelineParameters types.String   `tfsdk:"parameters"`
	Branch             types.String   `tfsdk:"branch"`
	Tag                types.String   `tfsdk:"tag"`
	Timetable          timetableModel `tfsdk:"timetable"`
}

type WebhookResource

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

func (*WebhookResource) Configure

Configure adds the provider configured client to the data source.

func (*WebhookResource) Create

Create creates the resource and sets the initial Terraform state.

func (*WebhookResource) Delete

func (*WebhookResource) ImportState added in v0.7.2

func (*WebhookResource) Metadata

func (*WebhookResource) Read

Read refreshes the Terraform state with the latest data.

func (*WebhookResource) Schema

func (*WebhookResource) Update

type WebhookResourceModel

type WebhookResourceModel struct {
	Id            types.String `tfsdk:"id"`
	CreatedAt     types.String `tfsdk:"created_at"`
	UpdatedAt     types.String `tfsdk:"updated_at"`
	Name          types.String `tfsdk:"name"`
	URL           types.String `tfsdk:"url"`
	SigningSecret types.String `tfsdk:"signing_secret"`
	ProjectID     types.String `tfsdk:"project_id"`
	VerifyTLS     types.Bool   `tfsdk:"verify_tls"`
	Events        types.Set    `tfsdk:"events"`
}

type WebhooksDataSource

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

func (*WebhooksDataSource) Configure

func (*WebhooksDataSource) Metadata

func (*WebhooksDataSource) Read

func (*WebhooksDataSource) Schema

type WebhooksDataSourceModel

type WebhooksDataSourceModel struct {
	ProjectId types.String   `tfsdk:"project_id"`
	Webhooks  []webhookModel `tfsdk:"webhooks"`
	Id        types.String   `tfsdk:"id"`
}

WebhookDataSourceModel describes the data source data model.

Jump to

Keyboard shortcuts

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