mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 21:40:18 +02:00
* feat: added cron for updating feature flags on interval * feat: added logic for updating seats in monitor * feat: updated sync handler for using prime sync endpoint * feat: added instance initialization on monitor boot * chore: added new vars for monitor * fix: license seats purchase validation flow * dev: update invite return response * remove: workspace license task to avoid creation of duplicate licenses * dev: add more seats flow. * fix: resync licenses * chore: subscription portal endpoint --------- Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com> Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
32 lines
1.1 KiB
Go
32 lines
1.1 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
|
|
)
|
|
|
|
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",
|
|
}
|
|
|
|
// 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]
|
|
}
|