service

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	InstanceCount int    `json:"instanceCount"`
	Trialing      bool   `json:"trialing"`
	Plan          string `json:"plan"`
	jwt.StandardClaims
}

Claims creates a struct that will be encoded to a JWT. We add jwt.StandardClaims as an embedded type, to provide fields like name.

type LicenseService

type LicenseService struct {
	// contains filtered or unexported fields
}

LicenseService is the service for enterprise license.

func NewLicenseService

func NewLicenseService(l *zap.Logger, dataDir string, mode string) (*LicenseService, error)

NewLicenseService will create a new enterprise license service.

func (*LicenseService) LoadLicense

func (s *LicenseService) LoadLicense() (*enterpriseAPI.License, error)

LoadLicense will load license from file and validate it.

func (*LicenseService) StoreLicense

func (s *LicenseService) StoreLicense(tokenString string) error

StoreLicense will store license into file.

Jump to

Keyboard shortcuts

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