init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user