license

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: AGPL-3.0-only Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const ExclusiveClaim = "exclusive"

ExclusiveClaim is the claim used to describe which other claims are to be treated exclusive.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	*jwt.Claims

	LicenseFileName string `json:"-"`
	LicenseID       string `json:"-"`
	Raw             []byte `json:"-"`

	LicenseFileID               string `json:"uid"`
	DisplayName                 string `json:"dn"`
	SupportIdentificationNumber string `json:"sin"`
	Kopano                      Kopano `json:"k"`
}

Claims are the claims for Kopano licenses.

func GenerateClaims

func GenerateClaims(params map[string][]string) (*Claims, error)

GenerateCaims is a helper to generate Kopano product license claims from a map of string key/values.

type Kopano

type Kopano struct {
	Version  int        `json:"v"`
	Products ProductSet `json:"products"`
}

Kopano is a container for Kopano product license information.

type Product

type Product struct {
	LicenseID string `json:"lid"`
	Unknown   map[string]interface{}
}

A Product holds the license information for an individual Kopano product.

func (*Product) MarshalJSON

func (f *Product) MarshalJSON() ([]byte, error)

func (*Product) UnmarshalJSON

func (f *Product) UnmarshalJSON(data []byte) error

type ProductSet

type ProductSet map[string]*Product

A ProductSet is a mapping of keys for each product.

Jump to

Keyboard shortcuts

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