Documentation ¶
Index ¶
- func BaseURL(devMode bool) string
- type LicenseValidator
- func (lv *LicenseValidator) Init(devMode bool)
- func (lv *LicenseValidator) ParseLicense(license string) (*licverifier.LicenseInfo, error)
- func (lv *LicenseValidator) ValidateEnterpriseLicense(acceptedPlans []string, licExpiredChan chan<- string) (*licverifier.LicenseInfo, error)
- func (lv *LicenseValidator) ValidateLicense() (*licverifier.LicenseInfo, error)
- type LicenseValidatorParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.