Documentation
¶
Overview ¶
Package store provides an interface to store and retrieve custom DNS records
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultStore ¶
DefaultStore implements a default store based on a in-memory tree structure
func NewDefault ¶
func NewDefault() *DefaultStore
func (*DefaultStore) Add ¶
func (s *DefaultStore) Add(name string, records []rr.RR) error
Add adds a new resource record to the store
func (*DefaultStore) Get ¶
Get returns a record by name and the selected type's data. Example: example.com with type A would return 93.184.216.34
func (*DefaultStore) GetFromQuestion ¶
GetFromQuestion returns a record by name and the selected type's data. Example: example.com with type A would return 93.184.216.34
type Store ¶
type Store interface { // GetFromQuestion returns records by name and the selected type's data. // Example: example.com with type A would return 93.184.216.34 GetFromQuestion(dns.Question) ([]rr.RR, error) // Get returns records by name and the selected type's data. // Example: example.com with type A would return 93.184.216.34 Get(string, uint16, uint16) ([]rr.RR, error) // Add adds a new resource records to the store Add(string, []rr.RR) error }
Click to show internal directories.
Click to hide internal directories.