mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 13:29:56 +02:00
* feat: added manual sync handler for license refetch * chore: add workspace license refresh endpoint * chore: license sync request endpoint * feat: added delink route inside monitor * feat: added license delink route for delinking license * chore: license delink endpoint * feat: added delink route * chore: license deactivation * chore: license sync and deactivation for self managed users. * chore: license sync and deactivation changes * feat: handle case for free workspace * chore: UI and UX updates. * style: minor UI improvement. --------- Co-authored-by: Henit Chobisa <chobisa.henit@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
38 lines
1.4 KiB
Go
38 lines
1.4 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
|
|
UNABLE_TO_DEACTIVATE_LICENSE
|
|
)
|
|
|
|
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",
|
|
UNABLE_TO_DEACTIVATE_LICENSE: "Unable to activate license",
|
|
}
|
|
|
|
// 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]
|
|
}
|