lexactivator

package module
v0.0.0-...-7399b28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 4 Imported by: 2

README

lexactivator-go

Cryptlex lets you license your software apps effortlessly. You can easily generate license keys using the REST API or Dashboard and validate the license keys in your software apps using LexActivator (Cryptlex client library).

Additionally, you can offer trials, subscriptions, floating licenses and much more.

lexactivator-go is a Go wrapper for LexActivator licensing library.

Installation

go get -u github.com/cryptlex/lexactivator-go

Note: In case you are using Windows, execute the following command after installation:

xcopy %USERPROFILE%\go\src\github.com\cryptlex\lexactivator-go\libs\windows_amd64\LexActivator.dll

Then you can include it in your code:

import "github.com/cryptlex/lexactivator-go"

Usage

Refer to following for documentation:

https://docs.cryptlex.com/node-locked-licenses/using-lexactivator/using-lexactivator-with-go

Documentation

Index

Constants

View Source
const (
	LA_USER      uint = 1
	LA_SYSTEM    uint = 2
	LA_ALL_USERS uint = 3
	LA_IN_MEMORY uint = 4
)
View Source
const (
	LA_RELEASES_ALL     uint = 1
	LA_RELEASES_ALLOWED uint = 2
)
View Source
const (

	// Success code.
	LA_OK int = 0

	// Failure code.
	LA_FAIL int = 1

	// The license has expired or system time has been tampered with. Ensure your date and time settings are correct.
	LA_EXPIRED int = 20

	// The license has been suspended.
	LA_SUSPENDED int = 21

	// The grace period for server sync is over.
	LA_GRACE_PERIOD_OVER int = 22

	// The trial has expired or system time has been tampered with. Ensure your date and time settings are correct.
	LA_TRIAL_EXPIRED int = 25

	// The local trial has expired or system time has been tampered
	// with. Ensure your date and time settings are correct.
	LA_LOCAL_TRIAL_EXPIRED int = 26

	// A new update is available for the product. This means a new release has been published for the product.
	LA_RELEASE_UPDATE_AVAILABLE int = 30

	// No new update is available for the product. The current version is latest.
	LA_RELEASE_NO_UPDATE_AVAILABLE int = 31 // deprecated

	// No new update is available for the product. The current version is latest.
	LA_RELEASE_UPDATE_NOT_AVAILABLE int = 31

	// The update available is not allowed for this license.
	LA_RELEASE_UPDATE_AVAILABLE_NOT_ALLOWED int = 32

	// Invalid file path.
	LA_E_FILE_PATH int = 40

	// Invalid or corrupted product file.
	LA_E_PRODUCT_FILE int = 41

	// Invalid product data.
	LA_E_PRODUCT_DATA int = 42

	// The product id is incorrect.
	LA_E_PRODUCT_ID int = 43

	// Insufficient system permissions. Occurs when LA_SYSTEM flag is used
	// but application is not run with admin privileges.
	LA_E_SYSTEM_PERMISSION int = 44

	// No permission to write to file.
	LA_E_FILE_PERMISSION int = 45

	// Fingerprint couldn't be generated because Windows Management Instrumentation (WMI)
	// service has been disabled. This error is specific to Windows only.
	LA_E_WMIC int = 46

	// The difference between the network time and the system time is
	// more than allowed clock offset.
	LA_E_TIME int = 47

	// Failed to connect to the server due to network error.
	LA_E_INET int = 48

	// Invalid network proxy.
	LA_E_NET_PROXY int = 49

	// Invalid Cryptlex host url.
	LA_E_HOST_URL int = 50

	// The buffer size was smaller than required.
	LA_E_BUFFER_SIZE int = 51

	// App version length is more than 256 characters.
	LA_E_APP_VERSION_LENGTH int = 52

	// The license has been revoked.
	LA_E_REVOKED int = 53

	// Invalid license key.
	LA_E_LICENSE_KEY int = 54

	// Invalid license type. Make sure floating license is not being used.
	LA_E_LICENSE_TYPE int = 55

	// Invalid offline activation response file.
	LA_E_OFFLINE_RESPONSE_FILE int = 56

	// The offline activation response has expired.
	LA_E_OFFLINE_RESPONSE_FILE_EXPIRED int = 57

	// The license has reached it's allowed activations limit.
	LA_E_ACTIVATION_LIMIT int = 58

	// The license activation was deleted on the server.
	LA_E_ACTIVATION_NOT_FOUND int = 59

	// The license has reached it's allowed deactivations limit.
	LA_E_DEACTIVATION_LIMIT int = 60

	// Trial not allowed for the product.
	LA_E_TRIAL_NOT_ALLOWED int = 61

	// Your account has reached it's trial activations limit.
	LA_E_TRIAL_ACTIVATION_LIMIT int = 62

	// Machine fingerprint has changed since activation.
	LA_E_MACHINE_FINGERPRINT int = 63

	// Metadata key length is more than 256 characters.
	LA_E_METADATA_KEY_LENGTH int = 64

	// Metadata value length is more than 4096 characters.
	LA_E_METADATA_VALUE_LENGTH int = 65

	// The license has reached it's metadata fields limit.
	LA_E_ACTIVATION_METADATA_LIMIT int = 66

	// The trial has reached it's metadata fields limit.
	LA_E_TRIAL_ACTIVATION_METADATA_LIMIT int = 67

	// The metadata key does not exist.
	LA_E_METADATA_KEY_NOT_FOUND int = 68

	// The system time has been tampered (backdated).
	LA_E_TIME_MODIFIED int = 69

	// Invalid version format.
	LA_E_RELEASE_VERSION_FORMAT int = 70

	// Incorrect email or password.
	LA_E_AUTHENTICATION_FAILED int = 71

	// The meter attribute does not exist.
	LA_E_METER_ATTRIBUTE_NOT_FOUND int = 72

	// The meter attribute has reached it's usage limit.
	LA_E_METER_ATTRIBUTE_USES_LIMIT_REACHED int = 73

	// Custom device fingerprint length is less than 64 characters
	// or more than 256 characters..
	LA_E_CUSTOM_FINGERPRINT_LENGTH int = 74

	// No product version is linked with the license.
	LA_E_PRODUCT_VERSION_NOT_LINKED int = 75

	// The product version feature flag does not exist.
	LA_E_FEATURE_FLAG_NOT_FOUND int = 76

	// The release version is not allowed.
	LA_E_RELEASE_VERSION_NOT_ALLOWED int = 77

	// Release platform length is more than 256 characters.
	LA_E_RELEASE_PLATFORM_LENGTH int = 78

	// Release channel length is more than 256 characters.
	LA_E_RELEASE_CHANNEL_LENGTH int = 79

	// Application is being run inside a virtual machine / hypervisor,
	// and activation has been disallowed in the VM.
	LA_E_VM int = 80

	// Country is not allowed.
	LA_E_COUNTRY int = 81

	// IP address is not allowed.
	LA_E_IP int = 82

	// Application is being run inside a container
	// and activation has been disallowed in the container.
	LA_E_CONTAINER int = 83

	// Invalid release version. Make sure the release version
	// uses the following formats: x.x, x.x.x, x.x.x.x (where x is a number).
	LA_E_RELEASE_VERSION int = 84

	// Release platform not set.
	LA_E_RELEASE_PLATFORM int = 85

	// Release channel not set.
	LA_E_RELEASE_CHANNEL int = 86

	// The user is not authenticated.
	LA_E_USER_NOT_AUTHENTICATED int = 87

	// The two-factor authentication code for the user authentication is missing.
	LA_E_TWO_FACTOR_AUTHENTICATION_CODE_MISSING int = 88

	// The two-factor authentication code provided by the user is invalid.
	LA_E_TWO_FACTOR_AUTHENTICATION_CODE_INVALID int = 89

	// Rate limit for API has reached, try again later.
	LA_E_RATE_LIMIT int = 90

	// Server error.
	LA_E_SERVER int = 91

	// Client error.
	LA_E_CLIENT int = 92

	// Invalid account ID.
	LA_E_ACCOUNT_ID int = 93

	// The user account has been temporarily locked for 5 mins due to 5 failed attempts.
	LA_E_LOGIN_TEMPORARILY_LOCKED int = 100

	// Invalid authentication ID token.
	LA_E_AUTHENTICATION_ID_TOKEN_INVALID int = 101

	// OIDC SSO is not enabled.
	LA_E_OIDC_SSO_NOT_ENABLED int = 102

	// The allowed users for this account has reached its limit.
	LA_E_USERS_LIMIT_REACHED int = 103

	// OS user has changed since activation and the license is user-locked.
	LA_E_OS_USER int = 104

	// Invalid permission flag.
	LA_E_INVALID_PERMISSION_FLAG int = 105

	// The free plan has reached its activation limit.
	LA_E_FREE_PLAN_ACTIVATION_LIMIT_REACHED int = 106

	// Invalid feature entitlements.
	LA_E_FEATURE_ENTITLEMENTS_INVALID int = 107

	// The feature entitlement does not exist.
	LA_E_FEATURE_ENTITLEMENT_NOT_FOUND int = 108

	// No entitlement set is linked to the license.
	LA_E_ENTITLEMENT_SET_NOT_LINKED int = 109

	// The license cannot be activated before its effective date.
	LA_E_LICENSE_NOT_EFFECTIVE int = 110
)

