Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KICLicenseAPIPathPattern = "%s/kic/api/control-planes/%s/v1/licenses"
KICLicenseAPIPathPattern is the path pattern for KIC license operations.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client interacts with the Konnect license API.
func NewClient ¶
func NewClient(cfg managercfg.KonnectConfig, logger logr.Logger) (*Client, error)
NewClient creates a License API Konnect client.
func (*Client) WithLicenseStore ¶
type Item ¶
type Item struct { License string `json:"payload,omitempty"` UpdatedAt uint64 `json:"updated_at,omitempty"` ID string `json:"id,omitempty"` }
Item is a single license from the upstream license API.
type ListLicenseResponse ¶
type ListLicenseResponse struct {
Items []*Item `json:"items"`
}
type SecretLicenseStore ¶
type SecretLicenseStore struct {
// contains filtered or unexported fields
}
SecretLicenseStore is the storage used to store the Konnect license. This store uses the CP ID, a predefined prefix and the provided namespace to designate the target Secret which will be used for storage.
func NewSecretLicenseStore ¶
func NewSecretLicenseStore(cl client.Client, namespace, controlPlaneID string) *SecretLicenseStore
NewSecretLicenseStore creates a storage to store Konnect license to a secret.
func (*SecretLicenseStore) Load ¶
func (s *SecretLicenseStore) Load( ctx context.Context, ) (license.KonnectLicense, error)
Load loads the license from the secret from secret `konnect-license-<cpid>`.
func (*SecretLicenseStore) Store ¶
func (s *SecretLicenseStore) Store(ctx context.Context, l license.KonnectLicense) error
Store stores license to the secret `konnect-license-<cpid>`.
Click to show internal directories.
Click to hide internal directories.