package whereami

import "github.com/fiskerinc/cloud-services/pkg/utils/envtool"

var (
	Environment serviceEnvironment = serviceEnvironment(envtool.GetEnv("APP_SERVICE_ENVIRONMENT", ""))
	Service     serviceName        = serviceName(envtool.GetEnv("APP_SERVICE_NAME", ""))
)

func SetEnvironment(env serviceEnvironment) {
	Environment = env
}

func SetService(srv serviceName) {
	Service = srv
}

type serviceName string

const (
	AFTERSALES           serviceName = "AFTERSALES"
	ATTENDANT            serviceName = "ATTENDANT"
	AUTH                 serviceName = "COMPUTE_AUTH"
	BEACON               serviceName = "BEACON"
	CARGO                serviceName = "CARGO"
	CERT                 serviceName = "CERT"
	CERTINSTALL          serviceName = "CERTINSTALL"
	CHARGESIMULATOR      serviceName = "CHARGESIMULATOR"
	CONSUMER_WEB_CONNECT serviceName = "CONSUMER_WEB_CONNECT"
	DEPOT                serviceName = "DEPOT"
	DITTO                serviceName = "DITTO"
	EXTERNALAPI          serviceName = "EXTERNALAPI"
	GATEWAY              serviceName = "GATEWAY"
	JETFIRE              serviceName = "JETFIRE"
	KEYGEN               serviceName = "KEYGEN"
	MANUFACTURE          serviceName = "MANUFACTURE"
	MEGATRON             serviceName = "MEGATRON"
	ML_EVENT_DETECTION   serviceName = "ML_EVENT_DETECTION"
	NOTIFIER             serviceName = "NOTIFIER"
	OPTIMUS              serviceName = "OPTIMUS"
	OTA                  serviceName = "OTA"
	SMS_SERVICE          serviceName = "SMS_SERVICE"
	SUBSCRIPTION         serviceName = "SUBSCRIPTION"
	TIMEZONE             serviceName = "TIMEZONE"
	TOMTOM               serviceName = "TOMTOM"
	TREX_LOG             serviceName = "TREX_LOG"
	VALET                serviceName = "VALET"
	VEHICLEAPI           serviceName = "VEHICLEAPI"
)

type serviceEnvironment string

const (
	PRODUCTION     serviceEnvironment = "PRODUCTION"
	PRODUCTION_EU  serviceEnvironment = "PRODUCTION_EU"
	PRE_PRODUCTION serviceEnvironment = "PRE_PRODUCTION"
	STAGE          serviceEnvironment = "STAGE"
	DEVELOPMENT    serviceEnvironment = "DEVELOPMENT"
	LOCAL          serviceEnvironment = "LOCAL"
)
