provider

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProviderURL = "https://ifconfig.co/"
View Source
const DefaultRateLimitBurst = 1
View Source
const DefaultRateLimitRate = "500ms"
View Source
const DefaultTimeout = "5s"
View Source
const IPUnknown = "unknown"
View Source
const IPVersion4 = "v4"
View Source
const IPVersion6 = "v6"
View Source
const TypeName = "publicip"
View Source
const UserAgent = "terraform-provider-publicip"

Variables

This section is empty.

Functions

func New

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

func NewIpDataSource added in v0.0.8

func NewIpDataSource() datasource.DataSource

Types

type IPDataSource added in v0.0.8

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

func (*IPDataSource) Configure added in v0.0.8

func (IPDataSource) GetSchema added in v0.0.8

func (IPDataSource) Metadata added in v0.0.8

func (IPDataSource) Read added in v0.0.8

type IPResponse

type IPResponse struct {
	IP         string      `json:"ip,omitempty"`
	IPDecimal  json.Number `json:"ip_decimal,omitempty"`
	Country    string      `json:"country,omitempty"`
	CountryISO string      `json:"country_iso,omitempty"`
	CountryEU  bool        `json:"country_eu,omitempty"`
	RegionName string      `json:"region_name,omitempty"`
	RegionCode string      `json:"region_code,omitempty"`
	ZIPCode    string      `json:"zip_code,omitempty"`
	City       string      `json:"city,omitempty"`
	Latitude   float32     `json:"latitude,omitempty"`
	Longitude  float32     `json:"longitude,omitempty"`
	TimeZone   string      `json:"time_zone,omitempty"`
	ASN        string      `json:"asn,omitempty"`
	ASNOrg     string      `json:"asn_org,omitempty"`
	UserAgent  struct {
		Product  string `json:"product,omitempty"`
		Version  string `json:"version,omitempty"`
		Comment  string `json:"comment,omitempty"`
		RAWValue string `json:"raw_value,omitempty"`
	} `json:"user_agent"`
}

type IpDataSourceModel added in v0.0.8

type IpDataSourceModel struct {
	ID        types.String `tfsdk:"id"`
	IPVersion types.String `tfsdk:"ip_version"`
	IsIPv6    types.Bool   `tfsdk:"is_ipv6"`
	IsIPv4    types.Bool   `tfsdk:"is_ipv4"`
	IP        types.String `tfsdk:"ip"`
	ASNID     types.String `tfsdk:"asn_id"`
	ASNOrg    types.String `tfsdk:"asn_org"`
	SourceIP  types.String `tfsdk:"source_ip"`
}

type IpProvider added in v0.0.8

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

func (*IpProvider) Configure added in v0.0.8

func (*IpProvider) DataSources added in v0.0.8

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

func (*IpProvider) GetSchema added in v0.0.8

func (p *IpProvider) GetSchema(_ context.Context) (tfsdk.Schema, diag.Diagnostics)

func (*IpProvider) Metadata added in v0.0.8

func (*IpProvider) Resources added in v0.0.8

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

type ProviderModel added in v0.0.8

type ProviderModel struct {
	ProviderURL    types.String `tfsdk:"provider_url"`
	Timeout        types.String `tfsdk:"timeout"`
	RateLimitRate  types.String `tfsdk:"rate_limit_rate"`
	RateLimitBurst types.Int64  `tfsdk:"rate_limit_burst"`
	// contains filtered or unexported fields
}

ProviderModel can be used to store data from the Terraform configuration.

Jump to

Keyboard shortcuts

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