Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
unidoc-build committed Feb 7, 2023
1 parent 40019b8 commit c138ff0
Show file tree
Hide file tree
Showing 62 changed files with 15,348 additions and 15,371 deletions.
648 changes: 324 additions & 324 deletions annotator/annotator.go

Large diffs are not rendered by default.

132 changes: 66 additions & 66 deletions common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,102 +10,102 @@
// terms that can be accessed at https://unidoc.io/eula/

// Package common contains common properties used by the subpackages.
package common ;import (_b "fmt";_db "io";_c "os";_gd "path/filepath";_g "runtime";_de "time";);
package common ;import (_d "fmt";_b "io";_a "os";_dd "path/filepath";_c "runtime";_f "time";);

// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};
// DummyLogger does nothing.
type DummyLogger struct{};

// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_dbf ConsoleLogger )IsLogLevel (level LogLevel )bool {return _dbf .LogLevel >=level };
// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};

// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _db .Writer )*WriterLogger {_cca :=WriterLogger {Output :writer ,LogLevel :logLevel };return &_cca ;};
// Debug logs debug message.
func (_aa ConsoleLogger )Debug (format string ,args ...interface{}){if _aa .LogLevel >=LogLevelDebug {_ad :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_aa .output (_a .Stdout ,_ad ,format ,args ...);};};

// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };
// Notice logs notice message.
func (_dc ConsoleLogger )Notice (format string ,args ...interface{}){if _dc .LogLevel >=LogLevelNotice {_dca :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_dc .output (_a .Stdout ,_dca ,format ,args ...);};};

// DummyLogger does nothing.
type DummyLogger struct{};
// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_bc string ,_ce ...interface{});Warning (_fc string ,_g ...interface{});Notice (_ae string ,_ga ...interface{});Info (_cc string ,_af ...interface{});Debug (_ec string ,_bcf ...interface{});Trace (_afg string ,_fd ...interface{});
IsLogLevel (_ba LogLevel )bool ;};const _adg =7;func _dee (_ag _b .Writer ,_bge string ,_egf string ,_ef ...interface{}){_ ,_be ,_cea ,_egc :=_c .Caller (3);if !_egc {_be ="\u003f\u003f\u003f";_cea =0;}else {_be =_dd .Base (_be );};_aace :=_d .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_bge ,_be ,_cea )+_egf +"\u000a";
_d .Fprintf (_ag ,_aace ,_ef ...);};

