internal

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

README

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

func New(build BuildFlags, run RunFlags) func() provider.Provider

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

func UserAgentString

func UserAgentString(ctx context.Context, version, tfVersion string) (ua string)

UserAgentString returns the User-Agent string to use for HTTP requests.

type BuildFlags

type BuildFlags struct {
    Version string
    Commit  string
    Date    string
}

type RunFlags

type RunFlags struct {
    Debug bool
}

type dnsProvider

dnsProvider is the provider implementation.

type dnsProvider struct {
    Build BuildFlags
    Run   RunFlags
}
func (*dnsProvider) Configure
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 (*dnsProvider) DataSources
func (p *dnsProvider) DataSources(_ context.Context) []func() datasource.DataSource

DataSources defines the data sources implemented in the provider.

func (*dnsProvider) Metadata
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.

type dnsProviderModel

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(build BuildFlags, run RunFlags) func() provider.Provider

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

func UserAgentString

func UserAgentString(ctx context.Context, version, tfVersion string) (ua string)

UserAgentString returns the User-Agent string to use for HTTP requests.

Types

type BuildFlags

type BuildFlags struct {
	Version string
	Commit  string
	Date    string
}

type RunFlags

type RunFlags struct {
	Debug bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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