diff --git a/go/.idea/.gitignore b/go/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/go/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/go/.idea/api.iml b/go/.idea/api.iml new file mode 100644 index 0000000..2a71713 --- /dev/null +++ b/go/.idea/api.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/go/.idea/go.imports.xml b/go/.idea/go.imports.xml new file mode 100644 index 0000000..d7202f0 --- /dev/null +++ b/go/.idea/go.imports.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/go/.idea/modules.xml b/go/.idea/modules.xml new file mode 100644 index 0000000..d50cf45 --- /dev/null +++ b/go/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/go/.idea/vcs.xml b/go/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/go/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/go/Dockerfile b/go/Dockerfile new file mode 100644 index 0000000..9defd7a --- /dev/null +++ b/go/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:latest +LABEL authors="arjun-flowylabs" + +WORKDIR /app +COPY . . + +ENTRYPOINT ["top", "-b"] \ No newline at end of file diff --git a/go/cmd/api/main.go b/go/cmd/api/main.go new file mode 100644 index 0000000..2a4fb8b --- /dev/null +++ b/go/cmd/api/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" +) + +// TIP

To run your code, right-click the code and select Run.

Alternatively, click +// the icon in the gutter and select the Run menu item from here.

+func main() { + //TIP

Press when your caret is at the underlined text + // to see how GoLand suggests fixing the warning.

Alternatively, if available, click the lightbulb to view possible fixes.

+ s := "gopher" + fmt.Printf("Hello and welcome, %s!\n", s) + + for i := 1; i <= 5; i++ { + //TIP

To start your debugging session, right-click your code in the editor and select the Debug option.

We have set one breakpoint + // for you, but you can always add more by pressing .

+ fmt.Println("i =", 100/i) + } +} diff --git a/go/go.mod b/go/go.mod new file mode 100644 index 0000000..9be1e0a --- /dev/null +++ b/go/go.mod @@ -0,0 +1,3 @@ +module github.com/flowy-live/llink + +go 1.25 diff --git a/go/internal/http/auth.go b/go/internal/http/auth.go new file mode 100644 index 0000000..5417508 --- /dev/null +++ b/go/internal/http/auth.go @@ -0,0 +1,40 @@ +package http + +import "net/http" + +type AuthHandler interface { + SendCode(w http.ResponseWriter, r *http.Request) + Login(w http.ResponseWriter, r *http.Request) + Logout(w http.ResponseWriter, r *http.Request) + VerifySession(w http.ResponseWriter, r *http.Request) +} + +type SendCodeResponse struct { +} + +type Session struct { + HumanId string `json:"id"` + TokenId string `json:"token_id"` +} + +type authHandlerImpl struct{} + +func (a authHandlerImpl) SendCode(w http.ResponseWriter, r *http.Request) { + //TODO implement me + panic("implement me") +} + +func (a authHandlerImpl) Login(w http.ResponseWriter, r *http.Request) { + //TODO implement me + panic("implement me") +} + +func (a authHandlerImpl) Logout(w http.ResponseWriter, r *http.Request) { + //TODO implement me + panic("implement me") +} + +func (a authHandlerImpl) VerifySession(w http.ResponseWriter, r *http.Request) { + //TODO implement me + panic("implement me") +} diff --git a/go/internal/service/auth/service.go b/go/internal/service/auth/service.go new file mode 100644 index 0000000..f983fc4 --- /dev/null +++ b/go/internal/service/auth/service.go @@ -0,0 +1,5 @@ +package auth + +type Service interface { + VerifyCode(email string, code string) error +} diff --git a/go/internal/service/llink/service.go b/go/internal/service/llink/service.go new file mode 100644 index 0000000..8077f6c --- /dev/null +++ b/go/internal/service/llink/service.go @@ -0,0 +1 @@ +package llink