// Notice logs notice message.
func (_gg ConsoleLogger )Notice (format string ,args ...interface{}){if _gg .LogLevel >=LogLevelNotice {_bd :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_gg .output (_c .Stdout ,_bd ,format ,args ...);};};func (_bg ConsoleLogger )output (_bdd _db .Writer ,_bde string ,_bga string ,_eb ...interface{}){_gde (_bdd ,_bde ,_bga ,_eb ...);
// Info logs info message.
func (_dec WriterLogger )Info (format string ,args ...interface{}){if _dec .LogLevel >=LogLevelInfo {_dgd :="\u005bI\u004e\u0046\u004f\u005d\u0020";_dec .logToWriter (_dec .Output ,_dgd ,format ,args ...);};};func (_cga WriterLogger )logToWriter (_ed _b .Writer ,_ecg string ,_gc string ,_gcc ...interface{}){_dee (_ed ,_ecg ,_gc ,_gcc );
};

// Warning logs warning message.
func (_ed ConsoleLogger )Warning (format string ,args ...interface{}){if _ed .LogLevel >=LogLevelWarning {_cc :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ed .output (_c .Stdout ,_cc ,format ,args ...);};};const _efc =1;
// NewConsoleLogger creates new console logger.
func NewConsoleLogger (logLevel LogLevel )*ConsoleLogger {return &ConsoleLogger {LogLevel :logLevel }};

// Error logs error message.
func (_bae WriterLogger )Error (format string ,args ...interface{}){if _bae .LogLevel >=LogLevelError {_ef :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_bae .logToWriter (_bae .Output ,_ef ,format ,args ...);};};
// Info logs info message.
func (_aff ConsoleLogger )Info (format string ,args ...interface{}){if _aff .LogLevel >=LogLevelInfo {_db :="\u005bI\u004e\u0046\u004f\u005d\u0020";_aff .output (_a .Stdout ,_db ,format ,args ...);};};

// Debug logs debug message.
func (_edd WriterLogger )Debug (format string ,args ...interface{}){if _edd .LogLevel >=LogLevelDebug {_bad :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_edd .logToWriter (_edd .Output ,_bad ,format ,args ...);};};
// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};func (_cg ConsoleLogger )output (_aac _b .Writer ,_eg string ,_ff string ,_bgc ...interface{}){_dee (_aac ,_eg ,_ff ,_bgc ...);};const _cb =2023;

// Warning logs warning message.
func (_ff WriterLogger )Warning (format string ,args ...interface{}){if _ff .LogLevel >=LogLevelWarning {_ag :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ff .logToWriter (_ff .Output ,_ag ,format ,args ...);};};
// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};

// Logger is the interface used for logging in the unipdf package.
type Logger interface{Error (_f string ,_fc ...interface{});Warning (_e string ,_fb ...interface{});Notice (_fa string ,_gf ...interface{});Info (_cg string ,_dc ...interface{});Debug (_gc string ,_bf ...interface{});Trace (_a string ,_da ...interface{});
IsLogLevel (_ba LogLevel )bool ;};
// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};

// Error does nothing for dummy logger.
func (DummyLogger )Error (format string ,args ...interface{}){};var Log Logger =DummyLogger {};
// Trace logs trace message.
func (_cgb WriterLogger )Trace (format string ,args ...interface{}){if _cgb .LogLevel >=LogLevelTrace {_ade :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_cgb .logToWriter (_cgb .Output ,_ade ,format ,args ...);};};const Version ="\u0033\u002e\u0034\u0033\u002e\u0030";
var Log Logger =DummyLogger {};

// Warning logs warning message.
func (_ecb WriterLogger )Warning (format string ,args ...interface{}){if _ecb .LogLevel >=LogLevelWarning {_dbd :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ecb .logToWriter (_ecb .Output ,_dbd ,format ,args ...);};};

// Debug logs debug message.
func (_gb ConsoleLogger )Debug (format string ,args ...interface{}){if _gb .LogLevel >=LogLevelDebug {_edb :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_gb .output (_c .Stdout ,_edb ,format ,args ...);};};
func (_ca WriterLogger )Debug (format string ,args ...interface{}){if _ca .LogLevel >=LogLevelDebug {_fda :="\u005b\u0044\u0045\u0042\u0055\u0047\u005d\u0020";_ca .logToWriter (_ca .Output ,_fda ,format ,args ...);};};

// Trace logs trace message.
func (_cd ConsoleLogger )Trace (format string ,args ...interface{}){if _cd .LogLevel >=LogLevelTrace {_ae :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_cd .output (_c .Stdout ,_ae ,format ,args ...);};};
func (_gb ConsoleLogger )Trace (format string ,args ...interface{}){if _gb .LogLevel >=LogLevelTrace {_cce :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_gb .output (_a .Stdout ,_cce ,format ,args ...);};};const _cbg =30;

// Trace logs trace message.
func (_cde WriterLogger )Trace (format string ,args ...interface{}){if _cde .LogLevel >=LogLevelTrace {_fca :="\u005b\u0054\u0052\u0041\u0043\u0045\u005d\u0020";_cde .logToWriter (_cde .Output ,_fca ,format ,args ...);};};
// Notice logs notice message.
func (_aae WriterLogger )Notice (format string ,args ...interface{}){if _aae .LogLevel >=LogLevelNotice {_bgf :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_aae .logToWriter (_aae .Output ,_bgf ,format ,args ...);};};

// Error logs error message.
func (_bfg ConsoleLogger )Error (format string ,args ...interface{}){if _bfg .LogLevel >=LogLevelError {_bfc :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_bfg .output (_c .Stdout ,_bfc ,format ,args ...);};};
// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};const _gd =15;

// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };
// Error logs error message.
func (_fdb WriterLogger )Error (format string ,args ...interface{}){if _fdb .LogLevel >=LogLevelError {_cf :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_fdb .logToWriter (_fdb .Output ,_cf ,format ,args ...);};};

// Info logs info message.
func (_ab ConsoleLogger )Info (format string ,args ...interface{}){if _ab .LogLevel >=LogLevelInfo {_ad :="\u005bI\u004e\u0046\u004f\u005d\u0020";_ab .output (_c .Stdout ,_ad ,format ,args ...);};};const _fdb =2023;const _def ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
const _cdd =30;
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_ac WriterLogger )IsLogLevel (level LogLevel )bool {return _ac .LogLevel >=level };

