internal
import "github.com/SuperBuker/terraform-provider-dns-he-net/internal"
Index
Constants
const uaEnvVar = "TF_APPEND_USER_AGENT"
Variables
Ensure the implementation satisfies the expected interfaces
var (
_ provider.Provider = &dnsProvider{}
)
func New(build BuildFlags, run RunFlags) func() provider.Provider
New is a helper function to simplify provider server and testing implementation.
func UserAgentString(ctx context.Context, version, tfVersion string) (ua string)
UserAgentString returns the User-Agent string to use for HTTP requests.
type BuildFlags struct {
Version string
Commit string
Date string
}
type RunFlags struct {
Debug bool
}
dnsProvider is the provider implementation.
type dnsProvider struct {
Build BuildFlags
Run RunFlags
}
func (p *dnsProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
Configure prepares a dns.he.net "API" client for data sources and resources.
func (p *dnsProvider) DataSources(_ context.Context) []func() datasource.DataSource
DataSources defines the data sources implemented in the provider.
func (p *dnsProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse)
Metadata returns the provider type name.
func (*dnsProvider) Resources
func (p *dnsProvider) Resources(_ context.Context) []func() resource.Resource
Resources defines the resources implemented in the provider.
func (*dnsProvider) Schema
func (p *dnsProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse)
Schema defines the provider-level schema for configuration data.
dnsProviderModel maps provider schema data to a Go type.
type dnsProviderModel struct {
Username types.String `tfsdk:"username"`
Password types.String `tfsdk:"password"`
OTPSecret types.String `tfsdk:"otp_secret"`
StoreType types.String `tfsdk:"store_type"`
}
Generated by gomarkdoc