mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Namecheap take Provider (#202)
* re-copying namecheap dns provider and testing * document limits. mx broken because super odd api * manually path namecheap lib. passing tests. * generate * generate * clarify limit * conflict * add dependency * fully document namecheap capabilities
This commit is contained in:
@@ -44,9 +44,10 @@ func ProviderHasCabability(pType string, cap Capability) bool {
|
||||
|
||||
// DocumentationNote is a way for providers to give more detail about what features they support.
|
||||
type DocumentationNote struct {
|
||||
HasFeature bool
|
||||
Comment string
|
||||
Link string
|
||||
HasFeature bool
|
||||
Unimplemented bool
|
||||
Comment string
|
||||
Link string
|
||||
}
|
||||
|
||||
// DocumentationNotes is a full list of notes for a single provider
|
||||
@@ -100,6 +101,17 @@ func Cannot(comments ...string) *DocumentationNote {
|
||||
return n
|
||||
}
|
||||
|
||||
// Unimplemented is a small helper for concisely creating Documentation Notes
|
||||
// comments are variadic for easy ommission. First is comment, second is link, the rest are ignored.
|
||||
func Unimplemented(comments ...string) *DocumentationNote {
|
||||
n := &DocumentationNote{
|
||||
HasFeature: false,
|
||||
Unimplemented: true,
|
||||
}
|
||||
n.addStrings(comments)
|
||||
return n
|
||||
}
|
||||
|
||||
func (n *DocumentationNote) addStrings(comments []string) {
|
||||
if len(comments) > 0 {
|
||||
n.Comment = comments[0]
|
||||
|
||||
Reference in New Issue
Block a user