// Debug does nothing for dummy logger.
func (DummyLogger )Debug (format string ,args ...interface{}){};const Version ="\u0033\u002e\u0034\u0032\u002e\u0030";const (LogLevelTrace LogLevel =5;LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;
LogLevelError LogLevel =0;);var ReleasedAt =_de .Date (_fdb ,_efc ,_gga ,_ec ,_cdd ,0,0,_de .UTC );
// NewWriterLogger creates new 'writer' logger.
func NewWriterLogger (logLevel LogLevel ,writer _b .Writer )*WriterLogger {_bd :=WriterLogger {Output :writer ,LogLevel :logLevel };return &_bd ;};

// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};
// UtcTimeFormat returns a formatted string describing a UTC timestamp.
func UtcTimeFormat (t _f .Time )string {return t .Format (_da )+"\u0020\u0055\u0054\u0043"};

// Warning does nothing for dummy logger.
func (DummyLogger )Warning (format string ,args ...interface{}){};
// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_dg ConsoleLogger )IsLogLevel (level LogLevel )bool {return _dg .LogLevel >=level };

// Info logs info message.
func (_cf WriterLogger )Info (format string ,args ...interface{}){if _cf .LogLevel >=LogLevelInfo {_dd :="\u005bI\u004e\u0046\u004f\u005d\u0020";_cf .logToWriter (_cf .Output ,_dd ,format ,args ...);};};const _ec =15;
// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _b .Writer ;};

// Notice logs notice message.
func (_eg WriterLogger )Notice (format string ,args ...interface{}){if _eg .LogLevel >=LogLevelNotice {_af :="\u005bN\u004f\u0054\u0049\u0043\u0045\u005d ";_eg .logToWriter (_eg .Output ,_af ,format ,args ...);};};func (_egb WriterLogger )logToWriter (_cdg _db .Writer ,_bb string ,_aa string ,_aac ...interface{}){_gde (_cdg ,_bb ,_aa ,_aac );
};const _gga =9;
// Notice does nothing for dummy logger.
func (DummyLogger )Notice (format string ,args ...interface{}){};const _ge =2;

// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};func _gde (_edf _db .Writer ,_fd string ,_ac string ,_edbg ...interface{}){_ ,_age ,_bge ,_efe :=_g .Caller (3);if !_efe {_age ="\u003f\u003f\u003f";_bge =0;}else {_age =_gd .Base (_age );
};_ge :=_b .Sprintf ("\u0025s\u0020\u0025\u0073\u003a\u0025\u0064 ",_fd ,_age ,_bge )+_ac +"\u000a";_b .Fprintf (_edf ,_ge ,_edbg ...);};
// SetLogger sets 'logger' to be used by the unidoc unipdf library.
func SetLogger (logger Logger ){Log =logger };

// Info does nothing for dummy logger.
func (DummyLogger )Info (format string ,args ...interface{}){};
// LogLevel is the verbosity level for logging.
type LogLevel int ;

// WriterLogger is the logger that writes data to the Output writer
type WriterLogger struct{LogLevel LogLevel ;Output _db .Writer ;};
// Error logs error message.
func (_gg ConsoleLogger )Error (format string ,args ...interface{}){if _gg .LogLevel >=LogLevelError {_de :="\u005b\u0045\u0052\u0052\u004f\u0052\u005d\u0020";_gg .output (_a .Stdout ,_de ,format ,args ...);};};var ReleasedAt =_f .Date (_cb ,_ge ,_adg ,_gd ,_cbg ,0,0,_f .UTC );

