Documentation
¶
Index ¶
- Constants
- Variables
- type CloudflareRepo
- func (c *CloudflareRepo) CreateRecord(ctx context.Context, record DnsRecord) error
- func (c *CloudflareRepo) DeleteRecord(ctx context.Context, record DnsRecord) (DnsRecordList, error)
- func (c *CloudflareRepo) ListRecords(ctx context.Context, types ...string) (DnsRecordList, error)
- func (c *CloudflareRepo) UpdateRecord(ctx context.Context, record DnsRecord) error
- type DnsRecord
- type DnsRecordList
- type DnsRepository
Constants ¶
View Source
const CloudflareProvider string = "cloudflare"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CloudflareRepo ¶
type CloudflareRepo struct {
// contains filtered or unexported fields
}
func NewCloudflareRepo ¶
func NewCloudflareRepo(domain, token string, client *http.Client) *CloudflareRepo
func (*CloudflareRepo) CreateRecord ¶
func (c *CloudflareRepo) CreateRecord(ctx context.Context, record DnsRecord) error
func (*CloudflareRepo) DeleteRecord ¶
func (c *CloudflareRepo) DeleteRecord(ctx context.Context, record DnsRecord) (DnsRecordList, error)
func (*CloudflareRepo) ListRecords ¶
func (c *CloudflareRepo) ListRecords(ctx context.Context, types ...string) (DnsRecordList, error)
func (*CloudflareRepo) UpdateRecord ¶
func (c *CloudflareRepo) UpdateRecord(ctx context.Context, record DnsRecord) error
type DnsRecordList ¶
type DnsRecordList []DnsRecord
func (DnsRecordList) AsJsonString ¶
func (d DnsRecordList) AsJsonString() string
func (DnsRecordList) AsTableString ¶
func (d DnsRecordList) AsTableString() string
type DnsRepository ¶
type DnsRepository interface {
ListRecords(ctx context.Context, types ...string) (DnsRecordList, error)
CreateRecord(ctx context.Context, record DnsRecord) error
UpdateRecord(ctx context.Context, record DnsRecord) error
DeleteRecord(ctx context.Context, record DnsRecord) (DnsRecordList, error)
}
func GetRepoFromViperOrFlag ¶
func GetRepoFromViperOrFlag(domain string, provider, token string) (DnsRepository, error)
Click to show internal directories.
Click to hide internal directories.