Files
plane/monitor/lib/api/constants.go
Henit Chobisa 8786675b3c feat: added prices and plans endpoint inside monitor, and prime ecosystem (#1146)
* feat: added endpoint for retrieving plans

* feat: added routes for retrieving and generating payment link

* chore: self-hosted upgrade.

* chore: self-hosted one upgrade.

* chore: product and payment link generation

* chore: count workspace members

* chore: activation modal.

* chore: self managed instance workspace upgrade modal.

* chore: billable members.

* chore: remove changelogs redirection from workspace pages header.

* chore: update seat count logic

* fix: exit process if monitor fails to decrypt feature flags

* chore: added docker compose rule to restart the monitor container for only 5 attempts

---------

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
2024-09-17 13:03:54 +05:30

36 lines
1.3 KiB
Go

package prime_api
type ErrorCode int
const (
NO_ERROR ErrorCode = iota
UNABLE_TO_POST_SERVICE_STATUS
UNABLE_TO_GET_FEATURE_FLAGS
UNABLE_TO_ACTIVATE_WORKSPACE
UNABLE_TO_PARSE_FEATURE_FLAGS
UNABLE_TO_SYNC_WORKSPACE
UNABLE_TO_UPDATE_SEATS
UNABLE_TO_FETCH_WORKSPACE_SUBSCRIPTION
UNABLE_TO_RETRIEVE_PLANS
UNABLE_TO_PARSE_PLANS
)
var errorCodeMap = map[ErrorCode]string{
NO_ERROR: "",
UNABLE_TO_POST_SERVICE_STATUS: "Unable to post service status",
UNABLE_TO_GET_FEATURE_FLAGS: "Unable to get feature flags",
UNABLE_TO_PARSE_FEATURE_FLAGS: "Unable to parse feature flags",
UNABLE_TO_ACTIVATE_WORKSPACE: "Unable to activate workspace, please check the logs",
UNABLE_TO_SYNC_WORKSPACE: "Unable to sync workspace, please check the logs",
UNABLE_TO_UPDATE_SEATS: "Unable to update seats for the license subscription",
UNABLE_TO_FETCH_WORKSPACE_SUBSCRIPTION: "Unable to fetch workspace subscription",
UNABLE_TO_RETRIEVE_PLANS: "Unable to retrieve plans",
UNABLE_TO_PARSE_PLANS: "Unable to parse plans",
}
// Converting the Error Code type to confirm to the stringer interface to be
// used in error messages and print statements, ;)
func (code ErrorCode) String() string {
return errorCodeMap[code]
}