license

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePrivateKey

func DecodePrivateKey(secret string) (ed25519.PrivateKey, error)

Types

type License

type License interface {
	GetType() Type
	GetCert() string
	GetId() string
	GetDomain() string
	GetTier() Tier
	GetIssuer() string
	Decode([]byte) error
	Print()
}

func ReadCert

func ReadCert(str string) (License, error)

type LicenseDomain

type LicenseDomain struct {
	Tier   Tier
	Domain string
	TS     time.Time
	Id     []byte
	Sign   []byte
	Issuer []byte
	Cert   []byte
}

func (*LicenseDomain) Decode

func (c *LicenseDomain) Decode(cert []byte) error

func (*LicenseDomain) Encode

func (c *LicenseDomain) Encode(secret ed25519.PrivateKey) error

func (*LicenseDomain) GetCert

func (c *LicenseDomain) GetCert() string

func (*LicenseDomain) GetDomain

func (c *LicenseDomain) GetDomain() string

func (*LicenseDomain) GetId

func (c *LicenseDomain) GetId() string

func (*LicenseDomain) GetIssuer

func (c *LicenseDomain) GetIssuer() string

func (*LicenseDomain) GetTier

func (c *LicenseDomain) GetTier() Tier

func (*LicenseDomain) GetType

func (c *LicenseDomain) GetType() Type

func (*LicenseDomain) Print

func (c *LicenseDomain) Print()

type Tier

type Tier uint8
const (
	TierStartup  Tier = 1
	TierBusiness Tier = 2
)

func (Tier) Format

func (t Tier) Format() string

func (Tier) String

func (t Tier) String() string

func (Tier) Value

func (t Tier) Value() uint8

type Type

type Type uint8
const (
	TypeDomain Type = 1
)

func (Type) Format

func (t Type) Format() string

func (Type) String

func (t Type) String() string

func (Type) Value

func (t Type) Value() uint8

Jump to

Keyboard shortcuts

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