Documentation
¶
Index ¶
Constants ¶
View Source
const ( LicenseTierUnlicensed = "unlicensed" LicenseTierCommunity = "community" LicenseTierIndividual = "individual" LicenseTierBusiness = "business" )
License tiers.
Variables ¶
This section is empty.
Functions ¶
func SetLegacyLicenseKey ¶
SetLegacyLicenseKey installs a legacy license code. License codes issued prior to June 2019. Will be removed at some point in a future major version.
func SetLicenseKey ¶
SetLicenseKey sets and validates the license key.
Types ¶
type LegacyLicense ¶
type LegacyLicense struct { Name string Signature string `json:",omitempty"` Expiration time.Time LicenseType LegacyLicenseType }
LegacyLicense holds the old-style office license information.
type LicenseKey ¶
type LicenseKey struct { LicenseId string `json:"license_id"` CustomerId string `json:"customer_id"` CustomerName string `json:"customer_name"` Tier string `json:"tier"` CreatedAt time.Time `json:"-"` CreatedAtInt int64 `json:"created_at"` ExpiresAt time.Time `json:"-"` ExpiresAtInt int64 `json:"expires_at"` CreatorName string `json:"creator_name"` CreatorEmail string `json:"creator_email"` UniPDF bool `json:"unipdf"` UniOffice bool `json:"office"` Trial bool `json:"trial"` // For trial licenses. }
LicenseKey represents a license key for UniOffice.
func GetLicenseKey ¶
func GetLicenseKey() *LicenseKey
func MakeUnlicensedKey ¶
func MakeUnlicensedKey() *LicenseKey
MakeUnlicensedKey returns an unlicensed key.
func (*LicenseKey) IsLicensed ¶
func (k *LicenseKey) IsLicensed() bool
IsLicensed returns true if the package is licensed.
func (*LicenseKey) ToString ¶
func (k *LicenseKey) ToString() string
ToString returns a string representing the license information.
func (*LicenseKey) TypeToString ¶
func (k *LicenseKey) TypeToString() string
TypeToString returns a string representation of the license type.
func (*LicenseKey) Validate ¶
func (k *LicenseKey) Validate() error
Validate returns an error if the licenseis invalid, nil otherwise.
Click to show internal directories.
Click to hide internal directories.