View Source erldns_admin_zone_resource_handler (erldns v4.2.0)
Cowbow handler that handles Admin API requests to /zones/:name
Summary
Functions
Only GET and DELETE methods are allowed
Delete a zone from cache
Verify if a zone is cached
Return information about a given zone in cache
Functions
-spec allowed_methods(cowboy_req:req(), erldns_admin:handler_state()) -> {[binary()], cowboy_req:req(), erldns_admin:handler_state()}.
Only GET and DELETE methods are allowed
-spec delete_resource(cowboy_req:req(), erldns_admin:handler_state()) -> {boolean(), cowboy_req:req(), erldns_admin:handler_state()}.
Delete a zone from cache
-spec resource_exists(cowboy_req:req(), erldns_admin:handler_state()) -> {boolean(), cowboy_req:req(), erldns_admin:handler_state()}.
Verify if a zone is cached
-spec to_json(cowboy_req:req(), erldns_admin:handler_state()) -> {stop | cowboy_req:resp_body(), cowboy_req:req(), erldns_admin:handler_state()}.
Return information about a given zone in cache