int enumeration from lexactivator/int.h int =4

Variables

This section is empty.

Functions

func ActivateLicense

func ActivateLicense() int

ActivateLicense activates the license by contacting the Cryptlex servers. It validates the key and returns with encrypted and digitally signed token which it stores and uses to activate your application.

This function should be executed at the time of registration, ideally on a button click.

Return codes:

LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_E_REVOKED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_INET, LA_E_VM, LA_E_TIME, LA_E_ACTIVATION_LIMIT, LA_E_SERVER, LA_E_CLIENT, LA_E_AUTHENTICATION_FAILED, LA_E_LICENSE_TYPE, LA_E_COUNTRY, LA_E_IP, LA_E_RATE_LIMIT, LA_E_LICENSE_KEY, LA_E_RELEASE_VERSION_NOT_ALLOWED, LA_E_RELEASE_VERSION_FORMAT

func ActivateLicenseOffline

func ActivateLicenseOffline(filePath string) int

ActivateLicenseOffline activates your licenses using the offline activation response file.

Parameters:

  • filePath: path of the offline activation response file.

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_FILE_PERMISSION, LA_E_OFFLINE_RESPONSE_FILE, LA_E_VM, LA_E_TIME, LA_E_FILE_PATH, LA_E_OFFLINE_RESPONSE_FILE_EXPIRED

