Documentation ¶
Overview ¶
Package desec provides a high-level client to the deSEC API
Index ¶
- func CalculateBatchWaitDuration(ml *slidingwindows.MultiLimiter, batchMinFillRatio float32) time.Duration
- func CompareSubnames(first, second string) bool
- func FilterAndSortRRsets(rrsets []desec.RRset, recordTypes []string) []desec.RRset
- func GetReverseDomainNameFragments(domainName string) []string
- func IsDeletionUpsertRRset(rrset desec.RRset) bool
- func SortSubnameRRsets(rrsets map[string][]desec.RRset, filterRecordTypes []string) (subnames []string, sorted [][]desec.RRset)
- type Cache
- func (c *Cache) GetDomainByName(name string) (*desec.Domain, bool, error)
- func (c *Cache) GetRRsetByNameAndType(domainName, subname, rrsetType string) (*desec.RRset, bool, error)
- func (c *Cache) GetRRsetsByName(domainName, subname string) ([]desec.RRset, error)
- func (c *Cache) GetSubnames(domainName string) ([]string, error)
- func (c *Cache) HasSubname(domainName string, subname string) bool
- func (c *Cache) SetDomainByName(name string, domain desec.Domain) error
- func (c *Cache) SetNonexistentDomainByName(name string)
- func (c *Cache) SetNonexistentRRsetByNameAndType(domainName, subname, rrsetType string)
- func (c *Cache) SetRRsetByNameAndType(domainName, subname, rrsetType string, rrset desec.RRset) error
- func (c *Cache) SetRRsetsByName(domainName, subname string, rrsets []desec.RRset) error
- func (c *Cache) SetSubnames(domainName string, subnames []string) error
- func (c *Cache) UnsetSubnames(domainName string)
- type Client
- func (c *Client) CreateRRset(ctx context.Context, subname, recordType string, ttl int64, records []string) (desec.RRset, error)
- func (c *Client) DeleteRRset(ctx context.Context, subname, recordType string) error
- func (c *Client) DeleteRRsets(ctx context.Context, keys ...RRsetKey) error
- func (c *Client) GetDomain(ctx context.Context) (*desec.Domain, error)
- func (c *Client) GetRRset(ctx context.Context, subname, recordType string) (*desec.RRset, error)
- func (c *Client) GetRRsets(ctx context.Context) (map[string][]desec.RRset, error)
- func (c *Client) GetSubnameRRsets(ctx context.Context, subname string) ([]desec.RRset, error)
- func (c *Client) UpdateRRset(ctx context.Context, subname, recordType string, ttl int64, records []string) (*desec.RRset, error)
- func (c *Client) UpsertRRsets(ctx context.Context, rrsets ...desec.RRset) ([]desec.RRset, error)
- type Config
- type DesecAPISettings
- type RRsetKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateBatchWaitDuration ¶
func CalculateBatchWaitDuration( ml *slidingwindows.MultiLimiter, batchMinFillRatio float32, ) time.Duration
func CompareSubnames ¶ added in v0.8.0
func FilterAndSortRRsets ¶
func GetReverseDomainNameFragments ¶ added in v0.8.0
func IsDeletionUpsertRRset ¶ added in v0.8.0
Types ¶
type Cache ¶
type Cache struct { Cache clientcache.Cache CostWeight float32 TTL time.Duration RecordTypes []string }
func (*Cache) GetDomainByName ¶
func (*Cache) GetRRsetByNameAndType ¶
func (*Cache) GetRRsetsByName ¶
func (*Cache) SetDomainByName ¶
func (*Cache) SetNonexistentDomainByName ¶
func (*Cache) SetNonexistentRRsetByNameAndType ¶
func (*Cache) SetRRsetByNameAndType ¶
func (*Cache) SetRRsetsByName ¶
func (*Cache) UnsetSubnames ¶
type Client ¶
type Client struct { Config Config Logger godest.Logger Cache *Cache ReadLimiter *slidingwindows.MultiLimiter WriteLimiter *slidingwindows.MultiLimiter }
func (*Client) CreateRRset ¶
func (*Client) DeleteRRset ¶
func (*Client) DeleteRRsets ¶ added in v0.8.0
func (*Client) GetSubnameRRsets ¶
func (*Client) UpdateRRset ¶ added in v0.8.0
type Config ¶
type Config struct { DomainName string DNSServer models.DNSServer APISettings DesecAPISettings RecordTypes []string }
type DesecAPISettings ¶
func GetAPISettings ¶
func GetAPISettings() (s DesecAPISettings, err error)
Click to show internal directories.
Click to hide internal directories.