unidoc: github.com/unidoc/unidoc/license Index | Files

package license

import "github.com/unidoc/unidoc/license"

Package license contains customer opensource and commercial license handling.


Package Files

crypto.go key.go pubkeys.go util.go


const (
    LicenseTypeCommercial = "commercial"
    LicenseTypeOpensource = "opensource"

func SetLicenseKey Uses

func SetLicenseKey(content string) error

Sets and validates the license key.

func UseDevKeys Uses

func UseDevKeys()

type LicenseKey Uses

type LicenseKey struct {
    LicenseId    string    `json:"license_id"`
    CustomerId   string    `json:"customer_id"`
    CustomerName string    `json:"customer_name"`
    Type         string    `json:"type"`
    Features     []string  `json:"features"`
    CreatedAt    time.Time `json:"-"`
    CreatedAtInt int64     `json:"created_at"`
    ExpiresAt    time.Time `json:"-"`
    ExpiresAtInt int64     `json:"expires_at"`
    CreatedBy    string    `json:"created_by"`
    CreatorName  string    `json:"creator_name"`
    CreatorEmail string    `json:"creator_email"`

func GetLicenseKey Uses

func GetLicenseKey() *LicenseKey

func MakeOpensourceLicenseKey Uses

func MakeOpensourceLicenseKey() *LicenseKey

func (*LicenseKey) ToString Uses

func (this *LicenseKey) ToString() string

func (*LicenseKey) TypeToString Uses

func (this *LicenseKey) TypeToString() string

func (*LicenseKey) Validate Uses

func (this *LicenseKey) Validate() error

Package license imports 12 packages (graph) and is imported by 4 packages. Updated 2016-08-03. Refresh now. Tools for package owners.