provider

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SiteNotFoundError = "Site not found"

Functions

func GenerateIdFromConfig

func GenerateIdFromConfig(config string) string

func New

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

New is a helper function to get the provider implementation.

func NewSdwanSiteDataSource

func NewSdwanSiteDataSource() datasource.DataSource

func NewSdwanSiteResource

func NewSdwanSiteResource() resource.Resource

func ProviderParamDescription

func ProviderParamDescription(desc, defaultValue, envName, jsonName string) string

func TimeoutFrom

func TimeoutFrom(v types.String) time.Duration

func TimeoutSchema

func TimeoutSchema(v string) schema.StringAttribute

Types

type SdwanDoSiteRequest

type SdwanDoSiteRequest struct {
	ClientId     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
	Scope        string `json:"scope,omitempty"`
	Config       string `json:"config,omitempty"`
}

SdwanDoSiteRequest is the JSON that Terraform sends for do_site and the config status URI.

type SdwanDoSiteResponse

type SdwanDoSiteResponse struct {
	Errors []string `json:"errors"`

	Uuid       string `json:"uuid"`
	IsDeployed bool   `json:"is_deployed"`
}

SdwanDoSiteResponse is the JSON sent back from both do_site and the config status URI.

type SdwanProvider

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

SdwanProvider is the provider implementation.

func (*SdwanProvider) Configure

Configure prepares the provider.

func (*SdwanProvider) DataSources

func (p *SdwanProvider) DataSources(_ context.Context) []func() datasource.DataSource

DataSources defines the data sources for this provider.

func (*SdwanProvider) Metadata

Metadata returns the provider type name.

func (*SdwanProvider) Resources

func (p *SdwanProvider) Resources(_ context.Context) []func() resource.Resource

Resources defines the data sources for this provider.

func (*SdwanProvider) Schema

Schema defines the provider-level schema for configuration data.

type SdwanProviderModel

type SdwanProviderModel struct {
	Host         types.String `tfsdk:"host"`
	Port         types.Int64  `tfsdk:"port"`
	Protocol     types.String `tfsdk:"protocol"`
	ClientId     types.String `tfsdk:"client_id"`
	ClientSecret types.String `tfsdk:"client_secret"`
	Scope        types.String `tfsdk:"scope"`
	Logging      types.String `tfsdk:"logging"`
	AuthFile     types.String `tfsdk:"auth_file"`
	AuthUrl      types.String `tfsdk:"auth_url"`
}

SdwanProviderModel maps provider schema data to a Go type.

type SdwanPullSiteRequest

type SdwanPullSiteRequest struct {
	Site         string `json:"site_name"`
	ClientId     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
	Scope        string `json:"scope,omitempty"`
}

SdwanPullSiteRequest is the JSON sent to pull_site.

type SdwanPullSiteResponse

type SdwanPullSiteResponse struct {
	Errors []string `json:"errors"`

	Config string `json:"config"`
}

SdwanPullSiteResponse is the JSON sent back from pull_site.

Jump to

Keyboard shortcuts

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