package code

// Apiserver: apiserver errors.
// Code must start with 11xxxx.
const (
	// ErrGetAuthingTokenInfo - 200: Cannot get authing token from context.
	ErrGetAuthingTokenInfo int = iota + 110001
	// ErrUserNotFound - 404: User not found.
	ErrUserNotFound
	// ErrNoAuthingAppIdSecret - 200: Cannot get valid authing appid and appsecret.
	ErrNoAuthingAppIdSecret
)

const (
	// ErrNoLarkAppIdSecret - 200: Cannot get valid lark app appid and appsecret.
	ErrNoLarkAppIdSecret int = iota + 110201
	// ErrLarkApiBizErrorCode - 200: Cannot get valid lark app appid and appsecret.
	ErrLarkApiBizErrorCode
	// ErrLarkRequestFail - 200: Lark request failed.
	ErrLarkRequestFail
)

const (
	// ErrNoBQSAFile - 500: Cannot get bigquery service_account file.
	ErrNoBQSAFile int = iota + 110301
	// ErrBGServiceFailed - 500: Cannot new bigquery service.
	ErrBGServiceFailed
)

const (
	// ErrResourceNotFound - 404: Cannot find cloud resource.
	ErrResourceNotFound int = iota + 110401
)

const (
	// ErrApprovalNotFound - 404: Approval not found.
	ErrApprovalNotFound int = iota + 110501
	// ErrNotCloudOwner - 403: You must be the owner to submit this approval.
	ErrNotCloudOwner
	// ErrNotApprovalOwner - 403: You must be the owner of the approval.
	ErrNotApprovalOwner
	// ErrApprovalType - 400: Approval type invalid.
	ErrApprovalType
)

// biz validate errors.
const (
	// ErrOverBudget - 200: Over budget.
	ErrOverBudget int = iota + 110601
	// ErrBudgetLowerThanCost - 200: Budget is lower than actual cost.
	ErrBudgetLowerThanCost
	// ErrBudgetNotFound - 200: Budget not found.
	ErrBudgetNotFound
)
