Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feature ¶
type Feature string
const ( // FeatureAll define feature name for all features FeatureAll Feature = "*" // FeatureArangoDB define feature name for ArangoDB FeatureArangoDB Feature = "ArangoDB" // FeatureArangoSearch define feature name for ArangoSearch FeatureArangoSearch Feature = "ArangoSearch" // FeatureDataSciencePackage define feature name for DataSciencePackage FeatureDataSciencePackage Feature = "DataSciencePackage" // SubFeatureGraphML define feature name for GraphML - SubFeature of DataSciencePackage SubFeatureGraphML Feature = "GraphML" // SubFeatureAnalytics define feature name for Analytics - SubFeature of DataSciencePackage SubFeatureAnalytics Feature = "Analytics" )
type License ¶
type License interface { // Validate validates the license scope. In case of: // - if feature is '*' - checks if: // -- license is valid and not expired // - if feature is not '*' and subFeatures list is empty - checks if: // -- license is valid and not expired // -- feature is enabled and not expired // - if feature is not '*' and subFeatures list is not empty - checks if: // -- license is valid and not expired // -- feature is enabled and not expired // -- for each subFeature defined in subFeatures: // --- checks if subFeature or '*' is in the list of License Feature enabled SubFeatures Validate(feature Feature, subFeatures ...Feature) Status // Refresh refreshes the license from the source (Secret) and verifies the signature Refresh(ctx context.Context) error }
func NewLicense ¶
type Loader ¶
type Loader interface { // Refresh reloads license in a specified manner. // It returns license (base64 encoded), found, error Refresh(ctx context.Context) (string, bool, error) }
func NewArangoDeploymentLicenseLoader ¶
func NewArangoDeploymentLicenseLoader(client kubernetes.Interface, deployment *api.ArangoDeployment) Loader
type Status ¶
type Status int
const ( // StatusMissing define state when the license could not be loaded from the start or was not provided // NotLicensed StatusMissing Status = iota // StatusInvalid define state when the license and any of the fields are not valid // NotLicensed StatusInvalid // StatusInvalidSignature define state when license signature could not be validated // NotLicensed StatusInvalidSignature // StatusNotYetValid define state when the license contains nbf and current time (UTC) is before a specified time // NotLicensed StatusNotYetValid // StatusNotAnymoreValid define state when the license contains exp and current time (UTC) is after a specified time // NotLicensed StatusNotAnymoreValid // StatusFeatureNotEnabled define state when features requirements does not match one requested by the feature in Operator // NotLicensed StatusFeatureNotEnabled // StatusFeatureExpired define state when token is valid, but feature itself is expired // NotLicensed StatusFeatureExpired // StatusValid define state when Operator should continue execution // Licensed StatusValid )
Click to show internal directories.
Click to hide internal directories.