Help us shape the future of Go! Take the 2026 Go Developer Survey

license

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 12 Imported by: 0

README

license

Travis Status Maintainability Code Coverage Go Report Card Go Doc

The License framework is currently under heavy development.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLicense

func CreateLicense(template *License, key crypto.Signer) ([]byte, error)

CreateLicense godoc.

Types

type Customer

type Customer struct {
	Name               string
	Country            string
	City               string
	Organization       string
	OrganizationalUnit string
}

Customer godoc

type Feature

type Feature struct {
	Oid         asn1.ObjectIdentifier `json:"-"`
	Description string                `json:"description"`
	Expire      int64                 `json:"expire,omitempty"`
	Limit       int64                 `json:"limit"`
}

Feature godoc

type License

type License struct {
	ProductName  string    `json:"product"`
	SerialNumber string    `json:"serial"`
	Customer     Customer  `json:"customer"`
	ValidFrom    time.Time `json:"valid_from,omitempty"`
	ValidUntil   time.Time `json:"valid_until,omitempty"`
	MinVersion   int64     `json:"min_version,omitempty"`
	MaxVersion   int64     `json:"max_version,omitempty"`
	Features     []Feature `json:"features"`
}

License godoc

func Load

func Load(asn1Data []byte, publicKey interface{}, validator ValidateSN) (*License, error)

Load Load license from asn encoded file.

type ValidateSN

type ValidateSN func(product, serial string, validFrom, validUntil, minVersion, maxVersion int64) error

SerialNumberValidator godoc

Jump to

Keyboard shortcuts

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