Add bolt provider, rewrite hosts, start of api, start of update via nsupdate
This commit is contained in:
		
							
								
								
									
										17
									
								
								api/api.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								api/api.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
package api
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"github.com/go-chi/chi"
 | 
			
		||||
	"github.com/go-chi/render"
 | 
			
		||||
	"net/http"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func Start() error {
 | 
			
		||||
	r := chi.NewRouter()
 | 
			
		||||
 | 
			
		||||
	r.Use(render.SetContentType(render.ContentTypeJSON))
 | 
			
		||||
 | 
			
		||||
	r.Get("/hosts", hostsGet)
 | 
			
		||||
 | 
			
		||||
	return http.ListenAndServe(":8080", r)
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										7
									
								
								api/hosts.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								api/hosts.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
package api
 | 
			
		||||
 | 
			
		||||
import "net/http"
 | 
			
		||||
 | 
			
		||||
func hostsGet(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user