Skip to content

Commit

Permalink
dev3 resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Gvidow committed Dec 20, 2023
2 parents dd2e177 + 255906c commit a4cfa2b
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 463 deletions.
4 changes: 2 additions & 2 deletions cmd/realtime/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import (
"fmt"
"net"

"github.com/joho/godotenv"
"google.golang.org/grpc"

rt "github.com/go-park-mail-ru/2023_2_OND_team/internal/api/realtime"
"github.com/go-park-mail-ru/2023_2_OND_team/internal/microservices/realtime"
grpcMetrics "github.com/go-park-mail-ru/2023_2_OND_team/internal/pkg/metrics/grpc"
"github.com/go-park-mail-ru/2023_2_OND_team/internal/pkg/middleware/grpc/interceptor"
"github.com/go-park-mail-ru/2023_2_OND_team/pkg/logger"
"github.com/joho/godotenv"
)

const _address = "0.0.0.0:8090"
const _address = "localhost:8090"

func main() {
godotenv.Load()
Expand Down
2 changes: 1 addition & 1 deletion configs/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app:
server:
host: 0.0.0.0
host: 127.0.0.1
port: 8080
https: true
certFile: /home/ond_team/cert/fullchain.pem
Expand Down
2 changes: 1 addition & 1 deletion deployments/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ services:
- /:/rootfs:ro
ports:
- "9100:9100"

volumes:
postgres_storage: {}
redis_storage: {}
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/go-park-mail-ru/2023_2_OND_team
go 1.19

require (
cloud.google.com/go/vision v1.2.0
cloud.google.com/go/vision/v2 v2.7.5
github.com/IBM/sarama v1.42.1
github.com/Masterminds/squirrel v1.5.4
Expand All @@ -29,6 +28,7 @@ require (
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.14.0
golang.org/x/image v0.13.0
google.golang.org/api v0.149.0
google.golang.org/grpc v1.60.0
google.golang.org/protobuf v1.31.0
nhooyr.io/websocket v1.8.10
Expand Down Expand Up @@ -100,7 +100,6 @@ require (
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/api v0.149.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231211222908-989df2bf70f3 // indirect
Expand Down
446 changes: 0 additions & 446 deletions go.sum

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ func Run(ctx context.Context, log *log.Logger, cfg ConfigFiles) {
}
defer pool.Close()

// connMessMS, err := grpc.Dial("localhost:8095", grpc.WithTransportCredentials(insecure.NewCredentials()))
connMessMS, err := grpc.Dial(os.Getenv("MESSENGER_SERVICE_HOST")+":"+os.Getenv("MESSENGER_SERVICE_PORT"), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Error(err.Error())
return
}
defer connMessMS.Close()

// connRealtime, err := grpc.Dial("localhost:8090", grpc.WithTransportCredentials(insecure.NewCredentials()))
connRealtime, err := grpc.Dial(os.Getenv("REALTIME_SERVICE_HOST")+":"+os.Getenv("REALTIME_SERVICE_PORT"), grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Error(err.Error())
Expand Down
5 changes: 0 additions & 5 deletions internal/app/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,10 @@ func Run(ctx context.Context, log *logger.Logger, cfg Config) {
ctxRedis, cancelCtxRedis := context.WithTimeout(ctx, _timeoutForConnRedis)
defer cancelCtxRedis()

// redisCfg, err := app.NewConfig(cfg.RedisFileConfig)
redisCfg := app.RedisConfig{
Addr: os.Getenv("REDIS_HOST") + ":" + os.Getenv("REDIS_PORT"),
Password: os.Getenv("REDIS_PASSWORD"),
}
// if err != nil {
// log.Error(err.Error())
// return
// }

redisCl, err := app.NewRedisClient(ctxRedis, redisCfg)
if err != nil {
Expand Down
23 changes: 23 additions & 0 deletions internal/pkg/delivery/http/v1/search_errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package v1

import errPkg "github.com/go-park-mail-ru/2023_2_OND_team/internal/pkg/errors"

type ErrNoData struct{}

func (e *ErrNoData) Error() string {
return "Can't find any user/board/pin"
}

func (e *ErrNoData) Type() errPkg.Type {
return errPkg.ErrNotFound
}

type ErrInvalidTemplate struct{}

func (e *ErrInvalidTemplate) Error() string {
return "Invalid template has been provided"
}

func (e *ErrInvalidTemplate) Type() errPkg.Type {
return errPkg.ErrInvalidInput
}
15 changes: 15 additions & 0 deletions internal/pkg/usecase/comment/mock/comment_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions internal/pkg/usecase/image/mock/image_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a4cfa2b

Please sign in to comment.