license

package
v0.0.0-...-692e68a Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

The license package helps manage commercial licenses and check if they are valid for the version of unidoc used.

Index

Constants

View Source
const (
	LicenseTierUnlicensed = "unlicensed"
	LicenseTierCommunity  = "community"
	LicenseTierIndividual = "individual"
	LicenseTierBusiness   = "business"
)

Variables

This section is empty.

Functions

func SetLicenseKey

func SetLicenseKey(content string) error

Sets and validates the license key.

Types

type LicenseKey

type LicenseKey struct {
	LicenseId    string    `json:"license_id"`
	CustomerId   string    `json:"customer_id"`
	CustomerName string    `json:"customer_name"`
	Tier         string    `json:"tier"`
	CreatedAt    time.Time `json:"-"`
	CreatedAtInt int64     `json:"created_at"`
	CreatedBy    string    `json:"created_by"`
	CreatorName  string    `json:"creator_name"`
	CreatorEmail string    `json:"creator_email"`
}

func GetLicenseKey

func GetLicenseKey() *LicenseKey

func MakeUnlicensedKey

func MakeUnlicensedKey() *LicenseKey

func (*LicenseKey) IsLicensed

func (lk *LicenseKey) IsLicensed() bool

func (*LicenseKey) ToString

func (this *LicenseKey) ToString() string

func (*LicenseKey) TypeToString

func (this *LicenseKey) TypeToString() string

func (*LicenseKey) Validate

func (this *LicenseKey) Validate() error

Jump to

Keyboard shortcuts

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