license

package
v3.0.0-...-55e877b Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LicenseTierUnlicensed = "\u0075\u006e\u006c\u0069\u0063\u0065\u006e\u0073\u0065\u0064"
	LicenseTierCommunity  = "\u0063o\u006d\u006d\u0075\u006e\u0069\u0074y"
	LicenseTierIndividual = "\u0069\u006e\u0064\u0069\u0076\u0069\u0064\u0075\u0061\u006c"
	LicenseTierBusiness   = "\u0062\u0075\u0073\u0069\u006e\u0065\u0073\u0073"
)

Variables

This section is empty.

Functions

func SetLicenseKey

func SetLicenseKey(content string, customerName string) error

func SetMeteredKey

func SetMeteredKey(apiKey string) error

func SetMeteredKeyPersistentCache

func SetMeteredKeyPersistentCache(val bool)

func Track

func Track(docKey string, useKey string) error

func TrackUse

func TrackUse(useKey string)

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    _bc.Time  `json:"-"`
	CreatedAtInt int64     `json:"created_at"`
	ExpiresAt    *_bc.Time `json:"-"`
	ExpiresAtInt int64     `json:"expires_at"`
	CreatedBy    string    `json:"created_by"`
	CreatorName  string    `json:"creator_name"`
	CreatorEmail string    `json:"creator_email"`
	UniPDF       bool      `json:"unipdf"`
	UniOffice    bool      `json:"unioffice"`
	UniHTML      bool      `json:"unihtml"`
	Trial        bool      `json:"trial"`
	// contains filtered or unexported fields
}

func GetLicenseKey

func GetLicenseKey() *LicenseKey

func MakeUnlicensedKey

func MakeUnlicensedKey() *LicenseKey

func (*LicenseKey) IsLicensed

func (_bdf *LicenseKey) IsLicensed() bool

func (*LicenseKey) ToString

func (_aa *LicenseKey) ToString() string

func (*LicenseKey) TypeToString

func (_fgd *LicenseKey) TypeToString() string

func (*LicenseKey) Validate

func (_fcf *LicenseKey) Validate() error

type MeteredStatus

type MeteredStatus struct {
	OK      bool
	Credits int64
	Used    int64
}

func GetMeteredState

func GetMeteredState() (MeteredStatus, error)

Jump to

Keyboard shortcuts

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