Compare commits

..

1 Commits

Author SHA1 Message Date
50dda77019 go.mod update priv git url 2024-05-30 17:01:18 +02:00
5 changed files with 5 additions and 45 deletions

View File

@@ -3,7 +3,7 @@ package api
import (
"fmt"
def "git.pbiernat.io/egommerce/api-entities/http"
def "git.pbiernat.dev/egommerce/api-entities/http"
"github.com/go-redis/redis/v8"
)

View File

@@ -3,7 +3,7 @@ package api
import (
"fmt"
def "git.pbiernat.io/egommerce/api-entities/http"
def "git.pbiernat.dev/egommerce/api-entities/http"
"github.com/go-redis/redis/v8"
)

View File

@@ -3,7 +3,6 @@ package config
import (
"os"
"github.com/gofiber/fiber/v2/log"
"github.com/joho/godotenv"
)
@@ -16,7 +15,7 @@ func init() {
func GetEnv(name string, defVal string) string {
env := os.Getenv(name)
if env == "" {
log.Panicf("Missing %s env variable", name)
return defVal
}
return env

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"time"
"git.pbiernat.io/egommerce/go-api-pkg/config"
"git.pbiernat.dev/egommerce/go-api-pkg/config"
consul "github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/connect"
)
@@ -178,8 +178,7 @@ func (s *Service) healthCheck() (bool, error) {
func (s *Service) getTags() []string {
tags := []string{
"traefik.enable=true",
// "traefik.http.routers." + s.Name + ".rule=PathPrefix(`" + s.pathPrefix + "`)",
"traefik.http.routers." + s.Name + ".rule=Host(`" + s.domain + "`)",
"traefik.http.routers." + s.Name + ".rule=PathPrefix(`" + s.pathPrefix + "`)",
"traefik.http.routers." + s.Name + ".entryPoints=https",
// "traefik.http.routers." + s.Name + ".tls=true",
"traefik.http.routers." + s.Name + ".service=" + s.Name,

View File

@@ -1,38 +0,0 @@
package redis
// import (
// "context"
// "strconv"
// "time"
// "github.com/go-redis/redis/v8"
// )
// func NewCache(host string, port int, password string) *redis.Client {
// redis := redis.NewClient(&redis.Options{
// Addr: host + ":" + strconv.Itoa(port),
// Password: password,
// DB: 0,
// })
// defer redis.Close()
// return redis
// }
// func Get(ctx context.Context, key string) (float64, error) {
// // ctx := context.Background() // FIXME
// price, err := s.cache.Get(ctx, key).Float64()
// if err != nil {
// s.log.Log("cache read error(key not exists): %#v", err)
// return 0, err
// }
// return price, nil
// }
// func Set(ctx context.Context, key string, value any, exp time.Duration) error {
// // ctx := context.Background() // FIXME
// s.cache.Set(ctx, key, value, exp)
// return nil
// }