subnet

package
v2.0.19 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: AGPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseURL

func BaseURL(devMode bool) string

BaseURL returns the base URL for subnet.

Types

type LicenseValidator

type LicenseValidator struct {
	Client          http.Client
	LicenseFilePath string

	LicenseToken      string
	ExpiryGracePeriod time.Duration
	// contains filtered or unexported fields
}

LicenseValidator validates the MinIO license.

func NewLicenseValidator

func NewLicenseValidator(params LicenseValidatorParams) (*LicenseValidator, error)

NewLicenseValidator returns a new LicenseValidator using the provided tls client Config, and license file path. If the path is empty, it will look for minio.license in the current working directory. If `devMode` is true, the validator will connect to locally running SUBNET instance to download the public key or use the bundled dev key.

func (*LicenseValidator) Init

func (lv *LicenseValidator) Init(devMode bool)

Init initializes the LicenseValidator.

func (*LicenseValidator) ParseLicense

func (lv *LicenseValidator) ParseLicense(license string) (*licverifier.LicenseInfo, error)

ParseLicense parses the license with the public key and return it's information. Public key is downloaded from subnet. If there is an error downloading the public key it will use the bundled public key instead.

func (*LicenseValidator) ValidateEnterpriseLicense

func (lv *LicenseValidator) ValidateEnterpriseLicense(acceptedPlans []string, licExpiredChan chan<- string) (*licverifier.LicenseInfo, error)

ValidateEnterpriseLicense validates the ENTERPRISE license file. Since there are multiple variants of ENTERPRISE licenses, ones accepted by the application can be passed as `acceptedPlans`. TRIAL licenses do not get grace period after expiry.

func (*LicenseValidator) ValidateLicense

func (lv *LicenseValidator) ValidateLicense() (*licverifier.LicenseInfo, error)

ValidateLicense validates the license file.

type LicenseValidatorParams

type LicenseValidatorParams struct {
	TLSClientConfig   *tls.Config
	LicenseFilePath   string
	LicenseToken      string
	ExpiryGracePeriod time.Duration
	DevMode           bool
}

LicenseValidatorParams holds parameters for creating a new LicenseValidator.

Jump to

Keyboard shortcuts

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