checktcl

package
v1.16.30-beta2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetOrganizationPlanRequest

type GetOrganizationPlanRequest struct{}

type GetOrganizationPlanResponse

type GetOrganizationPlanResponse struct {
	TestkubeMode string
	IsTrial      bool
	PlanStatus   string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL