Documentation
¶
Overview ¶
Package oraclecloud implements a libdns provider for Oracle Cloud Infrastructure DNS.
Index ¶
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) ListZones(ctx context.Context) ([]libdns.Zone, error)
- func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// Auth selects how the provider obtains OCI credentials: auto, api_key,
// config_file, environment, or instance_principal.
Auth string `json:"auth,omitempty"`
// ConfigFile is the path to the OCI config file, usually ~/.oci/config.
ConfigFile string `json:"config_file,omitempty"`
// ConfigProfile is the profile name within ConfigFile to use.
ConfigProfile string `json:"config_profile,omitempty"`
// PrivateKey is the PEM-encoded API signing key content.
PrivateKey string `json:"private_key,omitempty"`
// PrivateKeyPath is the path to the PEM-encoded API signing key file.
PrivateKeyPath string `json:"private_key_path,omitempty"`
// PrivateKeyPassphrase is the passphrase for the API signing key, if any.
PrivateKeyPassphrase string `json:"private_key_passphrase,omitempty"`
// TenancyOCID is the OCID of the tenancy that owns the credentials.
TenancyOCID string `json:"tenancy_ocid,omitempty"`
// UserOCID is the OCID of the OCI user for API key authentication.
UserOCID string `json:"user_ocid,omitempty"`
// Fingerprint is the fingerprint of the registered OCI API signing key.
Fingerprint string `json:"fingerprint,omitempty"`
// Region is the OCI region used for DNS API requests.
Region string `json:"region,omitempty"`
// Scope selects the DNS zone scope: GLOBAL or PRIVATE.
Scope string `json:"scope,omitempty"`
// ViewID identifies the private DNS view when operating on private zones by name.
ViewID string `json:"view_id,omitempty"`
// CompartmentID identifies the compartment to search when listing zones.
CompartmentID string `json:"compartment_id,omitempty"`
// contains filtered or unexported fields
}
Provider facilitates DNS record manipulation with Oracle Cloud Infrastructure.
Authentication is intentionally kept simple:
- explicit API key fields on the provider
- OCI config file/profile
- OCI_* environment variables
The provider is safe for concurrent use.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records to the zone. It returns the records that were added.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the specified records from the zone. It returns the records that were deleted.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.