27 lines
433 B
Go
27 lines
433 B
Go
package constants
|
|
|
|
type PlanType string
|
|
|
|
const (
|
|
PlanBasic PlanType = "basic"
|
|
PlanPremium PlanType = "premium"
|
|
PlanEnterprise PlanType = "enterprise"
|
|
)
|
|
|
|
func GetAllPlanTypes() []PlanType {
|
|
return []PlanType{
|
|
PlanBasic,
|
|
PlanPremium,
|
|
PlanEnterprise,
|
|
}
|
|
}
|
|
|
|
func IsValidPlanType(planType PlanType) bool {
|
|
for _, validType := range GetAllPlanTypes() {
|
|
if planType == validType {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|