func ActivateLocalTrial

func ActivateLocalTrial(trialLength uint) int

ActivateLocalTrial starts the local(unverified) trial.

This function should be executed when your application starts first time on the user's computer.

Parameters:

  • trialLength: trial length in days

Return codes:

LA_OK, LA_LOCAL_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED

Note: The function is only meant for local(unverified) trials.

func ActivateTrial

func ActivateTrial() int

ActivateTrial starts the verified trial in your application by contacting the Cryptlex servers.

This function should be executed when your application starts first time on the user's computer, ideally on a button click.

Return codes:

LA_OK, LA_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_INET, LA_E_VM, LA_E_TIME, LA_E_SERVER, LA_E_CLIENT, LA_E_COUNTRY, LA_E_IP, LA_E_RATE_LIMIT

func ActivateTrialOffline

func ActivateTrialOffline(filePath string) int

ActivateTrialOffline activates the trial using the offline activation response file.

Parameters:

  • filePath: path of the offline activation response file.

Return codes:

LA_OK, LA_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_OFFLINE_RESPONSE_FILE, LA_E_VM, LA_E_TIME, LA_E_FILE_PATH, LA_E_OFFLINE_RESPONSE_FILE_EXPIRED

func AuthenticateUser

func AuthenticateUser(email string, password string) int

AuthenticateUser It sends the request to the Cryptlex servers to authenticate the user.

Parameters:

  • email: user email address.
  • password: user password.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_INET, LA_E_SERVER, LA_E_RATE_LIMIT, LA_E_AUTHENTICATION_FAILED

func AuthenticateUserWithIdToken

func AuthenticateUserWithIdToken(idToken string) int

AuthenticateUserWithIdToken authenticates the user via OIDC Id token.

Parameters:

  • idToken: The id token obtained from the OIDC provider.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_INET, LA_E_SERVER, LA_E_RATE_LIMIT, LA_E_AUTHENTICATION_ID_TOKEN_INVALID, LA_E_OIDC_SSO_NOT_ENABLED, LA_E_USERS_LIMIT_REACHED

func CheckForReleaseUpdate deprecated

func CheckForReleaseUpdate(platform string, version string, channel string, callbackFunction func(int)) int

CheckForReleaseUpdate checks whether a new release is available for the product.

This function should only be used if you manage your releases through Cryptlex release management API.

Deprecated: This function is deprecated. Use CheckReleaseUpdate() instead.

Parameters:

  • platform: release platform e.g. windows, macos, linux
  • version: current release version
  • channel: release channel e.g. stable
  • releaseUpdateCallback: name of the callback function.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_RELEASE_VERSION_FORMAT

func CheckReleaseUpdate

func CheckReleaseUpdate(releaseUpdateCallbackFunction func(int, *Release, interface{}), releaseFlags uint, userData interface{}) int

CheckReleaseUpdate checks whether a new release is available for the product.

This function should only be used if you manage your releases through Cryptlex release management API.

When this function is called the release update callback function gets invoked which passes the following parameters:

  • status - determines if any update is available or not. It also determines whether an update is allowed or not. Expected values are LA_RELEASE_UPDATE_AVAILABLE, LA_RELEASE_UPDATE_NOT_AVAILABLE, LA_RELEASE_UPDATE_AVAILABLE_NOT_ALLOWED.
  • release - returns release struct of the latest available release, depending on the flag LA_RELEASES_ALLOWED or LA_RELEASES_ALL passed to the CheckReleaseUpdate().
  • userData - data that is passed to the callback function when it is registered using the CheckReleaseUpdate function. This parameter is optional and can be nil if no user data is passed to the CheckReleaseUpdate function.

Parameters:

  • releaseUpdateCallback: name of the callback function.
  • releaseFlags: if an update only related to the allowed release is required, then use LA_RELEASES_ALLOWED. Otherwise, if an update for all the releases is required, then use LA_RELEASES_ALL.
  • userData: data that can be passed to the callback function. This parameter has to be nil if no user data needs to be passed to the callback.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_RELEASE_VERSION_FORMAT, LA_E_RELEASE_VERSION, LA_E_RELEASE_PLATFORM, LA_E_RELEASE_CHANNEL

func DeactivateLicense

func DeactivateLicense() int

DeactivateLicense deactivates the license activation and frees up the corresponding activation slot by contacting the Cryptlex servers.

This function should be executed at the time of de-registration, ideally on a button click.

Return codes:

LA_OK, LA_E_DEACTIVATION_LIMIT, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_LICENSE_KEY, LA_E_INET, LA_E_SERVER, LA_E_RATE_LIMIT, LA_E_TIME_MODIFIED

func DecrementActivationMeterAttributeUses

func DecrementActivationMeterAttributeUses(name string, decrement uint) int

func ExtendLocalTrial

func ExtendLocalTrial(trialExtensionLength uint) int

ExtendLocalTrial extends the local trial.

Parameters:

  • trialExtensionLength: number of days to extend the trial

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED

Note: The function is only meant for local(unverified) trials.

func GenerateOfflineActivationRequest

func GenerateOfflineActivationRequest(filePath string) int

