# ----------------------------------------------------
# GENERAL APPLICATION SETTINGS
# ----------------------------------------------------
# Set application environment: "development" or "production"
APP_ENV=development
# Set gin mode: "debug" or "release"
GIN_MODE=debug

# ----------------------------------------------------
# SERVER CONFIGURATION
# ----------------------------------------------------
# Enable/disable REST and gRPC servers
SERVER_REST_ENABLED=true
SERVER_GRPC_ENABLED=false

# Ports for the servers
SERVER_REST_PORT=8094
SERVER_GRPC_PORT=50051

# Server timeouts in seconds
SERVER_READ_TIMEOUT=10
SERVER_WRITE_TIMEOUT=10

# ----------------------------------------------------
# DATABASE CONFIGURATION (Example for 'default' PostgreSQL)
# ----------------------------------------------------
# --- Primary 'default' Database ---
POSTGRES_DEFAULT_HOST=10.10.123.206
POSTGRES_DEFAULT_PORT=5432
POSTGRES_DEFAULT_USERNAME=postgres
POSTGRES_DEFAULT_PASSWORD=rss@j@y@2025
POSTGRES_DEFAULT_DATABASE=health
POSTGRES_DEFAULT_SCHEMA=public
POSTGRES_DEFAULT_SSLMODE=disable

# --- Example for another database connection, e.g., 'farmasi' ---
# SQLSERVER_FARMASI_HOST=192.168.1.100
# SQLSERVER_FARMASI_PORT=1433
# SQLSERVER_FARMASI_USERNAME=sa
# SQLSERVER_FARMASI_PASSWORD=your_password
# SQLSERVER_FARMASI_DATABASE=db_farmasi

# ----------------------------------------------------
# AUTHENTICATION
# ----------------------------------------------------
# Auth provider type: "jwt", "keycloak", "static", "hybrid"
AUTH_TYPE=jwt

# --- JWT Settings ---
# Secret key for signing internal JWT tokens. CHANGE THIS!
JWT_SECRET=your_very_secret_and_long_jwt_key

# --- Keycloak Settings ---
KEYCLOAK_ENABLED=false
KEYCLOAK_URL=http://localhost:8080
KEYCLOAK_REALM=myrealm
KEYCLOAK_CLIENT_ID=my-go-client
KEYCLOAK_CLIENT_SECRET=your_keycloak_client_secret
# These are for token validation
KEYCLOAK_ISSUER=http://localhost:8080/realms/myrealm
KEYCLOAK_AUDIENCE=my-go-client
KEYCLOAK_JWKS_URL=http://localhost:8080/realms/myrealm/protocol/openid-connect/certs

# --- Static Token Settings (for simple machine-to-machine auth) ---
# AUTH_STATIC_TOKENS=token1,token2,token3

# ----------------------------------------------------
# CACHE CONFIGURATION (Redis)
# ----------------------------------------------------
CACHE_ENABLED=true
CACHE_REDIS_HOST=localhost
CACHE_REDIS_PORT=6379
REDIS_PASSWORD=
# Database for general cache
CACHE_REDIS_DB=1
# Database for rate limiting (can be the same or different)
RATE_LIMIT_REDIS_DB=0

# Cache TTLs
CACHE_DEFAULT_TTL=1h
CACHE_SESSION_TTL=24h
CACHE_RATE_LIMIT_TTL=1m

# ----------------------------------------------------
# SECURITY
# ----------------------------------------------------
# Comma-separated list of allowed origins for CORS
CORS_ORIGINS=http://localhost:3000,http://localhost:8080,http://meninjar.dev.rssa.id:8094
# For development, you can allow all origins by setting this to true
CORS_ALLOW_ALL=false

# Rate Limiting
RATE_LIMIT_REQUESTS_PER_MINUTE=100

# ----------------------------------------------------
# BRIDGING SERVICES
# ----------------------------------------------------
# --- BPJS VClaim ---
# BPJS_ENABLED=true
# BPJS_BASEURL=https://apijkn.bpjs-kesehatan.go.id
# BPJS_CONSID=5257
# BPJS_USERKEY=4cf1cbef8c008440bbe9ef9ba789e482
# BPJS_SECRETKEY=1bV363512D
# BPJS_TIMEOUT=30s

BPJS_ENABLED=true
BPJS_CONSID=16041
BPJS_SECRETKEY=8pP3D5431E
BPJS_USERKEY=467a2817fde5070f66c9a41fbeb8dc2c
BPJS_BASEURL=https://apijkn-dev.bpjs-kesehatan.go.id
BPJS_SERVICE_NAME=vclaim-rest-dev

# --- SatuSehat ---
SATU_SEHAT_ENABLED=true
BRIDGING_SATUSEHAT_ORG_ID=100026555
BRIDGING_SATUSEHAT_FASYAKES_ID=3573011
BRIDGING_SATUSEHAT_CLIENT_ID=l1ZgJGW6K5pnrqGUikWM7fgIoquA2AQ5UUG0U8WqHaq2VEyZ
BRIDGING_SATUSEHAT_CLIENT_SECRET=Al3PTYAW6axPiAFwaFlpn8qShLFW5YGMgG8w1qhexgCc7lGTEjjcR6zxa06ThPDy
BRIDGING_SATUSEHAT_AUTH_URL=https://api-satusehat.kemkes.go.id/oauth2/v1
BRIDGING_SATUSEHAT_BASE_URL=https://api-satusehat.kemkes.go.id/fhir-r4/v1

# ----------------------------------------------------
# SWAGGER DOCUMENTATION
# ----------------------------------------------------
SWAGGER_HOST=meninjar.dev.rssa.id:8094
SWAGGER_BASE_PATH=/api/v1
SWAGGER_SCHEMES=http,https
SWAGGER_TITLE=GoPrint Service API
SWAGGER_DESCRIPTION=API Documentation for GoPrint Service General

# ----------------------------------------------------
# LOGGER CONFIGURATION
# ----------------------------------------------------
# Log level: "debug", "info", "warn", "error"
LOGGER_LEVEL=debug
# Log format: "text" or "json"
LOGGER_FORMAT=text

