Documentation
¶
Index ¶
Constants ¶
View Source
const (
// CommunityLicense is used by everyone who has not bought an enterprise license.
CommunityLicense = "00000000-0000-0000-0000-000000000000"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Checker ¶
type Checker struct{}
func NewChecker ¶
func NewChecker(quotaChecker QuotaChecker, fileHandler file.Handler) *Checker
func (*Checker) CheckLicense ¶
func (c *Checker) CheckLicense(ctx context.Context, provider cloudprovider.Provider, providerCfg config.ProviderConfig, printer func(string, ...any)) error
CheckLicense is a no-op for open source version of Constellation.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client interacts with the ES license server.
func NewClient ¶
func NewClient() *Client
NewClient creates a new client to interact with ES license server.
func (*Client) QuotaCheck ¶
func (c *Client) QuotaCheck(ctx context.Context, checkRequest QuotaCheckRequest) (QuotaCheckResponse, error)
QuotaCheck for a given license and action, passed via CheckQuotaRequest.
type QuotaCheckRequest ¶
type QuotaCheckRequest struct {
Action Action `json:"action"`
Provider string `json:"provider"`
License string `json:"license"`
}
QuotaCheckRequest is JSON request to license server to check quota for a given license and action.
type QuotaCheckResponse ¶
type QuotaCheckResponse struct {
Quota int `json:"quota"`
}
QuotaCheckResponse is JSON response by license server.
type QuotaChecker ¶
type QuotaChecker interface {
QuotaCheck(ctx context.Context, checkRequest QuotaCheckRequest) (QuotaCheckResponse, error)
}
Click to show internal directories.
Click to hide internal directories.