Skip to content

Exostellar/sdk-go

Repository files navigation

This is the official Go SDK for LicenseSpring.

Installation

go get -u gitlab.com/l3178/sdk-go/...

Specific versions

If you want to install a specific version, see the list of versions here.

How to use

This SDK contains 3 different modules:

Samples and Usage Instructions

The samples/ directory contains examples demonstrating both online and offline activations and deactivation using the SDK.

Setup Instructions

Before running the samples, you need to provide API credentials and product information in the samples/config.yaml file.

Edit the Config File:

Open the samples/config.yaml file and provide the following information:

  • API Key: Your API key.
  • Shared Key: A shared key.
  • Product Details: Add product-specific information (e.g., license key or username/password for user-based licenses).
  • verbose: If true, enables detailed logging for debugging purposes.
  • verify_signature: If true, verifies the server’s signature to ensure message integrity.

Run the Samples:

Once the config file is ready, call the sample from main.go by passing the product name as an argument:

Building

You can build your application using either of the following methods:

Standard Go Build

go build -o your-program

Go Build with Garble (Recommended)

Install Garble:

go install mvdan.cc/garble@latest

Build with Garble:

garble build -o your-program

For stronger obfuscation, use:

garble -literals -tiny build -o your-program

Why Use Garble

  • Obfuscation: Makes your binaries harder to reverse-engineer by renaming symbols and stripping debug information.
  • Security: Protects sensitive logic and proprietary algorithms.
  • Intellectual Property Protection: Reduces the risk of code theft or analysis.
  • Simple Integration: Works directly with your existing Go toolchain.

Note: For development builds, use go build for faster iteration and easier debugging.

Build Method Comparison

Build Method Pros Cons
go build Fast, easy, better for debugging No obfuscation
garble build Obfuscates binary, protects IP Slower, harder to debug

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages