Documentation ¶
Index ¶
- func GetWorkspace(ctx context.Context, workspaces Workspaces, workspaceName string) (bool, error)
- func New(version string) func() provider.Provider
- func NewAccessPolicyResource() resource.Resource
- func NewWorkspaceResource() resource.Resource
- func SliceDifference(a, b []types.String) []string
- type KeyValuePair
- type ProviderData
- type TectonProvider
- func (p *TectonProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *TectonProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *TectonProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *TectonProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *TectonProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type TectonProviderModel
- type Workspaces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWorkspace ¶
Scans prefetched workspace data for a particular workspace. Returns (isLive, error) where isLive is true if the workspace is a live workspace, and false if it is a development workspace. If error != nil, then the value of isLive is undefined.
func NewAccessPolicyResource ¶
NewWorkspaceResource is a helper function to simplify the provider implementation.
func NewWorkspaceResource ¶
NewWorkspaceResource is a helper function to simplify the provider implementation.
func SliceDifference ¶
Returns elements that are in a that are not in b.
Types ¶
type KeyValuePair ¶
A type to store a key-value pair in a map.
type ProviderData ¶
type ProviderData struct { CommandEnv []string WorkspaceData Workspaces }
ProviderData stores all the data that datasources and resources need from the provider.
type TectonProvider ¶
type TectonProvider struct {
// contains filtered or unexported fields
}
TectonProvider defines the provider implementation.
func (*TectonProvider) Configure ¶
func (p *TectonProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
Configure prepares a Tecton API client for data sources and resources.
func (*TectonProvider) DataSources ¶
func (p *TectonProvider) DataSources(ctx context.Context) []func() datasource.DataSource
Resources defines the resources implemented in the provider.
func (*TectonProvider) Metadata ¶
func (p *TectonProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
Metadata returns the provider type name.
func (*TectonProvider) Resources ¶
func (p *TectonProvider) Resources(ctx context.Context) []func() resource.Resource
DataSources defines the data sources implemented in the provider.
func (*TectonProvider) Schema ¶
func (p *TectonProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
Schema defines the provider-level schema for configuration data.
type TectonProviderModel ¶
type TectonProviderModel struct { Url types.String `tfsdk:"url"` ApiKey types.String `tfsdk:"api_key"` }
TectonProviderModel maps provider schema data to a Go type.
type Workspaces ¶
Workspaces stores all the workspaces we've found on the Tecton instance.
func ListWorkspaces ¶
func ListWorkspaces(ctx context.Context, commandEnv []string) (Workspaces, error)
Query the complete list of workspaces in the Tecton instance and parse the output.