Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetOrganizationPlanRequest ¶
type GetOrganizationPlanRequest struct{}
type OrganizationPlan ¶
type OrganizationPlan struct { // Enterprise / Pro mode. TestkubeMode OrganizationPlanTestkubeMode `json:"testkubeMode"` // Is current plan trial. IsTrial bool `json:"isTrial"` PlanStatus PlanStatus `json:"planStatus"` }
Ref: #/components/schemas/OrganizationPlan
type OrganizationPlanTestkubeMode ¶
type OrganizationPlanTestkubeMode string
Enterprise / Pro mode.
const ( OrganizationPlanTestkubeModeEnterprise OrganizationPlanTestkubeMode = "enterprise" // TODO: Use "pro" in the future when refactoring TK Pro API server to use "pro" instead of "cloud" OrganizationPlanTestkubeModePro OrganizationPlanTestkubeMode = "cloud" )
type PlanStatus ¶
type PlanStatus string
Ref: #/components/schemas/PlanStatus
const ( PlanStatusActive PlanStatus = "Active" PlanStatusCanceled PlanStatus = "Canceled" PlanStatusIncomplete PlanStatus = "Incomplete" PlanStatusIncompleteExpired PlanStatus = "IncompleteExpired" PlanStatusPastDue PlanStatus = "PastDue" PlanStatusTrailing PlanStatus = "Trailing" PlanStatusUnpaid PlanStatus = "Unpaid" PlanStatusDeleted PlanStatus = "Deleted" PlanStatusLocked PlanStatus = "Locked" PlanStatusBlocked PlanStatus = "Blocked" )
type SubscriptionChecker ¶
type SubscriptionChecker struct {
// contains filtered or unexported fields
}
func NewSubscriptionChecker ¶
func NewSubscriptionChecker(ctx context.Context, proContext config.ProContext, cloudClient cloud.TestKubeCloudAPIClient, grpcConn *grpc.ClientConn) (*SubscriptionChecker, error)
NewSubscriptionChecker creates a new subscription checker using the agent token
func (*SubscriptionChecker) GetCurrentOrganizationPlan ¶
func (c *SubscriptionChecker) GetCurrentOrganizationPlan() (*OrganizationPlan, error)
GetCurrentOrganizationPlan returns current organization plan
func (*SubscriptionChecker) IsOrgPlanActive ¶
func (c *SubscriptionChecker) IsOrgPlanActive() (bool, error)
IsOrgPlanActive checks if organization plan is active
func (*SubscriptionChecker) IsOrgPlanEnterprise ¶
func (c *SubscriptionChecker) IsOrgPlanEnterprise() (bool, error)
IsOrgPlanEnterprise checks if organization plan is enterprise
func (*SubscriptionChecker) IsOrgPlanPro ¶
func (c *SubscriptionChecker) IsOrgPlanPro() (bool, error)
IsOrgPlanCloud checks if organization plan is cloud
Click to show internal directories.
Click to hide internal directories.