licence

package
v0.0.0-...-3f7e466 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Licence

type Licence struct {
	UUID        string
	ValidFrom   time.Time
	ValidUntil  time.Time
	RunDuration time.Duration
	MaxCount    int64 // Zero = unlimited
	// contains filtered or unexported fields
}

func Load

func Load(s string) (*Licence, error)

func New

func New(key *rsa.PrivateKey, from, until time.Time, count int64) (*Licence, error)

func NewRunPeriod

func NewRunPeriod(key *rsa.PrivateKey, duration time.Duration, count int64) (*Licence, error)

func (*Licence) Print

func (l *Licence) Print() string

func (*Licence) Sign

func (l *Licence) Sign(key *rsa.PrivateKey) error

func (*Licence) String

func (l *Licence) String() (string, error)

func (*Licence) Valid

func (l *Licence) Valid(pubkey *rsa.PublicKey) (bool, error)

Jump to

Keyboard shortcuts

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