From 7c69f163b6cf4832cd038301b01a08a3204b038c Mon Sep 17 00:00:00 2001 From: Achim Rohn Date: Sat, 15 Nov 2025 11:38:04 +0100 Subject: [PATCH] Revert "Add the module name after the path to the repo and simply name it ersteller" This reverts commit a1b93c0ebae0b6278ca43d36be629e0c62f7ad7c. --- README.md | 2 - authentication/auth.go | 2 +- authentication/google/auth.go | 62 +++++++++---------- .../google/google_auth_repository.go | 6 +- .../google/googleauth-repository_gen.go | 24 +++---- authentication/google/http/google_auth.go | 4 +- authentication/keycloak.go | 20 +++--- authentication/login_page.go | 18 +++--- cli/create_audit_log.go | 10 +-- go.mod | 2 +- hash.go | 2 +- htmx/htmx.go | 6 +- htmx_route.go | 2 +- i18n.go | 2 +- llm/mistral.go | 4 +- logger.go | 2 +- middleware.go | 2 +- migration.go | 2 +- page.go | 2 +- parsing.go | 2 +- postgres.go | 2 +- route.go | 2 +- schema.go | 2 +- schema/ent/example/ent/client.go | 8 +-- schema/ent/example/ent/ent.go | 6 +- schema/ent/example/ent/enttest/enttest.go | 6 +- schema/ent/example/ent/group.go | 2 +- schema/ent/example/ent/group/where.go | 2 +- schema/ent/example/ent/group_create.go | 6 +- schema/ent/example/ent/group_delete.go | 4 +- schema/ent/example/ent/group_query.go | 8 +-- schema/ent/example/ent/group_update.go | 8 +-- schema/ent/example/ent/hook/hook.go | 2 +- schema/ent/example/ent/mutation.go | 8 +-- schema/ent/example/ent/runtime.go | 8 +-- schema/ent/example/ent/schema/group.go | 2 +- schema/ent/example/ent/schema/todo.go | 2 +- schema/ent/example/ent/schema/user.go | 2 +- schema/ent/example/ent/todo.go | 4 +- schema/ent/example/ent/todo/where.go | 2 +- schema/ent/example/ent/todo_create.go | 4 +- schema/ent/example/ent/todo_delete.go | 4 +- schema/ent/example/ent/todo_query.go | 6 +- schema/ent/example/ent/todo_update.go | 6 +- schema/ent/example/ent/user.go | 2 +- schema/ent/example/ent/user/where.go | 2 +- schema/ent/example/ent/user_create.go | 4 +- schema/ent/example/ent/user_delete.go | 4 +- schema/ent/example/ent/user_query.go | 6 +- schema/ent/example/ent/user_update.go | 6 +- schema/ent/example/start.go | 8 +-- sqlite.go | 2 +- starter/create/create.go | 2 +- starter/ent/client.go | 8 +-- starter/ent/ent.go | 6 +- starter/ent/enttest/enttest.go | 6 +- starter/ent/googleauth.go | 6 +- starter/ent/googleauth/where.go | 2 +- starter/ent/googleauth_create.go | 6 +- starter/ent/googleauth_delete.go | 4 +- starter/ent/googleauth_query.go | 6 +- starter/ent/googleauth_update.go | 8 +-- starter/ent/hook/hook.go | 2 +- starter/ent/mutation.go | 10 +-- starter/ent/runtime.go | 8 +-- starter/ent/todo.go | 4 +- starter/ent/todo/where.go | 2 +- starter/ent/todo_create.go | 4 +- starter/ent/todo_delete.go | 4 +- starter/ent/todo_query.go | 6 +- starter/ent/todo_update.go | 6 +- starter/ent/user.go | 2 +- starter/ent/user/where.go | 2 +- starter/ent/user_create.go | 2 +- starter/ent/user_delete.go | 4 +- starter/ent/user_query.go | 4 +- starter/ent/user_update.go | 4 +- starter/generate_schema.go | 2 +- starter/go.mod | 2 +- starter/google/database.go | 4 +- starter/main.go | 6 +- starter/routes/routing.go | 18 +++--- starter/todos/todos.go | 4 +- strings.go | 2 +- tracing.go | 2 +- user/user_repository.go | 30 ++++----- 86 files changed, 251 insertions(+), 253 deletions(-) diff --git a/README.md b/README.md index 1b2e35c..796741d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ # Private gitlab repo hosting `git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/"` - -`go env -w GOPRIVATE=gitlab.com` diff --git a/authentication/auth.go b/authentication/auth.go index 68fc724..d3edae5 100644 --- a/authentication/auth.go +++ b/authentication/auth.go @@ -1,7 +1,7 @@ package authentication import ( - . "git.gorlug.de/code/golang/ersteller-lib/ersteller" + . "git.gorlug.de/code/golang/ersteller-lib" "net/http" "strings" diff --git a/authentication/google/auth.go b/authentication/google/auth.go index 43cf36b..928e0c4 100644 --- a/authentication/google/auth.go +++ b/authentication/google/auth.go @@ -6,8 +6,8 @@ import ( "encoding/base64" "encoding/json" "errors" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/authentication" + "git.gorlug.de/code/golang/ersteller-lib" + "git.gorlug.de/code/golang/ersteller-lib/authentication" "github.com/gorilla/sessions" "github.com/labstack/echo/v4" "golang.org/x/oauth2" @@ -35,7 +35,7 @@ type Auth struct { isLocal bool userRepo authentication.UserRepository sessionStore *sessions.CookieStore - GoogleLoginRoute ersteller.Route + GoogleLoginRoute ersteller_lib.Route environment AuthEnv } @@ -64,10 +64,10 @@ func (a *Auth) GetAuthURL(state string) string { func (a *Auth) ParseUserData(code string) (GoogleUserData, error) { data, err := a.getUserDataFromGoogle(code) if err != nil { - ersteller.LogError("failed getting user data from Google: %v", err) + ersteller_lib.LogError("failed getting user data from Google: %v", err) return GoogleUserData{}, err } - ersteller.LogDebug("user data: %v", data) + ersteller_lib.LogDebug("user data: %v", data) return data, nil } @@ -75,25 +75,25 @@ func (a *Auth) getUserDataFromGoogle(code string) (GoogleUserData, error) { // Use code to get token and get user info from Google. token, err := a.Config.Exchange(context.Background(), code) if err != nil { - ersteller.LogError("code exchange wrong: %v", err) + ersteller_lib.LogError("code exchange wrong: %v", err) return GoogleUserData{}, err } response, err := http.Get(oauthGoogleUrlAPI + token.AccessToken) if err != nil { - ersteller.LogError("failed getting user info: %v", err) + ersteller_lib.LogError("failed getting user info: %v", err) return GoogleUserData{}, nil } defer response.Body.Close() contents, err := ioutil.ReadAll(response.Body) if err != nil { - ersteller.LogError("failed read response: %v", err) + ersteller_lib.LogError("failed read response: %v", err) return GoogleUserData{}, nil } userData := GoogleUserData{} err = json.Unmarshal(contents, &userData) if err != nil { - ersteller.LogError("failed to unmarshal user data: %v", err) + ersteller_lib.LogError("failed to unmarshal user data: %v", err) return GoogleUserData{}, nil } userData.Token = token @@ -102,10 +102,10 @@ func (a *Auth) getUserDataFromGoogle(code string) (GoogleUserData, error) { } func (a *Auth) SaveCredentials(userId int, token *oauth2.Token) error { - ersteller.Debug("saving google credentials for user ", userId) + ersteller_lib.Debug("saving google credentials for user ", userId) googleAuth, err := a.repo.ReadByUserId(userId) if err != nil { - ersteller.LogDebug("no GoogleAuth found for user %d, creating new one", userId) + ersteller_lib.LogDebug("no GoogleAuth found for user %d, creating new one", userId) _, err = a.repo.Create(GoogleAuth{ UserId: userId, Credentials: Credentials{ @@ -121,11 +121,11 @@ func (a *Auth) SaveCredentials(userId int, token *oauth2.Token) error { func (a *Auth) GetCredentials(userId int) (*oauth2.Token, error) { credentials, err := a.repo.ReadByUserId(userId) if err != nil { - ersteller.LogError("failed to get credentials for user %d: %v", userId, err) + ersteller_lib.LogError("failed to get credentials for user %d: %v", userId, err) return nil, err } if credentials.Credentials.Token.AccessToken == "" { - ersteller.LogError("no credentials found for user %d", userId) + ersteller_lib.LogError("no credentials found for user %d", userId) return nil, errors.New("no credentials found") } return &credentials.Credentials.Token, nil @@ -135,25 +135,25 @@ const oAuthStateCookieName = "oauthstate" const GoogleLogin = "/login/google" const GoogleLoginCallback = "/email/authenticated" -func (a *Auth) AddRoutes(e *echo.Echo) []ersteller.Route { - googleLoginRoute := ersteller.NewGetRoute(GoogleLogin, func(c echo.Context) error { +func (a *Auth) AddRoutes(e *echo.Echo) []ersteller_lib.Route { + googleLoginRoute := ersteller_lib.NewGetRoute(GoogleLogin, func(c echo.Context) error { state := a.generateStateOauthCookie(c.Response()) - ersteller.LogDebug("Value: %v", state) + ersteller_lib.LogDebug("Value: %v", state) authenticationUrl := a.GetAuthURL(state) return c.Redirect(http.StatusTemporaryRedirect, authenticationUrl) }) googleLoginRoute.Add(e) a.GoogleLoginRoute = googleLoginRoute - authenticatedRoute := ersteller.NewGetRoute(GoogleLoginCallback, func(c echo.Context) error { - ersteller.LogDebug("email authenticated called") + authenticatedRoute := ersteller_lib.NewGetRoute(GoogleLoginCallback, func(c echo.Context) error { + ersteller_lib.LogDebug("email authenticated called") oauthstate, err := c.Cookie(oAuthStateCookieName) if err != nil { - ersteller.LogError("Failed to get cookie: %v", err) + ersteller_lib.LogError("Failed to get cookie: %v", err) return err } if c.FormValue("state") != oauthstate.Value { - ersteller.LogError("Failed to verify google oauth state") + ersteller_lib.LogError("Failed to verify google oauth state") return err } code := c.FormValue("code") @@ -163,10 +163,10 @@ func (a *Auth) AddRoutes(e *echo.Echo) []ersteller.Route { } userId, err := a.userRepo.GetUserId(data.Email) if err != nil { - ersteller.LogError("Failed to get user id: %v", err) + ersteller_lib.LogError("Failed to get user id: %v", err) userId, err = a.userRepo.CreateFromEmail(data.Email) if err != nil { - ersteller.LogError("Failed to create user: %v", err) + ersteller_lib.LogError("Failed to create user: %v", err) return err } } @@ -176,36 +176,36 @@ func (a *Auth) AddRoutes(e *echo.Echo) []ersteller.Route { } err = a.SaveCredentials(userId, data.Token) if err != nil { - ersteller.Error("failed to save credentials for user ", userId, ": ", err) + ersteller_lib.Error("failed to save credentials for user ", userId, ": ", err) return err } - ersteller.Debug("saved credentials for user", userId) + ersteller_lib.Debug("saved credentials for user", userId) return c.Redirect(http.StatusTemporaryRedirect, "/") }) authenticatedRoute.Add(e) - logoutRoute := ersteller.NewGetRoute("/logout", func(c echo.Context) error { + logoutRoute := ersteller_lib.NewGetRoute("/logout", func(c echo.Context) error { // Clear the session session, err := a.sessionStore.Get(c.Request(), a.environment.SessionName) if err != nil { - ersteller.LogError("Failed to get session: %v", err) + ersteller_lib.LogError("Failed to get session: %v", err) return c.Redirect(http.StatusTemporaryRedirect, "/") } session.Options.MaxAge = -1 err = session.Save(c.Request(), c.Response()) if err != nil { - ersteller.LogError("Failed to save session: %v", err) + ersteller_lib.LogError("Failed to save session: %v", err) return err } return c.Redirect(http.StatusTemporaryRedirect, "/") }) logoutRoute.Add(e) - return []ersteller.Route{googleLoginRoute, authenticatedRoute, logoutRoute} + return []ersteller_lib.Route{googleLoginRoute, authenticatedRoute, logoutRoute} } func (a *Auth) saveEmailToSessionStore(c echo.Context, email string, userId int) error { session, err := a.sessionStore.New(c.Request(), a.environment.SessionName) if err != nil { - ersteller.LogError("Failed to create session: %v", err) + ersteller_lib.LogError("Failed to create session: %v", err) return err } session.Values = map[interface{}]interface{}{ @@ -214,7 +214,7 @@ func (a *Auth) saveEmailToSessionStore(c echo.Context, email string, userId int) } err = session.Save(c.Request(), c.Response()) if err != nil { - ersteller.LogError("Failed to save session: %v", err) + ersteller_lib.LogError("Failed to save session: %v", err) return err } return nil @@ -224,7 +224,7 @@ func (a *Auth) generateStateOauthCookie(w http.ResponseWriter) string { b := make([]byte, 16) _, err := rand.Read(b) if err != nil { - ersteller.LogError("Failed to read random state: %v", err) + ersteller_lib.LogError("Failed to read random state: %v", err) } state := base64.URLEncoding.EncodeToString(b) diff --git a/authentication/google/google_auth_repository.go b/authentication/google/google_auth_repository.go index c95cabe..c455ec0 100644 --- a/authentication/google/google_auth_repository.go +++ b/authentication/google/google_auth_repository.go @@ -3,12 +3,12 @@ package google import ( "context" "errors" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "github.com/doug-martin/goqu/v9" ) func (r *GoogleAuthRepository) ReadByUserId(userId int) (GoogleAuth, error) { - ersteller.Debug("Getting GoogleAuth by userId", userId) + ersteller_lib.Debug("Getting GoogleAuth by userId", userId) sql, args, _ := r.dialect.From("googleAuth"). Prepared(true). Select(r.getSelectColumns()...). @@ -19,7 +19,7 @@ func (r *GoogleAuthRepository) ReadByUserId(userId int) (GoogleAuth, error) { rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.Error("Failed to get GoogleAuth: ", err) + ersteller_lib.Error("Failed to get GoogleAuth: ", err) } defer rows.Close() if rows.Next() { diff --git a/authentication/google/googleauth-repository_gen.go b/authentication/google/googleauth-repository_gen.go index 6bb2201..2ee6819 100644 --- a/authentication/google/googleauth-repository_gen.go +++ b/authentication/google/googleauth-repository_gen.go @@ -8,7 +8,7 @@ import ( "encoding/json" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "github.com/doug-martin/goqu/v9" _ "github.com/doug-martin/goqu/v9/dialect/postgres" "github.com/doug-martin/goqu/v9/exp" @@ -42,13 +42,13 @@ func (r *GoogleAuthRepository) Create(googleAuth GoogleAuth) (int, error) { Returning("id"). ToSQL() if err != nil { - ersteller.LogError("error creating create GoogleAuth sql: %v", err) + ersteller_lib.LogError("error creating create GoogleAuth sql: %v", err) return -1, err } rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.LogError("error creating GoogleAuth: %v", err) + ersteller_lib.LogError("error creating GoogleAuth: %v", err) return -1, err } defer rows.Close() @@ -56,11 +56,11 @@ func (r *GoogleAuthRepository) Create(googleAuth GoogleAuth) (int, error) { if rows.Next() { err = rows.Scan(&id) if err != nil { - ersteller.LogError("error scanning User: %v", err) + ersteller_lib.LogError("error scanning User: %v", err) return -1, err } } else { - ersteller.Error("GoogleAuth already exists") + ersteller_lib.Error("GoogleAuth already exists") return -1, GoogleAuthAlreadyExistsError{GoogleAuth: googleAuth} } @@ -83,7 +83,7 @@ func (r *GoogleAuthRepository) getSelectColumns() []any { } func (r *GoogleAuthRepository) Read(userId int, id int) (GoogleAuth, error) { - ersteller.Debug("Getting GoogleAuth by id ", id) + ersteller_lib.Debug("Getting GoogleAuth by id ", id) sql, args, _ := r.dialect.From("googleAuth"). Prepared(true). Select(r.getSelectColumns()...). @@ -95,7 +95,7 @@ func (r *GoogleAuthRepository) Read(userId int, id int) (GoogleAuth, error) { rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.Error("Failed to get GoogleAuth: ", err) + ersteller_lib.Error("Failed to get GoogleAuth: ", err) } defer rows.Close() if rows.Next() { @@ -162,13 +162,13 @@ func (r *GoogleAuthRepository) Update(userId int, googleAuth GoogleAuth) error { }). ToSQL() if err != nil { - ersteller.LogError("error creating update GoogleAuth sql: %v", err) + ersteller_lib.LogError("error creating update GoogleAuth sql: %v", err) return err } _, err = r.connPool.Exec(context.Background(), sql, args...) if err != nil { - ersteller.LogError("error updating GoogleAuth: %v", err) + ersteller_lib.LogError("error updating GoogleAuth: %v", err) return err } @@ -184,13 +184,13 @@ func (r *GoogleAuthRepository) Delete(userId int, id int) error { }). ToSQL() if err != nil { - ersteller.LogError("error creating delete GoogleAuth sql: %v", err) + ersteller_lib.LogError("error creating delete GoogleAuth sql: %v", err) return err } _, err = r.connPool.Exec(context.Background(), sql, args...) if err != nil { - ersteller.LogError("error deleting GoogleAuth: %v", err) + ersteller_lib.LogError("error deleting GoogleAuth: %v", err) return err } @@ -266,7 +266,7 @@ func (r *GoogleAuthRepository) GetPage(params GoogleAuthPaginationParams) ([]Goo rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.LogError("failed to run sql query: %v", err) + ersteller_lib.LogError("failed to run sql query: %v", err) return nil, -1, err } defer rows.Close() diff --git a/authentication/google/http/google_auth.go b/authentication/google/http/google_auth.go index 8872069..b998a46 100644 --- a/authentication/google/http/google_auth.go +++ b/authentication/google/http/google_auth.go @@ -5,8 +5,8 @@ import ( "crypto/rand" "encoding/base64" "encoding/json" - . "git.gorlug.de/code/golang/ersteller-lib/ersteller" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/authentication" + . "git.gorlug.de/code/golang/ersteller-lib" + "git.gorlug.de/code/golang/ersteller-lib/authentication" "io/ioutil" "net/http" "time" diff --git a/authentication/keycloak.go b/authentication/keycloak.go index 945d1d2..341cd8e 100644 --- a/authentication/keycloak.go +++ b/authentication/keycloak.go @@ -2,7 +2,7 @@ package authentication import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "github.com/gorilla/sessions" "github.com/labstack/echo/v4" "github.com/markbates/goth" @@ -38,7 +38,7 @@ func RunKeycloakAuth(e *echo.Echo, environment KeycloakEnv, cookieStore *session // ignore the error for now openid, err := openidConnect.New(environment.Keycloak.ClientId, environment.Keycloak.ClientSecret, environment.BaseUrl+"/auth/openid-connect/callback", environment.Keycloak.DiscoveryUrl) if err != nil { - ersteller.Error("Error while initializing OpenID Connect provider: ", err) + ersteller_lib.Error("Error while initializing OpenID Connect provider: ", err) panic(err) } if openid != nil { @@ -56,12 +56,12 @@ func RunKeycloakAuth(e *echo.Echo, environment KeycloakEnv, cookieStore *session if userId == -1 { userId, err = createUser(user, userRepo) if err != nil { - ersteller.LogError("Failed to create user: %v", err) + ersteller_lib.LogError("Failed to create user: %v", err) return err } - ersteller.LogDebug("Created user with id %d", userId) + ersteller_lib.LogDebug("Created user with id %d", userId) } else { - ersteller.LogError("Failed to get user id: %v", err) + ersteller_lib.LogError("Failed to get user id: %v", err) return err } } @@ -76,7 +76,7 @@ func RunKeycloakAuth(e *echo.Echo, environment KeycloakEnv, cookieStore *session // Get the session session, err := cookieStore.Get(c.Request(), environment.SessionName) if err != nil { - ersteller.LogError("Failed to get session during logout: %v", err) + ersteller_lib.LogError("Failed to get session during logout: %v", err) } else { // Clear session values session.Values = make(map[interface{}]interface{}) @@ -85,7 +85,7 @@ func RunKeycloakAuth(e *echo.Echo, environment KeycloakEnv, cookieStore *session // Save the session (this will delete the cookie) err = session.Save(c.Request(), c.Response()) if err != nil { - ersteller.LogError("Failed to clear session during logout: %v", err) + ersteller_lib.LogError("Failed to clear session during logout: %v", err) } } @@ -105,7 +105,7 @@ func RunKeycloakAuth(e *echo.Echo, environment KeycloakEnv, cookieStore *session request := c.Request().WithContext(ctx) // try to get the user without re-authenticating if gothUser, err := gothic.CompleteUserAuth(c.Response(), c.Request()); err == nil { - ersteller.Debug(gothUser) + ersteller_lib.Debug(gothUser) return nil } else { gothic.BeginAuthHandler(c.Response(), request) @@ -122,7 +122,7 @@ func createUser(gothUser goth.User, repo UserRepository) (int, error) { func saveEmailToSessionStore(c echo.Context, sessionStore *sessions.CookieStore, email string, userId int, environment KeycloakEnv) error { session, err := sessionStore.New(c.Request(), environment.SessionName) if err != nil { - ersteller.LogError("Failed to create session: %v", err) + ersteller_lib.LogError("Failed to create session: %v", err) return err } session.Values = map[interface{}]interface{}{ @@ -131,7 +131,7 @@ func saveEmailToSessionStore(c echo.Context, sessionStore *sessions.CookieStore, } err = session.Save(c.Request(), c.Response()) if err != nil { - ersteller.LogError("Failed to save session: %v", err) + ersteller_lib.LogError("Failed to save session: %v", err) return err } return nil diff --git a/authentication/login_page.go b/authentication/login_page.go index 274551c..e1d9dbc 100644 --- a/authentication/login_page.go +++ b/authentication/login_page.go @@ -1,7 +1,7 @@ package authentication import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "github.com/labstack/echo/v4" "maragu.dev/gomponents" . "maragu.dev/gomponents/html" @@ -10,22 +10,22 @@ import ( const LoginPath = "/login" type LoginPage struct { - createPage ersteller.CreatePageFunc - LoginRoute ersteller.GetRoute + createPage ersteller_lib.CreatePageFunc + LoginRoute ersteller_lib.GetRoute googleLoginUrl string } -func NewLoginPage(e *echo.Echo, createPage ersteller.CreatePageFunc, googleLoginUrl string) *LoginPage { +func NewLoginPage(e *echo.Echo, createPage ersteller_lib.CreatePageFunc, googleLoginUrl string) *LoginPage { page := &LoginPage{createPage: createPage, googleLoginUrl: googleLoginUrl} - page.LoginRoute = ersteller.NewGetRoute(LoginPath, page.Render).Add(e) + page.LoginRoute = ersteller_lib.NewGetRoute(LoginPath, page.Render).Add(e) return page } func (l *LoginPage) Render(c echo.Context) error { - return l.createPage(c, ersteller.PageWebsiteMetaData{ - Title: ersteller.NewI18nText(map[ersteller.Language]string{ - ersteller.En: "Login", - ersteller.De: "Anmelden", + return l.createPage(c, ersteller_lib.PageWebsiteMetaData{ + Title: ersteller_lib.NewI18nText(map[ersteller_lib.Language]string{ + ersteller_lib.En: "Login", + ersteller_lib.De: "Anmelden", }), HideNavigation: true, }, l.getLoginPage()) diff --git a/cli/create_audit_log.go b/cli/create_audit_log.go index 73c068a..38f42fa 100644 --- a/cli/create_audit_log.go +++ b/cli/create_audit_log.go @@ -2,7 +2,7 @@ package main import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "github.com/joho/godotenv" "os" ) @@ -10,13 +10,13 @@ import ( func main() { err := godotenv.Load() if err != nil { - ersteller.LogError("Error loading .env file: %v", err) + ersteller_lib.LogError("Error loading .env file: %v", err) panic(err) } dbUrl := os.Getenv("DATABASE_URL") - connpool, err := ersteller.CreatePostgresConnpool(dbUrl) + connpool, err := ersteller_lib.CreatePostgresConnpool(dbUrl) if err != nil { - ersteller.LogError("Failed to create connection pool: %v", err) + ersteller_lib.LogError("Failed to create connection pool: %v", err) panic(err) } // https://medium.com/israeli-tech-radar/postgresql-trigger-based-audit-log-fd9d9d5e412c @@ -133,7 +133,7 @@ CREATE OR REPLACE TRIGGER audit_log_trigger ` _, err = connpool.Exec(context.Background(), sql) if err != nil { - ersteller.LogError("Failed to create audit log table: %v", err) + ersteller_lib.LogError("Failed to create audit log table: %v", err) panic(err) } println("Created audit log table") diff --git a/go.mod b/go.mod index 0b37b1f..b5ca57d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.gorlug.de/code/golang/ersteller-lib/ersteller +module git.gorlug.de/code/golang/ersteller-lib go 1.25.0 diff --git a/hash.go b/hash.go index e97b5df..775505a 100644 --- a/hash.go +++ b/hash.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib // https://medium.com/@rnp0728/secure-password-hashing-in-go-a-comprehensive-guide-5500e19e7c1f import "golang.org/x/crypto/bcrypt" diff --git a/htmx/htmx.go b/htmx/htmx.go index 7bb7d5b..9abc509 100644 --- a/htmx/htmx.go +++ b/htmx/htmx.go @@ -2,7 +2,7 @@ package htmx import ( "encoding/json" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "github.com/labstack/echo/v4" ) @@ -15,10 +15,10 @@ type LocationRedirectParams struct { func LocationRedirect(c echo.Context, params LocationRedirectParams) error { jsonData, err := json.Marshal(params) if err != nil { - ersteller.Error("Failed to marshal LocationRedirectParams ", params, err) + ersteller_lib.Error("Failed to marshal LocationRedirectParams ", params, err) return err } - ersteller.Debug("LocationRedirectParams", params, "jsonData", string(jsonData)) + ersteller_lib.Debug("LocationRedirectParams", params, "jsonData", string(jsonData)) c.Response().Header().Set("HX-Location", string(jsonData)) return nil } diff --git a/htmx_route.go b/htmx_route.go index 01036c5..dcd27e6 100644 --- a/htmx_route.go +++ b/htmx_route.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "encoding/json" diff --git a/i18n.go b/i18n.go index e9d8d21..468793c 100644 --- a/i18n.go +++ b/i18n.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib type Language string diff --git a/llm/mistral.go b/llm/mistral.go index 96cdba1..4d85a11 100644 --- a/llm/mistral.go +++ b/llm/mistral.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "io" "net/http" ) @@ -151,7 +151,7 @@ type MistralClient interface { type MistralClientMock struct{} func (m MistralClientMock) CreateChatCompletion(req *ChatCompletionRequest) (*ChatCompletionResponse, error) { - ersteller.Debug("mocking the mistral client") + ersteller_lib.Debug("mocking the mistral client") response := ChatCompletionResponse{ Choices: []ChatCompletionChoice{ { diff --git a/logger.go b/logger.go index 0fb6304..d91df7a 100644 --- a/logger.go +++ b/logger.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "fmt" diff --git a/middleware.go b/middleware.go index 4357c61..667c7b9 100644 --- a/middleware.go +++ b/middleware.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "compress/gzip" diff --git a/migration.go b/migration.go index 239c96f..34487db 100644 --- a/migration.go +++ b/migration.go @@ -1,3 +1,3 @@ -package ersteller +package ersteller_lib // https://github.com/golang-migrate/migrate diff --git a/page.go b/page.go index c2b4357..82bc989 100644 --- a/page.go +++ b/page.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "github.com/labstack/echo/v4" diff --git a/parsing.go b/parsing.go index 2e8e780..69089a8 100644 --- a/parsing.go +++ b/parsing.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "encoding/base64" diff --git a/postgres.go b/postgres.go index 3cd8f38..f96883b 100644 --- a/postgres.go +++ b/postgres.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "context" diff --git a/route.go b/route.go index 0d51275..abf06e4 100644 --- a/route.go +++ b/route.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "strings" diff --git a/schema.go b/schema.go index d8118e2..83c9104 100644 --- a/schema.go +++ b/schema.go @@ -1,3 +1,3 @@ -package ersteller +package ersteller_lib // https://entgo.io/docs/getting-started/#setup-a-go-environment diff --git a/schema/ent/example/ent/client.go b/schema/ent/example/ent/client.go index 215eaba..3a1ad1c 100644 --- a/schema/ent/example/ent/client.go +++ b/schema/ent/example/ent/client.go @@ -9,11 +9,11 @@ import ( "log" "reflect" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/migrate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/migrate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "entgo.io/ent" "entgo.io/ent/dialect" diff --git a/schema/ent/example/ent/ent.go b/schema/ent/example/ent/ent.go index 8952080..03385c2 100644 --- a/schema/ent/example/ent/ent.go +++ b/schema/ent/example/ent/ent.go @@ -6,9 +6,9 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "reflect" "sync" diff --git a/schema/ent/example/ent/enttest/enttest.go b/schema/ent/example/ent/enttest/enttest.go index 4604bdb..b410d2d 100644 --- a/schema/ent/example/ent/enttest/enttest.go +++ b/schema/ent/example/ent/enttest/enttest.go @@ -5,11 +5,11 @@ package enttest import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent" // required by schema hooks. - _ "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/runtime" + _ "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/runtime" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/migrate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/migrate" "entgo.io/ent/dialect/sql/schema" ) diff --git a/schema/ent/example/ent/group.go b/schema/ent/example/ent/group.go index ada9c8a..bec2dc5 100644 --- a/schema/ent/example/ent/group.go +++ b/schema/ent/example/ent/group.go @@ -4,7 +4,7 @@ package ent import ( "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" "strings" "time" diff --git a/schema/ent/example/ent/group/where.go b/schema/ent/example/ent/group/where.go index 7f6cfec..d1f8e73 100644 --- a/schema/ent/example/ent/group/where.go +++ b/schema/ent/example/ent/group/where.go @@ -3,7 +3,7 @@ package group import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" "time" "entgo.io/ent/dialect/sql" diff --git a/schema/ent/example/ent/group_create.go b/schema/ent/example/ent/group_create.go index c5be48b..7b69e61 100644 --- a/schema/ent/example/ent/group_create.go +++ b/schema/ent/example/ent/group_create.go @@ -6,9 +6,9 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "time" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/schema/ent/example/ent/group_delete.go b/schema/ent/example/ent/group_delete.go index 78edc6d..ac42270 100644 --- a/schema/ent/example/ent/group_delete.go +++ b/schema/ent/example/ent/group_delete.go @@ -4,8 +4,8 @@ package ent import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/schema/ent/example/ent/group_query.go b/schema/ent/example/ent/group_query.go index 4998bc0..6409ed1 100644 --- a/schema/ent/example/ent/group_query.go +++ b/schema/ent/example/ent/group_query.go @@ -6,10 +6,10 @@ import ( "context" "database/sql/driver" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "math" "entgo.io/ent" diff --git a/schema/ent/example/ent/group_update.go b/schema/ent/example/ent/group_update.go index 4a56fc3..079e26f 100644 --- a/schema/ent/example/ent/group_update.go +++ b/schema/ent/example/ent/group_update.go @@ -6,10 +6,10 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "time" "entgo.io/ent/dialect/sql" diff --git a/schema/ent/example/ent/hook/hook.go b/schema/ent/example/ent/hook/hook.go index 19f2883..c859df2 100644 --- a/schema/ent/example/ent/hook/hook.go +++ b/schema/ent/example/ent/hook/hook.go @@ -5,7 +5,7 @@ package hook import ( "context" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent" ) // The GroupFunc type is an adapter to allow the use of ordinary diff --git a/schema/ent/example/ent/mutation.go b/schema/ent/example/ent/mutation.go index 8696f6b..7eb8bfa 100644 --- a/schema/ent/example/ent/mutation.go +++ b/schema/ent/example/ent/mutation.go @@ -6,10 +6,10 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "sync" "time" diff --git a/schema/ent/example/ent/runtime.go b/schema/ent/example/ent/runtime.go index 6eef4bc..fcc1387 100644 --- a/schema/ent/example/ent/runtime.go +++ b/schema/ent/example/ent/runtime.go @@ -3,10 +3,10 @@ package ent import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/schema" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/schema" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "time" ) diff --git a/schema/ent/example/ent/schema/group.go b/schema/ent/example/ent/schema/group.go index 431c72f..49c2033 100644 --- a/schema/ent/example/ent/schema/group.go +++ b/schema/ent/example/ent/schema/group.go @@ -1,7 +1,7 @@ package schema import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent" "entgo.io/ent" "entgo.io/ent/schema/edge" diff --git a/schema/ent/example/ent/schema/todo.go b/schema/ent/example/ent/schema/todo.go index 527d623..df8b120 100644 --- a/schema/ent/example/ent/schema/todo.go +++ b/schema/ent/example/ent/schema/todo.go @@ -1,7 +1,7 @@ package schema import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent" "entgo.io/ent" "entgo.io/ent/schema/edge" diff --git a/schema/ent/example/ent/schema/user.go b/schema/ent/example/ent/schema/user.go index a241edf..ee600b3 100644 --- a/schema/ent/example/ent/schema/user.go +++ b/schema/ent/example/ent/schema/user.go @@ -1,7 +1,7 @@ package schema import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent" "entgo.io/ent" "entgo.io/ent/schema/edge" diff --git a/schema/ent/example/ent/todo.go b/schema/ent/example/ent/todo.go index 312905d..31664c8 100644 --- a/schema/ent/example/ent/todo.go +++ b/schema/ent/example/ent/todo.go @@ -4,8 +4,8 @@ package ent import ( "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" "strings" "time" diff --git a/schema/ent/example/ent/todo/where.go b/schema/ent/example/ent/todo/where.go index d4798b5..449dfb2 100644 --- a/schema/ent/example/ent/todo/where.go +++ b/schema/ent/example/ent/todo/where.go @@ -3,7 +3,7 @@ package todo import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" "time" "entgo.io/ent/dialect/sql" diff --git a/schema/ent/example/ent/todo_create.go b/schema/ent/example/ent/todo_create.go index 6b4debb..9f4ba90 100644 --- a/schema/ent/example/ent/todo_create.go +++ b/schema/ent/example/ent/todo_create.go @@ -6,8 +6,8 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" "time" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/schema/ent/example/ent/todo_delete.go b/schema/ent/example/ent/todo_delete.go index 7b3e132..785500c 100644 --- a/schema/ent/example/ent/todo_delete.go +++ b/schema/ent/example/ent/todo_delete.go @@ -4,8 +4,8 @@ package ent import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/schema/ent/example/ent/todo_query.go b/schema/ent/example/ent/todo_query.go index 6ae0b5b..bca656a 100644 --- a/schema/ent/example/ent/todo_query.go +++ b/schema/ent/example/ent/todo_query.go @@ -5,9 +5,9 @@ package ent import ( "context" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" "math" "entgo.io/ent" diff --git a/schema/ent/example/ent/todo_update.go b/schema/ent/example/ent/todo_update.go index 973ae48..e37a381 100644 --- a/schema/ent/example/ent/todo_update.go +++ b/schema/ent/example/ent/todo_update.go @@ -6,9 +6,9 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" "time" "entgo.io/ent/dialect/sql" diff --git a/schema/ent/example/ent/user.go b/schema/ent/example/ent/user.go index db8d155..0b5afd8 100644 --- a/schema/ent/example/ent/user.go +++ b/schema/ent/example/ent/user.go @@ -4,7 +4,7 @@ package ent import ( "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "strings" "time" diff --git a/schema/ent/example/ent/user/where.go b/schema/ent/example/ent/user/where.go index 6be3f43..48967d1 100644 --- a/schema/ent/example/ent/user/where.go +++ b/schema/ent/example/ent/user/where.go @@ -3,7 +3,7 @@ package user import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" "time" "entgo.io/ent/dialect/sql" diff --git a/schema/ent/example/ent/user_create.go b/schema/ent/example/ent/user_create.go index 80482eb..68903d7 100644 --- a/schema/ent/example/ent/user_create.go +++ b/schema/ent/example/ent/user_create.go @@ -6,8 +6,8 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "time" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/schema/ent/example/ent/user_delete.go b/schema/ent/example/ent/user_delete.go index 1d14a44..56b5cff 100644 --- a/schema/ent/example/ent/user_delete.go +++ b/schema/ent/example/ent/user_delete.go @@ -4,8 +4,8 @@ package ent import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/schema/ent/example/ent/user_query.go b/schema/ent/example/ent/user_query.go index 8cd498b..6c8670e 100644 --- a/schema/ent/example/ent/user_query.go +++ b/schema/ent/example/ent/user_query.go @@ -6,9 +6,9 @@ import ( "context" "database/sql/driver" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "math" "entgo.io/ent" diff --git a/schema/ent/example/ent/user_update.go b/schema/ent/example/ent/user_update.go index 001e17c..1baca78 100644 --- a/schema/ent/example/ent/user_update.go +++ b/schema/ent/example/ent/user_update.go @@ -6,9 +6,9 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "time" "entgo.io/ent/dialect/sql" diff --git a/schema/ent/example/start.go b/schema/ent/example/start.go index f7fb6aa..65f3201 100644 --- a/schema/ent/example/start.go +++ b/schema/ent/example/start.go @@ -3,10 +3,10 @@ package main import ( "context" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/group" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/schema/ent/example/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/group" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/schema/ent/example/ent/user" "log" "time" diff --git a/sqlite.go b/sqlite.go index d4376bd..78e3001 100644 --- a/sqlite.go +++ b/sqlite.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "context" diff --git a/starter/create/create.go b/starter/create/create.go index dd17388..86bec85 100644 --- a/starter/create/create.go +++ b/starter/create/create.go @@ -3,7 +3,7 @@ package create import ( . "ersteller-lib" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/env" + "git.gorlug.de/code/golang/ersteller-lib/starter/env" "log" "os" "os/exec" diff --git a/starter/ent/client.go b/starter/ent/client.go index 8427b56..9e205e5 100644 --- a/starter/ent/client.go +++ b/starter/ent/client.go @@ -9,11 +9,11 @@ import ( "log" "reflect" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/migrate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/migrate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "entgo.io/ent" "entgo.io/ent/dialect" diff --git a/starter/ent/ent.go b/starter/ent/ent.go index 599b1ef..9d734b1 100644 --- a/starter/ent/ent.go +++ b/starter/ent/ent.go @@ -6,9 +6,9 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "reflect" "sync" diff --git a/starter/ent/enttest/enttest.go b/starter/ent/enttest/enttest.go index 7fb45c5..40823c9 100644 --- a/starter/ent/enttest/enttest.go +++ b/starter/ent/enttest/enttest.go @@ -5,11 +5,11 @@ package enttest import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent" // required by schema hooks. - _ "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/runtime" + _ "git.gorlug.de/code/golang/ersteller-lib/starter/ent/runtime" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/migrate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/migrate" "entgo.io/ent/dialect/sql/schema" ) diff --git a/starter/ent/googleauth.go b/starter/ent/googleauth.go index 85bd79a..719faca 100644 --- a/starter/ent/googleauth.go +++ b/starter/ent/googleauth.go @@ -5,9 +5,9 @@ package ent import ( "encoding/json" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/schema" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/schema" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "strings" "time" diff --git a/starter/ent/googleauth/where.go b/starter/ent/googleauth/where.go index 26d4c5a..2a83d39 100644 --- a/starter/ent/googleauth/where.go +++ b/starter/ent/googleauth/where.go @@ -3,7 +3,7 @@ package googleauth import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" "time" "entgo.io/ent/dialect/sql" diff --git a/starter/ent/googleauth_create.go b/starter/ent/googleauth_create.go index afb5dc9..7ba9faa 100644 --- a/starter/ent/googleauth_create.go +++ b/starter/ent/googleauth_create.go @@ -6,9 +6,9 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/schema" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/schema" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "time" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/starter/ent/googleauth_delete.go b/starter/ent/googleauth_delete.go index 37fdb09..f509980 100644 --- a/starter/ent/googleauth_delete.go +++ b/starter/ent/googleauth_delete.go @@ -4,8 +4,8 @@ package ent import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/starter/ent/googleauth_query.go b/starter/ent/googleauth_query.go index 5308501..9d6f638 100644 --- a/starter/ent/googleauth_query.go +++ b/starter/ent/googleauth_query.go @@ -5,9 +5,9 @@ package ent import ( "context" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "math" "entgo.io/ent" diff --git a/starter/ent/googleauth_update.go b/starter/ent/googleauth_update.go index 70e0f4d..6af6abd 100644 --- a/starter/ent/googleauth_update.go +++ b/starter/ent/googleauth_update.go @@ -6,10 +6,10 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/schema" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/schema" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "time" "entgo.io/ent/dialect/sql" diff --git a/starter/ent/hook/hook.go b/starter/ent/hook/hook.go index 8a87be0..6d44f9e 100644 --- a/starter/ent/hook/hook.go +++ b/starter/ent/hook/hook.go @@ -5,7 +5,7 @@ package hook import ( "context" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent" ) // The GoogleAuthFunc type is an adapter to allow the use of ordinary diff --git a/starter/ent/mutation.go b/starter/ent/mutation.go index f250af0..af2b425 100644 --- a/starter/ent/mutation.go +++ b/starter/ent/mutation.go @@ -6,11 +6,11 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/schema" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/schema" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "sync" "time" diff --git a/starter/ent/runtime.go b/starter/ent/runtime.go index 5eddfd0..7ed7868 100644 --- a/starter/ent/runtime.go +++ b/starter/ent/runtime.go @@ -3,10 +3,10 @@ package ent import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/googleauth" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/schema" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/googleauth" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/schema" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "time" ) diff --git a/starter/ent/todo.go b/starter/ent/todo.go index dd40f57..a3aaa7c 100644 --- a/starter/ent/todo.go +++ b/starter/ent/todo.go @@ -4,8 +4,8 @@ package ent import ( "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "strings" "time" diff --git a/starter/ent/todo/where.go b/starter/ent/todo/where.go index 3b568d6..91d908e 100644 --- a/starter/ent/todo/where.go +++ b/starter/ent/todo/where.go @@ -3,7 +3,7 @@ package todo import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" "time" "entgo.io/ent/dialect/sql" diff --git a/starter/ent/todo_create.go b/starter/ent/todo_create.go index de47004..3118140 100644 --- a/starter/ent/todo_create.go +++ b/starter/ent/todo_create.go @@ -6,8 +6,8 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "time" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/starter/ent/todo_delete.go b/starter/ent/todo_delete.go index fd9f807..ac1e26c 100644 --- a/starter/ent/todo_delete.go +++ b/starter/ent/todo_delete.go @@ -4,8 +4,8 @@ package ent import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/starter/ent/todo_query.go b/starter/ent/todo_query.go index 87e27a2..ecba44e 100644 --- a/starter/ent/todo_query.go +++ b/starter/ent/todo_query.go @@ -5,9 +5,9 @@ package ent import ( "context" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "math" "entgo.io/ent" diff --git a/starter/ent/todo_update.go b/starter/ent/todo_update.go index b9b4720..d7a2e9a 100644 --- a/starter/ent/todo_update.go +++ b/starter/ent/todo_update.go @@ -6,9 +6,9 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "time" "entgo.io/ent/dialect/sql" diff --git a/starter/ent/user.go b/starter/ent/user.go index 1c80bf9..fc16222 100644 --- a/starter/ent/user.go +++ b/starter/ent/user.go @@ -4,7 +4,7 @@ package ent import ( "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "strings" "time" diff --git a/starter/ent/user/where.go b/starter/ent/user/where.go index dbfa333..e9e26f5 100644 --- a/starter/ent/user/where.go +++ b/starter/ent/user/where.go @@ -3,7 +3,7 @@ package user import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" "time" "entgo.io/ent/dialect/sql" diff --git a/starter/ent/user_create.go b/starter/ent/user_create.go index 77e531c..30659ac 100644 --- a/starter/ent/user_create.go +++ b/starter/ent/user_create.go @@ -6,7 +6,7 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "time" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/starter/ent/user_delete.go b/starter/ent/user_delete.go index 48aa4ec..1327401 100644 --- a/starter/ent/user_delete.go +++ b/starter/ent/user_delete.go @@ -4,8 +4,8 @@ package ent import ( "context" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" diff --git a/starter/ent/user_query.go b/starter/ent/user_query.go index de62450..e238197 100644 --- a/starter/ent/user_query.go +++ b/starter/ent/user_query.go @@ -5,8 +5,8 @@ package ent import ( "context" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "math" "entgo.io/ent" diff --git a/starter/ent/user_update.go b/starter/ent/user_update.go index b692f38..5fae69d 100644 --- a/starter/ent/user_update.go +++ b/starter/ent/user_update.go @@ -6,8 +6,8 @@ import ( "context" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/predicate" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/predicate" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" "time" "entgo.io/ent/dialect/sql" diff --git a/starter/generate_schema.go b/starter/generate_schema.go index c6dba22..4806bb0 100644 --- a/starter/generate_schema.go +++ b/starter/generate_schema.go @@ -1,7 +1,7 @@ package main import ( - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/create" + "git.gorlug.de/code/golang/ersteller-lib/starter/create" "log" "path" diff --git a/starter/go.mod b/starter/go.mod index e674a91..9b0b203 100644 --- a/starter/go.mod +++ b/starter/go.mod @@ -1,4 +1,4 @@ -module git.gorlug.de/code/golang/ersteller-lib/ersteller/starter +module git.gorlug.de/code/golang/ersteller-lib/starter go 1.25.0 diff --git a/starter/google/database.go b/starter/google/database.go index 2310cae..dfe5912 100644 --- a/starter/google/database.go +++ b/starter/google/database.go @@ -4,8 +4,8 @@ import ( "context" ersteller_lib "ersteller-lib" google_http "ersteller-lib/authentication/google/http" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/user" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/user" ) type Database struct { diff --git a/starter/main.go b/starter/main.go index cea17c8..0e1777a 100644 --- a/starter/main.go +++ b/starter/main.go @@ -3,9 +3,9 @@ package main import ( "context" . "ersteller-lib" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/env" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/routes" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent" + "git.gorlug.de/code/golang/ersteller-lib/starter/env" + "git.gorlug.de/code/golang/ersteller-lib/starter/routes" "log" "net/http" "time" diff --git a/starter/routes/routing.go b/starter/routes/routing.go index b5e7821..31bb93e 100644 --- a/starter/routes/routing.go +++ b/starter/routes/routing.go @@ -4,15 +4,15 @@ import ( . "ersteller-lib" "ersteller-lib/authentication" google_http "ersteller-lib/authentication/google/http" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/about" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/contact" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/env" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/google" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/index" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/login" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/page" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/todos" + "git.gorlug.de/code/golang/ersteller-lib/starter/about" + "git.gorlug.de/code/golang/ersteller-lib/starter/contact" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent" + "git.gorlug.de/code/golang/ersteller-lib/starter/env" + "git.gorlug.de/code/golang/ersteller-lib/starter/google" + "git.gorlug.de/code/golang/ersteller-lib/starter/index" + "git.gorlug.de/code/golang/ersteller-lib/starter/login" + "git.gorlug.de/code/golang/ersteller-lib/starter/page" + "git.gorlug.de/code/golang/ersteller-lib/starter/todos" "net/http" "github.com/gorilla/sessions" diff --git a/starter/todos/todos.go b/starter/todos/todos.go index 7c041ef..6d2d6e5 100644 --- a/starter/todos/todos.go +++ b/starter/todos/todos.go @@ -7,8 +7,8 @@ import ( "strings" . "ersteller-lib" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent" - "git.gorlug.de/code/golang/ersteller-lib/ersteller/starter/ent/todo" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent" + "git.gorlug.de/code/golang/ersteller-lib/starter/ent/todo" . "maragu.dev/gomponents" . "maragu.dev/gomponents/html" diff --git a/strings.go b/strings.go index 1a70fa3..09f0ab2 100644 --- a/strings.go +++ b/strings.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "bytes" diff --git a/tracing.go b/tracing.go index bc11175..0de8dfb 100644 --- a/tracing.go +++ b/tracing.go @@ -1,4 +1,4 @@ -package ersteller +package ersteller_lib import ( "encoding/json" diff --git a/user/user_repository.go b/user/user_repository.go index cb8f084..460dfe6 100644 --- a/user/user_repository.go +++ b/user/user_repository.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" "fmt" - "git.gorlug.de/code/golang/ersteller-lib/ersteller" + "git.gorlug.de/code/golang/ersteller-lib" "github.com/doug-martin/goqu/v9" _ "github.com/doug-martin/goqu/v9/dialect/postgres" "github.com/doug-martin/goqu/v9/exp" @@ -41,13 +41,13 @@ func (r *UserRepository) Create(user User) (int, error) { Returning("id"). ToSQL() if err != nil { - ersteller.LogError("error creating create User sql: %v", err) + ersteller_lib.LogError("error creating create User sql: %v", err) return -1, err } rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.LogError("error creating User: %v", err) + ersteller_lib.LogError("error creating User: %v", err) return -1, err } defer rows.Close() @@ -55,11 +55,11 @@ func (r *UserRepository) Create(user User) (int, error) { if rows.Next() { err = rows.Scan(&id) if err != nil { - ersteller.LogError("error scanning User: %v", err) + ersteller_lib.LogError("error scanning User: %v", err) return -1, err } } else { - ersteller.Error("User already exists") + ersteller_lib.Error("User already exists") return -1, UserAlreadyExistsError{User: user} } @@ -82,7 +82,7 @@ func (r *UserRepository) getSelectColumns() []any { } func (r *UserRepository) Read(id int) (User, error) { - ersteller.Debug("Getting User by id ", id) + ersteller_lib.Debug("Getting User by id ", id) sql, args, _ := r.dialect.From("user"). Prepared(true). Select(r.getSelectColumns()...). @@ -93,7 +93,7 @@ func (r *UserRepository) Read(id int) (User, error) { rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.Error("Failed to get User: ", err) + ersteller_lib.Error("Failed to get User: ", err) } defer rows.Close() if rows.Next() { @@ -167,13 +167,13 @@ func (r *UserRepository) Update(user User) error { }). ToSQL() if err != nil { - ersteller.LogError("error creating update User sql: %v", err) + ersteller_lib.LogError("error creating update User sql: %v", err) return err } _, err = r.connPool.Exec(context.Background(), sql, args...) if err != nil { - ersteller.LogError("error updating User: %v", err) + ersteller_lib.LogError("error updating User: %v", err) return err } @@ -188,13 +188,13 @@ func (r *UserRepository) Delete(id int) error { }). ToSQL() if err != nil { - ersteller.LogError("error creating delete User sql: %v", err) + ersteller_lib.LogError("error creating delete User sql: %v", err) return err } _, err = r.connPool.Exec(context.Background(), sql, args...) if err != nil { - ersteller.LogError("error deleting User: %v", err) + ersteller_lib.LogError("error deleting User: %v", err) return err } @@ -285,7 +285,7 @@ func (r *UserRepository) GetPage(params UserPaginationParams) ([]User, int, erro rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.LogError("failed to run sql query: %v", err) + ersteller_lib.LogError("failed to run sql query: %v", err) return nil, -1, err } defer rows.Close() @@ -342,7 +342,7 @@ func (r *UserRepository) DoesUserEmailExist(email string) (bool, error) { rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.LogError("failed to run sql query: %v", err) + ersteller_lib.LogError("failed to run sql query: %v", err) return false, err } defer rows.Close() @@ -366,7 +366,7 @@ func (r *UserRepository) GetUserId(email string) (int, error) { rows, err := r.connPool.Query(context.Background(), sql, args...) if err != nil { - ersteller.LogError("failed to run sql query: %v", err) + ersteller_lib.LogError("failed to run sql query: %v", err) return -1, err } defer rows.Close() @@ -396,5 +396,5 @@ func (r *UserRepository) VerifyPassword(email string, password string) (bool, in if err != nil { return false, -1, err } - return ersteller.VerifyPassword(password, user.Password), userId, nil + return ersteller_lib.VerifyPassword(password, user.Password), userId, nil }