* Create geoip plugin
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Update plugin/geoip/README.md
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Update plugin/geoip/README.md
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Update plugin/geoip/README.md
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Move DBFILE bullet below example
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Update plugin/geoip/README.md
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Remove plugin name test case
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Remove languages option
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Update free database link
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Remove last language bits
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Use 127.0.0.1 as probing IP
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Update plugin/geoip/geoip.go
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Update plugin/geoip/geoip.go
Co-authored-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Use relative path for fixtures dir
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Set names with default string zero value
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Remove unused db types
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Remove non city databases in testdata
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Remove create databases main
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Fix metadata label format test case
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Fix import path block
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* go fmt after changes
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Tidy up go.mod and go.sum
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
* Add plugin to CODEOWNERS
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
Co-authored-by: Miek Gieben <miek@miek.nl>
* plugin/metadata: finish documentation
Finish the README.md, add corner case in the IsLabel test and reword
some code comments slightly.
Generate the man-pages and add man/coredns-metadata.7 as well.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Fix test
Signed-off-by: Miek Gieben <miek@miek.nl>
* - add support of metadata values for edns0 local variables
* - comments from review.
* - simplify label check. Add UT
* - enhance check for Labels, add UT
- remove IsMetadataSet
* - edns0 variable - if variable is not found just ignore the rewrite.
This revert 17d807f0 and re-adds the metadata plugin as a plugin that
just sets a label to a value function.
Add package documentation on how to use the metadata package. Make it
clear that any caching is up to the Func implemented.
There are now - no in tree users. We could add the request metadata by
default under names that copy request.Request, i.e
request/ip - remote IP
request/port - remote port
Variables.go has been deleted.
Signed-off-by: Miek Gieben <miek@miek.nl>
* plugin/metadata: some cleanups
Name to provider.go as that's what being defined right now in the file.
Use request.Request because that's done in variables.go anyway. Name the
main storage M, because there is no further meaning behind.
Remove superfluous methods
Signed-off-by: Miek Gieben <miek@miek.nl>
* Fix test
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-06-29 15:03:25 +01:00
Renamed from plugin/metadata/metadataer.go (Browse further)