Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

NOISSUE - Align Users Documentation #71

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions cmd/users/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,21 @@ const (
svcName = "users"
envPrefixDB = "MG_USERS_DB_"
envPrefixHTTP = "MG_USERS_HTTP_"
envPrefixGrpc = "MG_USERS_GRPC_"
envPrefixAuth = "MG_AUTH_GRPC_"
defDB = "users"
defSvcHTTPPort = "9002"
defSvcGRPCPort = "9192"
)

type config struct {
LogLevel string `env:"MG_USERS_LOG_LEVEL" envDefault:"info"`
SecretKey string `env:"MG_USERS_SECRET_KEY" envDefault:"secret"`
AdminEmail string `env:"MG_USERS_ADMIN_EMAIL" envDefault:""`
AdminPassword string `env:"MG_USERS_ADMIN_PASSWORD" envDefault:""`
AdminEmail string `env:"MG_USERS_ADMIN_EMAIL" envDefault:"[email protected]"`
AdminPassword string `env:"MG_USERS_ADMIN_PASSWORD" envDefault:"12345678"`
PassRegexText string `env:"MG_USERS_PASS_REGEX" envDefault:"^.{8,}$"`
ResetURL string `env:"MG_TOKEN_RESET_ENDPOINT" envDefault:"/reset-request"`
JaegerURL url.URL `env:"MG_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
JaegerURL url.URL `env:"MG_JAEGER_URL" envDefault:"http://localhost:14268/api/traces"`
SendTelemetry bool `env:"MG_SEND_TELEMETRY" envDefault:"true"`
InstanceID string `env:"MG_USERS_INSTANCE_ID" envDefault:""`
ESURL string `env:"MG_USERS_ES_URL" envDefault:"redis://localhost:6379/0"`
ESURL string `env:"MG_USERS_ES_URL" envDefault:"nats://localhost:4222"`
TraceRatio float64 `env:"MG_JAEGER_TRACE_RATIO" envDefault:"1.0"`
PassRegex *regexp.Regexp
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/ws/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
type config struct {
LogLevel string `env:"MG_WS_ADAPTER_LOG_LEVEL" envDefault:"info"`
BrokerURL string `env:"MG_MESSAGE_BROKER_URL" envDefault:"nats://localhost:4222"`
JaegerURL url.URL `env:"MG_JAEGER_URL" envDefault:"http://jaeger:14268/api/traces"`
JaegerURL url.URL `env:"MG_JAEGER_URL" envDefault:"http://localhost:14268/api/traces"`
SendTelemetry bool `env:"MG_SEND_TELEMETRY" envDefault:"true"`
InstanceID string `env:"MG_WS_ADAPTER_INSTANCE_ID" envDefault:""`
TraceRatio float64 `env:"MG_JAEGER_TRACE_RATIO" envDefault:"1.0"`
Expand Down
18 changes: 9 additions & 9 deletions internal/clients/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ var (
)

type Config struct {
Host string `env:"HOST,notEmpty" envDefault:"localhost"`
Port string `env:"PORT,notEmpty" envDefault:"5432"`
User string `env:"USER,notEmpty" envDefault:"magistrala"`
Pass string `env:"PASS,notEmpty" envDefault:"magistrala"`
Name string `env:"NAME" envDefault:""`
SSLMode string `env:"SSL_MODE,notEmpty" envDefault:"disable"`
SSLCert string `env:"SSL_CERT" envDefault:""`
SSLKey string `env:"SSL_KEY" envDefault:""`
SSLRootCert string `env:"SSL_ROOT_CERT" envDefault:""`
Host string `env:"HOST" envDefault:"localhost"`
Port string `env:"PORT" envDefault:"5432"`
User string `env:"USER" envDefault:"magistrala"`
Pass string `env:"PASS" envDefault:"magistrala"`
Name string `env:"NAME" envDefault:""`
SSLMode string `env:"SSL_MODE" envDefault:"disable"`
SSLCert string `env:"SSL_CERT" envDefault:""`
SSLKey string `env:"SSL_KEY" envDefault:""`
SSLRootCert string `env:"SSL_ROOT_CERT" envDefault:""`
}

// Setup creates a connection to the PostgreSQL instance and applies any
Expand Down
Loading
Loading