aboutsummaryrefslogtreecommitdiff
path: root/http/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'http/server.go')
-rw-r--r--http/server.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/http/server.go b/http/server.go
new file mode 100644
index 0000000..25c51d8
--- /dev/null
+++ b/http/server.go
@@ -0,0 +1,28 @@
+package http
+
+import (
+ "io"
+ "net/http"
+
+ "github.com/gin-gonic/gin"
+)
+
+type Server struct{}
+
+func NewServer() *Server {
+ return &Server{}
+}
+
+func (s *Server) Start(zapWriter io.Writer) {
+ router := gin.Default()
+ router.SetTrustedProxies(nil)
+ gin.DisableConsoleColor()
+ gin.DefaultWriter = zapWriter // send gin logs to zap
+
+ router.GET("/.well-known/webfinger", func(c *gin.Context) {
+ // resource := c.Query("resource")
+ c.JSON(http.StatusOK, nil)
+ })
+
+ router.Run()
+}