Documentation
¶
Index ¶
- type BunnyClient
- func (c *BunnyClient) CreateRecord(ctx context.Context, zoneID string, r CreateRecordRequest) (*Record, error)
- func (c *BunnyClient) DeleteRecord(ctx context.Context, zoneID int64, recordID int64) error
- func (c *BunnyClient) ListZones(ctx context.Context, r ListZonesRequest) (*ListZonesResponse, error)
- func (c *BunnyClient) UpdateRecord(ctx context.Context, zoneID int64, recordID int64, r UpdateRecordRequest) error
- type Client
- type CreateRecordRequest
- type HTTPDoer
- type ListZonesRequest
- type ListZonesResponse
- type Options
- type Provider
- func (p *Provider) AdjustEndpoints(incoming []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)
- func (p *Provider) ApplyChanges(ctx context.Context, changes *plan.Changes) error
- func (p *Provider) GetDomainFilter() endpoint.DomainFilterInterface
- func (p *Provider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)
- type Record
- type RecordType
- type UpdateRecordRequest
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BunnyClient ¶
type BunnyClient struct {
// contains filtered or unexported fields
}
func (*BunnyClient) CreateRecord ¶
func (c *BunnyClient) CreateRecord(ctx context.Context, zoneID string, r CreateRecordRequest) (*Record, error)
func (*BunnyClient) DeleteRecord ¶
func (*BunnyClient) ListZones ¶
func (c *BunnyClient) ListZones(ctx context.Context, r ListZonesRequest) (*ListZonesResponse, error)
func (*BunnyClient) UpdateRecord ¶
func (c *BunnyClient) UpdateRecord(ctx context.Context, zoneID int64, recordID int64, r UpdateRecordRequest) error
type Client ¶
type Client interface { ListZones(ctx context.Context, r ListZonesRequest) (*ListZonesResponse, error) CreateRecord(ctx context.Context, zoneID string, r CreateRecordRequest) (*Record, error) UpdateRecord(ctx context.Context, zoneID int64, recordID int64, r UpdateRecordRequest) error DeleteRecord(ctx context.Context, zoneID int64, recordID int64) error }
func NewDNSClient ¶
type CreateRecordRequest ¶
type CreateRecordRequest struct { Type RecordType `json:"Type"` TTLSeconds int `json:"Ttl"` Value string `json:"Value"` Name string `json:"Name"` }
type ListZonesRequest ¶
type ListZonesResponse ¶
type Options ¶
type Options struct { APIKey string `env:"API_KEY, required"` DryRun bool `env:"DRY_RUN, default=false"` ExcludeDomains []string `env:"EXCLUDE_DOMAINS"` ExcludeDomainsRegexp string `env:"EXCLUDE_DOMAINS_REGEXP"` IncludeDomains []string `env:"INCLUDE_DOMAINS"` IncludeDomainsRegexp string `env:"INCLUDE_DOMAINS_REGEXP"` }
type Provider ¶
type Provider struct { Options Options // contains filtered or unexported fields }
func NewProvider ¶
func (*Provider) AdjustEndpoints ¶
AdjustEndpoints canonicalizes a set of candidate endpoints. It is called with a set of candidate endpoints obtained from the various sources. It returns a set modified as required by the provider. The provider is responsible for adding, removing, and modifying the ProviderSpecific properties to match the endpoints that the provider returns in `Records` so that the change plan will not have unnecessary (potentially failing) changes. It may also modify other fields, add, or remove Endpoints. It is permitted to modify the supplied endpoints.
func (*Provider) ApplyChanges ¶
func (*Provider) GetDomainFilter ¶
func (p *Provider) GetDomainFilter() endpoint.DomainFilterInterface
GetDomainFilter returns the domain filter used by this provider.
type Record ¶
type Record struct { ID int64 `json:"Id"` Type RecordType `json:"Type"` TTLSeconds int `json:"Ttl"` Value string `json:"Value"` Name string `json:"Name"` Weight int `json:"Weight"` Priority int `json:"Priority"` Port int `json:"Port"` Flags int `json:"Flags"` Tag string `json:"Tag"` Accelerated bool `json:"Accelerated"` AcceleratedPullZoneID int64 `json:"AcceleratedPullZoneId"` LinkName string `json:"LinkName"` Disabled bool `json:"Disabled"` Comment string `json:"Comment"` }
type RecordType ¶
type RecordType int
const ( RecordTypeA RecordType = iota RecordTypeAAAA RecordTypeCNAME RecordTypeTXT RecordTypeMX RecordTypeRDR RecordTypeFlatten RecordTypePZ RecordTypeSRV RecordTypeCAA RecordTypePTR RecordTypeSCR RecordTypeNS )
func RecordTypeFromString ¶
func RecordTypeFromString(s string) RecordType
func (RecordType) String ¶
func (r RecordType) String() string
type UpdateRecordRequest ¶
Click to show internal directories.
Click to hide internal directories.