// IsLogLevel returns true if log level is greater or equal than `level`.
// Can be used to avoid resource intensive calls to loggers.
func (_dbe WriterLogger )IsLogLevel (level LogLevel )bool {return _dbe .LogLevel >=level };

// ConsoleLogger is a logger that writes logs to the 'os.Stdout'
type ConsoleLogger struct{LogLevel LogLevel ;};
// Trace does nothing for dummy logger.
func (DummyLogger )Trace (format string ,args ...interface{}){};

// LogLevel is the verbosity level for logging.
type LogLevel int ;
// Warning logs warning message.
func (_ecc ConsoleLogger )Warning (format string ,args ...interface{}){if _ecc .LogLevel >=LogLevelWarning {_bg :="\u005b\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u005d\u0020";_ecc .output (_a .Stdout ,_bg ,format ,args ...);};};const (LogLevelTrace LogLevel =5;
LogLevelDebug LogLevel =4;LogLevelInfo LogLevel =3;LogLevelNotice LogLevel =2;LogLevelWarning LogLevel =1;LogLevelError LogLevel =0;);

// UtcTimeFormat returns a formatted string describing a UTC timestamp.
func UtcTimeFormat (t _de .Time )string {return t .Format (_def )+"\u0020\u0055\u0054\u0043"};
// IsLogLevel returns true from dummy logger.
func (DummyLogger )IsLogLevel (level LogLevel )bool {return true };const _da ="\u0032\u0020\u004aan\u0075\u0061\u0072\u0079\u0020\u0032\u0030\u0030\u0036\u0020\u0061\u0074\u0020\u0031\u0035\u003a\u0030\u0034";
28 changes: 14 additions & 14 deletions common/license/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@
// 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 unipdf used.
package license ;import _c "github.com/unidoc/unipdf/v3/internal/license";

// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _c .SetLicenseKey (content ,customerName );};
package license ;import _a "github.com/unidoc/unipdf/v3/internal/license";

// GetMeteredState checks the currently used metered document usage status,
// documents used and credits available.
func GetMeteredState ()(_c .MeteredStatus ,error ){return _c .GetMeteredState ()};
func GetMeteredState ()(_a .MeteredStatus ,error ){return _a .GetMeteredState ()};

// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _c .MakeUnlicensedKey ()};const (LicenseTierUnlicensed =_c .LicenseTierUnlicensed ;LicenseTierCommunity =_c .LicenseTierCommunity ;LicenseTierIndividual =_c .LicenseTierIndividual ;LicenseTierBusiness =_c .LicenseTierBusiness ;
);
// SetLicenseKey sets and validates the license key.
func SetLicenseKey (content string ,customerName string )error {return _a .SetLicenseKey (content ,customerName );};

// SetMeteredKey sets the metered 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 )};
func SetMeteredKey (apiKey string )error {return _a .SetMeteredKey (apiKey )};

// MakeUnlicensedKey returns a default key.
func MakeUnlicensedKey ()*LicenseKey {return _a .MakeUnlicensedKey ()};

// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _a .GetLicenseKey ()};const (LicenseTierUnlicensed =_a .LicenseTierUnlicensed ;LicenseTierCommunity =_a .LicenseTierCommunity ;LicenseTierIndividual =_a .LicenseTierIndividual ;LicenseTierBusiness =_a .LicenseTierBusiness ;
);

// SetMeteredKeyPersistentCache sets the metered License API Key persistent cache.
// Default value 'true', set to `false` will report the usage immediately to license server,
// this can be used when there's no access to persistent data storage.
func SetMeteredKeyPersistentCache (val bool ){_c .SetMeteredKeyPersistentCache (val )};
func SetMeteredKeyPersistentCache (val bool ){_a .SetMeteredKeyPersistentCache (val )};

// LicenseKey represents a loaded license key.
type LicenseKey =_c .LicenseKey ;

// GetLicenseKey returns the currently loaded license key.
func GetLicenseKey ()*LicenseKey {return _c .GetLicenseKey ()};
type LicenseKey =_a .LicenseKey ;
Loading

0 comments on commit c138ff0

Please sign in to comment.