unioffice/common/license/license.go

44 lines
2.1 KiB
Go
Raw Normal View History

2020-08-23 14:15:53 +00:00
//
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
2021-03-16 20:51:18 +00:00
// Package license helps manage commercial licenses and check if they
// are valid for the version of UniOffice used.
2021-09-22 16:41:01 +00:00
package license ;import _g "github.com/unidoc/unioffice/internal/license";
2021-01-04 16:11:39 +00:00
2021-07-30 17:03:26 +00:00
// LegacyLicense holds the old-style unioffice license information.
2021-09-22 16:41:01 +00:00
type LegacyLicense =_g .LegacyLicense ;
2021-01-04 16:11:39 +00:00
2021-09-22 16:41:01 +00:00
// LicenseKey represents a loaded license key.
type LicenseKey =_g .LicenseKey ;
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _g .SetLicenseKey (content ,customerName );};
2020-08-31 22:58:25 +00:00
2021-04-23 20:00:00 +00:00
// LegacyLicenseType is the type of license
2021-09-22 16:41:01 +00:00
type LegacyLicenseType =_g .LegacyLicenseType ;
2020-08-23 14:15:53 +00:00
2021-09-22 16:41:01 +00:00
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _g .GetLicenseKey ()};
// SetMeteredKey sets the metered License API key required for SaaS operation.
// Document usage is reported periodically for the product to function correctly.
func SetMeteredKey (apiKey string )error {return _g .SetMeteredKey (apiKey )};
// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _g .MakeUnlicensedKey ()};
2020-08-23 14:15:53 +00:00
2021-06-16 07:10:52 +00:00
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
2021-09-22 16:41:01 +00:00
func GetMeteredState ()(_g .MeteredStatus ,error ){return _g .GetMeteredState ()};const (LicenseTierUnlicensed =_g .LicenseTierUnlicensed ;LicenseTierCommunity =_g .LicenseTierCommunity ;LicenseTierIndividual =_g .LicenseTierIndividual ;LicenseTierBusiness =_g .LicenseTierBusiness ;);
2021-08-23 20:44:48 +00:00
// SetLegacyLicenseKey installs a legacy license code. License codes issued prior to June 2019.
// Will be removed at some point in a future major version.
2021-09-22 16:41:01 +00:00
func SetLegacyLicenseKey (s string )error {return _g .SetLegacyLicenseKey (s )};