Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppInfo ¶
type AppInfo = app.GetCurrentAppInfoResponse
type Client ¶
A simplified client for the Replicated SDK designed for the purposes of validating licenses and producing sensible error messages, log entries, monitoring events, etc.
func (*Client) GetAppInfo ¶
List details about an application instance, including the app name, location of the Helm chart in the Replicated OCI registry, and details about the current application release that the instance is running.
func (*Client) GetAppName ¶
Returns the name of for the application, as returned from the Replicated SDK
func (*Client) GetAppSlug ¶
Returns the application slug for the application, as returned from the Replicated SDK
func (*Client) GetExpirationDate ¶
Return the expiration date for the license as a date field since it's a special case of the fields in the license
func (*Client) GetLicenseField ¶
func (c *Client) GetLicenseField(field string) (*license.LicenseField, error)
GetLicenseField fetches a field from the license by name, and returns it only if it's valid
type MockAPIClient ¶
func DefaultMockAPIClient ¶
func DefaultMockAPIClient() *MockAPIClient
func NewMockAPIClient ¶
func NewMockAPIClient(name string, slug string, expiration time.Time, fields ...*license.LicenseField) *MockAPIClient
func (*MockAPIClient) GetAppName ¶
func (m *MockAPIClient) GetAppName() (string, error)
func (*MockAPIClient) GetAppSlug ¶
func (m *MockAPIClient) GetAppSlug() (string, error)
func (*MockAPIClient) GetExpirationDate ¶
func (m *MockAPIClient) GetExpirationDate() (time.Time, error)
func (*MockAPIClient) GetLicenseField ¶
func (m *MockAPIClient) GetLicenseField(field string) (*license.LicenseField, error)
type ReplicatedClient ¶
type ReplicatedClient interface {
GetAppName() (string, error)
GetAppSlug() (string, error)
GetExpirationDate() (time.Time, error)
GetLicenseField(string) (*license.LicenseField, error)
}
A client for a subset of the Replicated SDK as required for validating license and descrbing the application when discussing it in errors messages or recording information about the license