license

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package license provides license management code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands() []cli.Command

Commands returns license commands

func Generate

func Generate(subscription string) (string, error)

Generate generates the license

func NewPlugin

func NewPlugin() plugin.Plugin

returns a micro plugin which validates use of license

func Revoke

func Revoke(lu string) error

Revoke revokes a license

func SetLicense

func SetLicense(lu string)

Set license to use on update calls

func SetToken

func SetToken(tk string)

SetToken sets the api token

func Verify

func Verify(lu string) error

Verify a token is valid

Types

type Info

type Info struct {
	*proto.Info
}

Info is the response from the update

func SendUpdate

func SendUpdate(ud *Update) (*Info, error)

SendUpdate sends a license update

type License

type License struct {
	*proto.License
}

License is the enterprise license

func List

func List() ([]*License, error)

List lists the licenses

func New

func New() *License

func (*License) Decode

func (l *License) Decode(key string, b []byte) error

func (*License) Encode

func (l *License) Encode(key string) (string, error)

func (*License) Equal

func (l *License) Equal(lu *License) error

func (*License) String

func (l *License) String() string

micro://email/subscription_id/license_id

func (*License) Valid

func (l *License) Valid() error

type Service

type Service struct {
	*proto.Service
}

Service uses the license

func (*Service) Valid

func (s *Service) Valid() error

type Subscription

type Subscription struct {
	*proto.Subscription
}

Subscription is a user subscription

func Subscriptions

func Subscriptions() ([]*Subscription, error)

Subscriptions lists the subscriptions

func (*Subscription) Equal

func (s *Subscription) Equal(su *Subscription) error

func (*Subscription) String

func (s *Subscription) String() string

micro://email/subscription

type Update

type Update struct {
	*proto.Update
}

Update represents an update

func NewUpdate

func NewUpdate() *Update

func (*Update) Decode

func (u *Update) Decode(key string, b []byte) error

func (*Update) Encode

func (u *Update) Encode(key string) (string, error)

func (*Update) Valid

func (u *Update) Valid() error

Jump to

Keyboard shortcuts

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