Documentation ¶
Index ¶
- Constants
- func New(version string) func() provider.Provider
- func NewIpDataSource() datasource.DataSource
- type IPDataSource
- func (d *IPDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d IPDataSource) GetSchema(_ context.Context) (tfsdk.Schema, diag.Diagnostics)
- func (d IPDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d IPDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- type IPResponse
- type IpDataSourceModel
- type IpProvider
- func (p *IpProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *IpProvider) DataSources(_ context.Context) []func() datasource.DataSource
- func (p *IpProvider) GetSchema(_ context.Context) (tfsdk.Schema, diag.Diagnostics)
- func (p *IpProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse)
- func (p *IpProvider) Resources(_ context.Context) []func() resource.Resource
- type ProviderModel
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 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 (d *IPDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (IPDataSource) GetSchema ¶ added in v0.0.8
func (d IPDataSource) GetSchema(_ context.Context) (tfsdk.Schema, diag.Diagnostics)
func (IPDataSource) Metadata ¶ added in v0.0.8
func (d IPDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (IPDataSource) Read ¶ added in v0.0.8
func (d IPDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
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 (p *IpProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
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 (p *IpProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse)
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.
Click to show internal directories.
Click to hide internal directories.