begin boilerplate for golang modules

This commit is contained in:
talksik
2026-01-10 14:53:31 -08:00
parent c4c17a10fe
commit e38e6a9d4b
11 changed files with 120 additions and 0 deletions
+10
View File
@@ -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/
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../go" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GoImports">
<option name="excludedPackages">
<array>
<option value="github.com/pkg/errors" />
<option value="golang.org/x/net/context" />
</array>
</option>
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/api.iml" filepath="$PROJECT_DIR$/.idea/api.iml" />
</modules>
</component>
</project>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
+7
View File
@@ -0,0 +1,7 @@
FROM ubuntu:latest
LABEL authors="arjun-flowylabs"
WORKDIR /app
COPY . .
ENTRYPOINT ["top", "-b"]
+20
View File
@@ -0,0 +1,20 @@
package main
import (
"fmt"
)
// TIP <p>To run your code, right-click the code and select <b>Run</b>.</p> <p>Alternatively, click
// the <icon src="AllIcons.Actions.Execute"/> icon in the gutter and select the <b>Run</b> menu item from here.</p>
func main() {
//TIP <p>Press <shortcut actionId="ShowIntentionActions"/> when your caret is at the underlined text
// to see how GoLand suggests fixing the warning.</p><p>Alternatively, if available, click the lightbulb to view possible fixes.</p>
s := "gopher"
fmt.Printf("Hello and welcome, %s!\n", s)
for i := 1; i <= 5; i++ {
//TIP <p>To start your debugging session, right-click your code in the editor and select the Debug option.</p> <p>We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.</p>
fmt.Println("i =", 100/i)
}
}
+3
View File
@@ -0,0 +1,3 @@
module github.com/flowy-live/llink
go 1.25
+40
View File
@@ -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")
}
+5
View File
@@ -0,0 +1,5 @@
package auth
type Service interface {
VerifyCode(email string, code string) error
}
+1
View File
@@ -0,0 +1 @@
package llink