GenerateOfflineActivationRequest generates the offline activation request needed for generating offline activation response in the dashboard.

Parameters:

  • filePath: path of the file for the offline request.

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_FILE_PERMISSION

func GenerateOfflineDeactivationRequest

func GenerateOfflineDeactivationRequest(filePath string) int

GenerateOfflineDeactivationRequest generates the offline deactivation request needed for deactivation of the license in the dashboard and deactivates the license locally.

A valid offline deactivation file confirms that the license has been successfully deactivated on the user's machine.

Parameters:

  • filePath: path of the file for the offline request.

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_FILE_PERMISSION, LA_E_INET, LA_E_TIME_MODIFIED

func GenerateOfflineTrialActivationRequest

func GenerateOfflineTrialActivationRequest(filePath string) int

GenerateOfflineTrialActivationRequest generates the offline trial activation request needed for generating offline trial activation response in the dashboard.

Parameters:

  • filePath: path of the file for the offline request.

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_FILE_PERMISSION

func GetActivationCreationDate

func GetActivationCreationDate(activationCreationDate *uint) int

GetActivationCreationDate gets the activation creation date timestamp for the current activation.

Parameters:

  • activationCreationDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED

func GetActivationId

func GetActivationId(id *string) int

GetActivationId gets the activation id.

Parameters:

  • id: pointer to a buffer that receives the value of the string

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetActivationLastSyncedDate

func GetActivationLastSyncedDate(activationLastSyncedDate *uint) int

GetActivationLastSyncedDate gets the activation last synced date timestamp.

Parameters:

  • activationLastSyncedDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED

func GetActivationMetadata

func GetActivationMetadata(key string, value *string) int

GetActivationMetadata gets the activation metadata.

Parameters:

  • key: metadata key to retrieve the value
  • value: pointer to a string that receives the value

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE

func GetActivationMeterAttributeUses

func GetActivationMeterAttributeUses(name string, uses *uint) int

GetActivationMeterAttributeUses gets the meter attribute uses consumed by the activation.

Parameters:

  • name: name of the meter attribute
  • uses: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND

func GetActivationMode

func GetActivationMode(initialMode *string, currentMode *string) int

GetActivationMode gets the mode of activation (online or offline).

Parameters:

  • initialMode: pointer to a buffer that receives the initial mode of activation
  • currentMode: pointer to a buffer that receives the current mode of activation

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetFeatureEntitlement

func GetFeatureEntitlement(featureName string, featureEntitlement *FeatureEntitlement) int

func GetFeatureEntitlements

func GetFeatureEntitlements(featureEntitlements *[]FeatureEntitlement) int

GetFeatureEntitlements gets the feature entitlements associated with the license.

Feature entitlements can be linked directly to a license (license feature entitlements) or via entitlement sets. If a feature entitlement is defined in both, the value from the license feature entitlement takes precedence, overriding the entitlement set value.

Parameters:

  • featureEntitlements: pointer to an array of FeatureEntitlement structs that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE, LA_E_FEATURE_ENTITLEMENTS_INVALID

func GetLibraryVersion

func GetLibraryVersion(libraryVersion *string) int

GetLibraryVersion gets the version of this library.

Parameters:

  • libraryVersion: pointer to a string that receives the value

Return codes:

LA_OK, LA_E_BUFFER_SIZE

func GetLicenseActivationDate

func GetLicenseActivationDate(activationDate *uint) int

GetLicenseActivationDate gets the license activation date timestamp.

Parameters:

  • activationDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseAllowedActivations

func GetLicenseAllowedActivations(allowedActivations *int64) int

GetLicenseAllowedActivations gets the allowed activations of the license.

Parameters:

  • allowedActivations: pointer to the integer that receives the value. A value of -1 indicates unlimited number of activations.

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseAllowedDeactivations

func GetLicenseAllowedDeactivations(allowedDeactivations *int64) int

GetLicenseAllowedDeactivations gets the allowed deactivations of the license.

Parameters:

  • allowedDeactivations: pointer to the integer that receives the value. A value of -1 indicates unlimited number of deactivations.

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseCreationDate

func GetLicenseCreationDate(creationDate *uint) int

GetLicenseCreationDate gets the license creation date timestamp.

Parameters:

  • creationDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseEntitlementSetDisplayName

func GetLicenseEntitlementSetDisplayName(displayName *string) int

GetLicenseEntitlementSetDisplayName gets the license entitlement set display name.

Parameters:

  • displayName: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE, LA_E_ENTITLEMENT_SET_NOT_LINKED

func GetLicenseEntitlementSetName

func GetLicenseEntitlementSetName(name *string) int

GetLicenseEntitlementSetName gets the license entitlement set name.

Parameters:

  • name: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE, LA_E_ENTITLEMENT_SET_NOT_LINKED

func GetLicenseExpiryDate

func GetLicenseExpiryDate(expiryDate *uint) int

GetLicenseExpiryDate gets the license expiry date timestamp.

Parameters:

  • expiryDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseKey

func GetLicenseKey(licenseKey *string) int

GetLicenseKey gets the license key used for activation.

Parameters:

licenseKey - pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_BUFFER_SIZE

func GetLicenseMaintenanceExpiryDate

func GetLicenseMaintenanceExpiryDate(maintenanceExpiryDate *uint) int

GetLicenseMaintenanceExpiryDate gets the license maintenance expiry date timestamp.

