|
|
|
@ -11,6 +11,7 @@ import ( |
|
|
|
|
api "git.slaventius.ru/test3k/umate/pkg/api" |
|
|
|
|
|
|
|
|
|
"google.golang.org/grpc" |
|
|
|
|
"google.golang.org/grpc/credentials/insecure" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
type AuthDBClient struct { |
|
|
|
@ -22,7 +23,8 @@ type AuthDBClient struct { |
|
|
|
|
|
|
|
|
|
func NewDBClient(ctx context.Context, config *config.Config) *AuthDBClient { |
|
|
|
|
conStr := net.JoinHostPort(config.Db.Host, strconv.Itoa(config.Db.Port)) |
|
|
|
|
client, err := grpc.Dial(conStr, grpc.WithInsecure()) |
|
|
|
|
// client, err := grpc.Dial(conStr, grpc.WithInsecure())
|
|
|
|
|
client, err := grpc.Dial(conStr, grpc.WithTransportCredentials(insecure.NewCredentials())) |
|
|
|
|
if err != nil { |
|
|
|
|
log.Fatal(err) |
|
|
|
|
} |
|
|
|
|