github.com/unidoc/unipdf/v3@v3.55.0/common/license/license.go (about) 1 // 2 // Copyright 2020 FoxyUtils ehf. All rights reserved. 3 // 4 // This is a commercial product and requires a license to operate. 5 // A trial license can be obtained at https://unidoc.io 6 // 7 // DO NOT EDIT: generated by unitwist Go source code obfuscator. 8 // 9 // Use of this source code is governed by the UniDoc End User License Agreement 10 // terms that can be accessed at https://unidoc.io/eula/ 11 12 // Package license helps manage commercial licenses and check if they are valid for the version of unipdf used. 13 package license ;import _fd "github.com/unidoc/unipdf/v3/internal/license"; 14 15 // MakeUnlicensedKey returns a default key. 16 func MakeUnlicensedKey ()*LicenseKey {return _fd .MakeUnlicensedKey ()}; 17 18 // LicenseKey represents a loaded license key. 19 type LicenseKey =_fd .LicenseKey ;const (LicenseTierUnlicensed =_fd .LicenseTierUnlicensed ;LicenseTierCommunity =_fd .LicenseTierCommunity ;LicenseTierIndividual =_fd .LicenseTierIndividual ;LicenseTierBusiness =_fd .LicenseTierBusiness ;); 20 21 // SetMeteredKeyPersistentCache sets the metered License API Key persistent cache. 22 // Default value 'true', set to `false` will report the usage immediately to license server, 23 // this can be used when there's no access to persistent data storage. 24 func SetMeteredKeyPersistentCache (val bool ){_fd .SetMeteredKeyPersistentCache (val )}; 25 26 // GetMeteredState checks the currently used metered document usage status, 27 // documents used and credits available. 28 func GetMeteredState ()(_fd .MeteredStatus ,error ){return _fd .GetMeteredState ()}; 29 30 // SetMeteredKey sets the metered API key required for SaaS operation. 31 // Document usage is reported periodically for the product to function correctly. 32 func SetMeteredKey (apiKey string )error {return _fd .SetMeteredKey (apiKey )}; 33 34 // SetLicenseKey sets and validates the license key. 35 func SetLicenseKey (content string ,customerName string )error {return _fd .SetLicenseKey (content ,customerName );}; 36 37 // GetLicenseKey returns the currently loaded license key. 38 func GetLicenseKey ()*LicenseKey {return _fd .GetLicenseKey ()};