Parameters:

  • maintenanceExpiryDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseMaxAllowedReleaseVersion

func GetLicenseMaxAllowedReleaseVersion(maxAllowedReleaseVersion *string) int

GetLicenseMaxAllowedReleaseVersion gets the maximum allowed release version of the license.

Parameters:

  • maxAllowedReleaseVersion: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED
LA_E_BUFFER_SIZE

func GetLicenseMetadata

func GetLicenseMetadata(key string, value *string) int

GetLicenseMetadata gets the license metadata as set in the dashboard.

Parameters:

  • key: metadata key to retrieve the value
  • value: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE

func GetLicenseMeterAttribute

func GetLicenseMeterAttribute(name string, allowedUses *int64, totalUses *uint64, grossUses *uint64) int

GetLicenseMeterAttribute gets the license meter attribute allowed uses, total and gross uses.

Parameters:

  • name: name of the meter attribute
  • allowedUses: pointer to the integer that receives the value. A value of -1 indicates unlimited allowed uses.
  • totalUses: pointer to the integer that receives the value
  • grossUses: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND

func GetLicenseOrganizationAddress

func GetLicenseOrganizationAddress(organizationAddress *OrganizationAddress) int

GetLicenseOrganizationAddress gets the organization address associated with the license.

Parameters:

  • organizationAddress: pointer to the OrganizationAddress struct that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetLicenseOrganizationName

func GetLicenseOrganizationName(organizationName *string) int

GetLicenseOrganizationName gets the organization name associated with the license.

Parameters:

  • organizationName: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetLicenseTotalActivations

func GetLicenseTotalActivations(totalActivations *uint) int

GetLicenseTotalActivations gets the total activations of the license.

Parameters:

  • totalActivations: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseTotalDeactivations

func GetLicenseTotalDeactivations(totalDeactivations *uint) int

GetLicenseTotalDeactivations gets the total deactivations of the license.

Parameters:

  • totalDeactivations: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func GetLicenseType

func GetLicenseType(licenseType *string) int

GetLicenseType gets the license type (node-locked or hosted-floating).

Parameters:

  • licenseType: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetLicenseUserCompany

func GetLicenseUserCompany(company *string) int

GetLicenseUserCompany gets the company associated with the license user.

Parameters:

  • company: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetLicenseUserEmail

func GetLicenseUserEmail(email *string) int

GetLicenseUserEmail gets the email associated with license user.

Parameters:

  • email: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetLicenseUserMetadata

func GetLicenseUserMetadata(key string, value *string) int

GetLicenseUserMetadata gets the metadata associated with the license user.

Parameters:

  • key: metadata key to retrieve the value
  • value: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE

func GetLicenseUserName

func GetLicenseUserName(name *string) int

GetLicenseUserName gets the name associated with the license user.

Parameters:

  • name: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetLocalTrialExpiryDate

func GetLocalTrialExpiryDate(trialExpiryDate *uint) int

GetLocalTrialExpiryDate gets the trial expiry date timestamp.

Parameters:

  • trialExpiryDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED

func GetProductMetadata

func GetProductMetadata(key string, value *string) int

GetProductMetadata gets the product metadata as set in the dashboard.

This is available for trial as well as license activations.

Parameters:

  • key: metadata key to retrieve the value
  • value: pointer to a string that receives the value

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE

func GetProductVersionDisplayName deprecated

func GetProductVersionDisplayName(displayName *string) int

GetProductVersionDisplayName gets the product version display name.

Deprecated: This function is deprecated. Use GetLicenseEntitlementSetDisplayName() instead.

Parameters:

  • displayName: pointer to a string that receives the value.

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_PRODUCT_VERSION_NOT_LINKED, LA_E_BUFFER_SIZE

func GetProductVersionFeatureFlag deprecated

func GetProductVersionFeatureFlag(name string, enabled *bool, data *string) int

GetProductVersionFeatureFlag gets the product version feature flag.

Deprecated: This function is deprecated. Use GetFeatureEntitlement() instead.

Parameters:

name - name of the feature flag
enabled - pointer to the integer that receives the value - 0 or 1
data - pointer to a buffer that receives the value of the string

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_PRODUCT_VERSION_NOT_LINKED, LA_E_FEATURE_FLAG_NOT_FOUND, LA_E_BUFFER_SIZE

func GetProductVersionName deprecated

func GetProductVersionName(name *string) int

GetProductVersionName gets the product version name.

Deprecated: This function is deprecated. Use GetLicenseEntitlementSetName() instead.

Parameters:

  • name: pointer to a buffer that receives the value of the string

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_PRODUCT_VERSION_NOT_LINKED, LA_E_BUFFER_SIZE

func GetServerSyncGracePeriodExpiryDate

func GetServerSyncGracePeriodExpiryDate(expiryDate *uint) int

GetServerSyncGracePeriodExpiryDate gets the server sync grace period expiry date timestamp.

Parameters:

  • expiryDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func GetTrialActivationMetadata

func GetTrialActivationMetadata(key string, value *string) int

GetTrialActivationMetadata gets the trial activation metadata.

Parameters:

  • key: metadata key to retrieve the value
  • value: pointer to a string that receives the value

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_NOT_FOUND, LA_E_BUFFER_SIZE

func GetTrialExpiryDate

