mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-15 21:21:30 +08:00

* feat: setup for licenses v3 integration * feat: added some more logic * feat: validator changes * chore: added a couple of todos * feat: added config parameter for licenses v3 and the boot option * feat: some typo fix * feat: added refresh licenses handler * feat: handle the start manager license activation * chore: text updates * feat: added list licenses call * chore: refactor the entire code to cleanup interfaces * fix: nil pointer error * chore: some minor edits * feat: model changes * feat: model changes * fix: utilise factory pattern * feat: added default basic plan * chore: added test cases for new license function * feat: added more test cases * chore: make the licenses id not null * feat: cosmetic changes * feat: cosmetic changes * feat: update zeus URL * chore: license testing fixes * feat: added license status and category handling for query-service * chore: added v3 support in v2 endpoint * chore: http response codes and some code cleanup * chore: added detailed test cases * chore: address review comments * chore: some misc cleanup
34 lines
884 B
Go
34 lines
884 B
Go
package constants
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
DefaultSiteURL = "https://localhost:3301"
|
|
)
|
|
|
|
var LicenseSignozIo = "https://license.signoz.io/api/v1"
|
|
var LicenseAPIKey = GetOrDefaultEnv("SIGNOZ_LICENSE_API_KEY", "")
|
|
var SaasSegmentKey = GetOrDefaultEnv("SIGNOZ_SAAS_SEGMENT_KEY", "")
|
|
var FetchFeatures = GetOrDefaultEnv("FETCH_FEATURES", "false")
|
|
var ZeusFeaturesURL = GetOrDefaultEnv("ZEUS_FEATURES_URL", "ZeusFeaturesURL")
|
|
var ZeusURL = GetOrDefaultEnv("ZEUS_URL", "ZeusURL")
|
|
|
|
func GetOrDefaultEnv(key string, fallback string) string {
|
|
v := os.Getenv(key)
|
|
if len(v) == 0 {
|
|
return fallback
|
|
}
|
|
return v
|
|
}
|
|
|
|
// constant functions that override env vars
|
|
|
|
// GetDefaultSiteURL returns default site url, primarily
|
|
// used to send saml request and allowing backend to
|
|
// handle http redirect
|
|
func GetDefaultSiteURL() string {
|
|
return GetOrDefaultEnv("SIGNOZ_SITE_URL", DefaultSiteURL)
|
|
}
|