Documentation ¶
Index ¶
- func ApplyLicense(ctx context.Context, dclient licensing.WrappedDockerClient, ...) error
- func GetLicenseSummary(ctx context.Context, license model.IssuedLicense) (string, error)
- func LoadLocalIssuedLicense(ctx context.Context, filename string) (*model.IssuedLicense, error)
- type HubUser
- func (u HubUser) GenerateTrialLicense(ctx context.Context, targetID string) (*model.IssuedLicense, error)
- func (u HubUser) GetAvailableLicenses(ctx context.Context) ([]LicenseDisplay, error)
- func (u HubUser) GetIssuedLicense(ctx context.Context, ID string) (*model.IssuedLicense, error)
- func (u HubUser) GetOrgByID(orgID string) (model.Org, error)
- type LicenseDisplay
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyLicense ¶
func ApplyLicense(ctx context.Context, dclient licensing.WrappedDockerClient, license *model.IssuedLicense) error
ApplyLicense will store a license on the local system
func GetLicenseSummary ¶
GetLicenseSummary summarizes the license for the user
func LoadLocalIssuedLicense ¶
LoadLocalIssuedLicense will load a local license file
Types ¶
type HubUser ¶
type HubUser struct { Client licensing.Client User model.User Orgs []model.Org // contains filtered or unexported fields }
HubUser wraps a licensing client and holds key information for a user to avoid multiple lookups
func Login ¶
Login to the license server and return a client that can be used to look up and download license files or generate new trial licenses
func (HubUser) GenerateTrialLicense ¶
func (u HubUser) GenerateTrialLicense(ctx context.Context, targetID string) (*model.IssuedLicense, error)
GenerateTrialLicense will generate a new trial license for the specified user or org
func (HubUser) GetAvailableLicenses ¶
func (u HubUser) GetAvailableLicenses(ctx context.Context) ([]LicenseDisplay, error)
GetAvailableLicenses finds all available licenses for a given account and their orgs
func (HubUser) GetIssuedLicense ¶
GetIssuedLicense will download a license by ID
type LicenseDisplay ¶
type LicenseDisplay struct { model.Subscription Num int Owner string ComponentsString string }
LicenseDisplay stores license details for display