func GetTrialExpiryDate(trialExpiryDate *uint) int

GetTrialExpiryDate gets the trial expiry date timestamp.

Parameters:

  • trialExpiryDate: pointer to the integer that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func GetTrialId

func GetTrialId(trialId *string) int

GetTrialId gets the trial activation id. Used in case of trial extension.

Parameters:

  • trialId: pointer to a string that receives the value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED, LA_E_BUFFER_SIZE

func GetUserLicenses

func GetUserLicenses(userLicenses *[]UserLicense) int

GetUserLicenses gets the user licenses for the product.

This function sends a network request to Cryptlex servers to get the licenses.

Make sure AuthenticateUser() function is called before calling this function.

Parameters:

  • userLicenses: pointer to the array of UserLicense struct that receives the values of the user's licenses.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_INET, LA_E_SERVER, LA_E_RATE_LIMIT, LA_E_USER_NOT_AUTHENTICATED
LA_E_BUFFER_SIZE

func IncrementActivationMeterAttributeUses

func IncrementActivationMeterAttributeUses(name string, increment uint) int

IncrementActivationMeterAttributeUses increments the meter attribute uses of the activation.

Parameters:

  • name: name of the meter attribute
  • increment: the increment value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND, LA_E_INET, LA_E_TIME, LA_E_SERVER, LA_E_CLIENT, LA_E_METER_ATTRIBUTE_USES_LIMIT_REACHED, LA_E_AUTHENTICATION_FAILED, LA_E_COUNTRY, LA_E_IP, LA_E_RATE_LIMIT, LA_E_LICENSE_KEY

func IsLicenseGenuine

func IsLicenseGenuine() int

NOTE: If application was activated offline using ActivateLicenseOffline() function, you may want to set grace period to 0 to ignore grace period.

func IsLicenseValid

func IsLicenseValid() int

IsLicenseValid verifies whether your app is genuinely activated or not. The verification is done locally by verifying the cryptographic digital signature fetched at the time of activation.

This is just an auxiliary function which you may use in some specific cases, when you want to skip the server sync.

Return codes:

LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_GRACE_PERIOD_OVER, LA_FAIL, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_TIME, LA_E_TIME_MODIFIED

NOTE: You may want to set grace period to 0 to ignore grace period.

func IsLocalTrialGenuine

func IsLocalTrialGenuine() int

IsLocalTrialGenuine It verifies whether trial has started and is genuine or not. The

verification is done locally.

This function must be called on every start of your program during the trial period.

Return codes:

LA_OK, LA_LOCAL_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME_MODIFIED

func IsTrialGenuine

func IsTrialGenuine() int

IsTrialGenuine verifies whether trial has started and is genuine or not. The verification is done locally by verifying the cryptographic digital signature fetched at the time of trial activation.

This function must be called on every start of your program during the trial period.

Return codes:

LA_OK, LA_TRIAL_EXPIRED, LA_FAIL, LA_E_PRODUCT_ID, LA_E_TIME, LA_E_TIME_MODIFIED

func Reset

func Reset() int

Reset resets the activation and trial data stored in the machine.

This function is meant for developer testing only.

Return codes:

LA_OK, LA_E_PRODUCT_ID

Note: The function does not reset local(unverified) trial data.

func ResetActivationMeterAttributeUses

func ResetActivationMeterAttributeUses(name string) int

ResetActivationMeterAttributeUses resets the meter attribute uses consumed by the activation.

Parameters:

  • name: name of the meter attribute
  • decrement: the decrement value

Return codes:

LA_OK, LA_FAIL, LA_E_PRODUCT_ID, LA_E_METER_ATTRIBUTE_NOT_FOUND, LA_E_INET, LA_E_TIME, LA_E_SERVER, LA_E_CLIENT, LA_E_RATE_LIMIT, LA_E_LICENSE_KEY, LA_E_AUTHENTICATION_FAILED, LA_E_COUNTRY, LA_E_IP, LA_E_ACTIVATION_NOT_FOUND

func SetActivationLeaseDuration

func SetActivationLeaseDuration(leaseDuration int64) int

SetActivationLeaseDuration sets the lease duration for the activation.

The activation lease duration is honoured when the allow client lease duration property is enabled.

Parameters:

  • leaseDuration: value of the lease duration. A value of -1 indicates unlimited lease duration.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY

func SetActivationMetadata

func SetActivationMetadata(key string, value string) int

SetActivationMetadata sets the activation metadata.

The metadata appears along with the activation details of the license in dashboard.

Parameters:

  • key: string of maximum length 256 characters with utf-8 encoding.
  • value: string of maximum length 4096 characters with utf-8 encoding.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY, LA_E_METADATA_KEY_LENGTH, LA_E_METADATA_VALUE_LENGTH, LA_E_ACTIVATION_METADATA_LIMIT

func SetAppVersion deprecated

func SetAppVersion(appVersion string) int

SetAppVersion sets the current app version of your application.

The app version appears along with the activation details in dashboard. It is also used to generate app analytics.

Deprecated: This function is deprecated. Use SetReleaseVersion() instead.

Parameters:

  • appVersion: string of maximum length 256 characters with utf-8 encoding.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_APP_VERSION_LENGTH

func SetCacheMode

func SetCacheMode(enable bool) int

