api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type License

type License struct {
	Subject       string
	InstanceCount int
	ExpiresTs     int64
	IssuedTs      int64
	Plan          api.PlanType
	Trialing      bool
}

License is the API message for enterprise license.

func (*License) Valid

func (l *License) Valid() error

Valid will check if license expired or has correct plan type.

type LicenseService

type LicenseService interface {
	// StoreLicense will store license into file.
	StoreLicense(tokenString string) error
	// LoadLicense will load license from file and validate it.
	LoadLicense() (*License, error)
}

LicenseService is the service for enterprise license.

type Subscription

type Subscription struct {
	InstanceCount int          `jsonapi:"attr,instanceCount"`
	ExpiresTs     int64        `jsonapi:"attr,expiresTs"`
	StartedTs     int64        `jsonapi:"attr,startedTs"`
	Plan          api.PlanType `jsonapi:"attr,plan"`
	Trialing      bool         `jsonapi:"attr,trialing"`
}

Subscription is the API message for subscription.

type SubscriptionPatch

type SubscriptionPatch struct {
	License string `jsonapi:"attr,license"`
}

SubscriptionPatch is the API message for update the subscription.

Jump to

Keyboard shortcuts

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