unioffice/common/license/license.go
2022-06-27 19:44:23 +00:00

44 lines
2.1 KiB
Go

//
// 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/
// Package license helps manage commercial licenses and check if they
// are valid for the version of UniOffice used.
package license ;import _c "github.com/unidoc/unioffice/internal/license";
// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _c .GetLicenseKey ()};
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _c .SetLicenseKey (content ,customerName );};
// LegacyLicenseType is the type of license
type LegacyLicenseType =_c .LegacyLicenseType ;
// LicenseKey represents a loaded license key.
type LicenseKey =_c .LicenseKey ;
// 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 _c .SetMeteredKey (apiKey )};
// 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 SetLegacyLicenseKey (s string )error {return _c .SetLegacyLicenseKey (s )};const (LicenseTierUnlicensed =_c .LicenseTierUnlicensed ;LicenseTierCommunity =_c .LicenseTierCommunity ;LicenseTierIndividual =_c .LicenseTierIndividual ;LicenseTierBusiness =_c .LicenseTierBusiness ;);
// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _c .MakeUnlicensedKey ()};
// LegacyLicense holds the old-style unioffice license information.
type LegacyLicense =_c .LegacyLicense ;
// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_c .MeteredStatus ,error ){return _c .GetMeteredState ()};