SetCacheMode enables or disables in-memory caching for LexActivator.

This function is designed to control caching behavior to suit specific application requirements. Caching is enabled by default to enhance performance.

Disabling caching is recommended in environments where multiple processes access the same license on a single machine and require real-time updates to the license state.

Parameters :

  • enable: false or true to disable or enable in-memory caching.

Return codes:

LA_OK, LA_E_PRODUCT_ID

func SetCryptlexHost

func SetCryptlexHost(host string) int

SetCryptlexHost in case you are running Cryptlex on-premise, you can set the host for your on-premise server.

Parameters:

  • host: the address of the Cryptlex on-premise server

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_HOST_URL

func SetCustomDeviceFingerprint

func SetCustomDeviceFingerprint(fingerprint string) int

SetCustomDeviceFingerprint In case you don't want to use the LexActivator's advanced device fingerprinting algorithm, this function can be used to set a custom device fingerprint.

If you decide to use your own custom device fingerprint then this function must be called on every start of your program immediately after calling SetProductFile() or SetProductData() function.

The license fingerprint matching strategy is ignored if this function is used.

Parameters:

  • fingerprint: string of minimum length 64 characters and maximum length 256 characters.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_CUSTOM_FINGERPRINT_LENGTH

func SetDataDirectory

func SetDataDirectory(directoryPath string) int

SetDataDirectory In case you want to change the default directory used by LexActivator to store the activation data on Linux and macOS, this function can be used to set a different directory.

If you decide to use this function, then it must be called on every start of your program before calling SetProductFile() or SetProductData() function.

Please ensure that the directory exists and your app has read and write permissions in the directory.

Parameters:

  • directoryPath: absolute path of the directory.

Return Codes:

LA_OK
LA_E_FILE_PERMISSION

func SetDebugMode

func SetDebugMode(enable uint) int

SetDebugMode enables network logs.

This function should be used for network testing only in case of network errors. By default logging is disabled.

This function generates the lexactivator-logs.log file in the same directory where the application is running.

Parameters :

  • enable: 0 or 1 to disable or enable logging.

Return Codes:

LA_OK

func SetLicenseCallback

func SetLicenseCallback(callbackFunction func(int)) int

SetLicenseCallback sets the license callback.

Whenever the server sync occurs in a separate thread, and server returns the response, license callback function gets invoked with the following status codes: LA_OK, LA_EXPIRED, LA_SUSPENDED, LA_E_REVOKED, LA_E_ACTIVATION_NOT_FOUND, LA_E_MACHINE_FINGERPRINT LA_E_AUTHENTICATION_FAILED, LA_E_COUNTRY, LA_E_INET, LA_E_SERVER, LA_E_RATE_LIMIT, LA_E_IP

Parameters:

  • callback: name of the callback function

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY

func SetLicenseKey

func SetLicenseKey(licenseKey string) int

SetLicenseKey sets the license key required to activate the license.

Parameters:

  • licenseKey: a valid license key.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY

func SetLicenseUserCredential deprecated

func SetLicenseUserCredential(email string, password string) int

This function must be called before ActivateLicense() or IsLicenseGenuine() function if 'requireAuthentication' property of the license is set to true.

Deprecated: This function is deprecated. Use AuthenticateUser() instead.

Parameters:

  • email: user email address.
  • password: user password.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY

func SetNetworkProxy

func SetNetworkProxy(proxy string) int

SetNetworkProxy sets the network proxy to be used when contacting Cryptlex servers.

The proxy format should be: [protocol://][username:password@]machine[:port]

Following are some examples of the valid proxy strings:

Parameters:

  • proxy: proxy string having correct proxy format

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_NET_PROXY

NOTE: Proxy settings of the computer are automatically detected. So, in most of the cases you don't need to care whether your user is behind a proxy server or not.

func SetOfflineActivationRequestMeterAttributeUses

func SetOfflineActivationRequestMeterAttributeUses(name string, uses uint) int

SetOfflineActivationRequestMeterAttributeUses sets the meter attribute uses for the offline activation request.

This function should only be called before GenerateOfflineActivationRequest() function to set the meter attributes in case of offline activation.

Parameters:

  • name: name of the meter attribute
  • uses: the uses value

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY

func SetProductData

func SetProductData(productData string) int

SetProductData embeds the Product.dat file in the application.

It can be used instead of SetProductFile() in case you want to embed the Product.dat file in your application.

This function must be called on every start of your program before any other functions are called.

Parameters:

  • productData: content of the Product.dat file

Return codes:

LA_OK, LA_E_PRODUCT_DATA

NOTE: If this function fails to set the product data, none of the other functions will work.

func SetProductFile deprecated

func SetProductFile(filePath string) int

SetProductFile sets the absolute path of the Product.dat file.

This function must be called on every start of your program before any other functions are called.

Deprecated: This function is deprecated. Use SetProductData() instead.

Parameters:

  • filePath: absolute path of the product file (Product.dat)

Return codes:

LA_OK, LA_E_FILE_PATH, LA_E_PRODUCT_FILE

Note: If this function fails to set the path of product file, none of the other functions will work.

func SetProductId

func SetProductId(productId string, flags uint) int

SetProductId sets the product id of your application.

This function must be called on every start of your program before any other functions are called, with the exception of SetProductFile() or SetProductData() function.

Parameters:

  • productId: the unique product id of your application as mentioned on the product page in the dashboard.

  • flags: depending on your application's requirements, choose one of the following values: LA_USER, LA_SYSTEM, LA_IN_MEMORY, LA_ALL_USERS.

    LA_USER: This flag indicates that the application does not require admin or root permissions to run.

    LA_SYSTEM: This flag indicates that the application must be run with admin or root permissions.

    LA_IN_MEMORY: This flag will store activation data in memory. Thus, requires re-activation on every start of the application and should only be used in floating licenses.

    LA_ALL_USERS: This flag is specifically designed for Windows and should be used for system-wide activations.

Return codes:

LA_OK, LA_E_WMIC, LA_E_PRODUCT_FILE, LA_E_PRODUCT_DATA, LA_E_PRODUCT_ID, LA_E_SYSTEM_PERMISSION

NOTE: If this function fails to set the product id, none of the other functions will work.

func SetReleaseChannel

func SetReleaseChannel(releaseChannel string) int

SetReleaseChannel sets the release channel e.g. stable, beta

The release channel appears along with the activation details in dashboard.

Parameters:

  • releaseChannel: release channel e.g. stable

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_RELEASE_CHANNEL_LENGTH

func SetReleasePlatform

func SetReleasePlatform(releasePlatform string) int

SetReleasePlatform sets the release platform e.g. windows, macos, linux

The release platform appears along with the activation details in dashboard.

Parameters:

  • releasePlatform: release platform e.g. windows, macos, linux

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_RELEASE_PLATFORM_LENGTH

func SetReleasePublishedDate

func SetReleasePublishedDate(releasePublishedDate uint) int

SetReleasePublishedDate sets the release published date of your application.

Parameters:

  • releasePublishedDate: unix timestamp of release published date.

Return codes:

LA_OK, LA_E_PRODUCT_ID

func SetReleaseVersion

func SetReleaseVersion(releaseVersion string) int

SetReleaseVersion sets the current release version of your application.

The release version appears along with the activation details in dashboard.

Parameters:

  • releaseVersion: string in following allowed formats: x.x, x.x.x, x.x.x.x

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_RELEASE_VERSION_FORMAT

func SetTrialActivationMetadata

func SetTrialActivationMetadata(key string, value string) int

SetTrialActivationMetadata sets the trial activation metadata.

The metadata appears along with the trial activation details of the product in dashboard.

Parameters:

  • key: string of maximum length 256 characters with utf-8 encoding.
  • value: string of maximum length 4096 characters with utf-8 encoding.

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_METADATA_KEY_LENGTH, LA_E_METADATA_VALUE_LENGTH, LA_E_TRIAL_ACTIVATION_METADATA_LIMIT

func SetTwoFactorAuthenticationCode

func SetTwoFactorAuthenticationCode(twoFactorAuthenticationCode string) int

SetTwoFactorAuthenticationCode sets the two-factor authentication code for the user authentication.

Parameters:

  • twoFactorAuthenticationCode: the 2FA code

Return codes:

LA_OK, LA_E_PRODUCT_ID, LA_E_TWO_FACTOR_AUTHENTICATION_CODE_INVALID

Types

type FeatureEntitlement

type FeatureEntitlement struct {
	FeatureName        string `json:"featureName"`
	FeatureDisplayName string `json:"featureDisplayName"`
	Value              string `json:"value"`
}

type Metadata

type Metadata struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type OrganizationAddress

type OrganizationAddress struct {
	AddressLine1 string `json:"addressLine1"`
	AddressLine2 string `json:"addressLine2"`
	City         string `json:"city"`
	State        string `json:"state"`
	Country      string `json:"country"`
	PostalCode   string `json:"postalCode"`
}

type Release

type Release struct {
	TotalFiles  int           `json:"totalFiles"`
	IsPrivate   bool          `json:"isPrivate"`
	Published   bool          `json:"published"`
	Id          string        `json:"id"`
	CreatedAt   string        `json:"createdAt"`
	UpdatedAt   string        `json:"updatedAt"`
	Name        string        `json:"name"`
	Channel     string        `json:"channel"`
	Version     string        `json:"version"`
	Notes       string        `json:"notes"`
	PublishedAt string        `json:"publishedAt"`
	ProductId   string        `json:"productId"`
	Platforms   []string      `json:"platforms"`
	Files       []ReleaseFile `json:"files"`
}

type ReleaseFile

type ReleaseFile struct {
	Size      int    `json:"size"`
	Downloads int    `json:"downloads"`
	Secured   bool   `json:"secured"`
	Id        string `json:"id"`
	Name      string `json:"name"`
	Url       string `json:"url"`
	Extension string `json:"extension"`
	Checksum  string `json:"checksum"`
	ReleaseId string `json:"releaseId"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

type UserLicense

type UserLicense struct {
	// The allowed activations of the license. A value of -1 indicates unlimited number of activations.
	AllowedActivations int64 `json:"allowedActivations"`

	// The allowed activations of the license. A value of -1 indicates unlimited number of deactivations.
	AllowedDeactivations int64 `json:"allowedDeactivations"`

	// The license key.
	Key string `json:"key"`

	// The license type (node-locked or hosted-floating).
	Type string `json:"type"`

	// The license metadata.
	Metadata []Metadata `json:"metadata"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL