Documentation
¶
Index ¶
- Variables
- type Set
- func (l *Set) AllowRefresh(now time.Time) (bool, time.Duration)
- func (l *Set) AsJSON() json.RawMessage
- func (l *Set) Enabled(feature codersdk.FeatureName) bool
- func (l *Set) Errors() []string
- func (l *Set) Feature(name codersdk.FeatureName) (codersdk.Feature, bool)
- func (l *Set) FeatureChanged(featureName codersdk.FeatureName, newFeature codersdk.Feature) (initial, changed, enabled bool)
- func (l *Set) Modify(do func(entitlements *codersdk.Entitlements))
- func (l *Set) Update(ctx context.Context, ...) error
- func (l *Set) WriteEntitlementWarningHeaders(header http.Header)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLicenseRequiresTelemetry = xerrors.New("License requires telemetry but telemetry is disabled")
ErrLicenseRequiresTelemetry is an error returned by a fetch passed to Update to indicate that the fetched license cannot be used because it requires telemetry.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func (*Set) AllowRefresh ¶
AllowRefresh returns whether the entitlements are allowed to be refreshed. If it returns false, that means it was recently refreshed and the caller should wait the returned duration before trying again.
func (*Set) AsJSON ¶
func (l *Set) AsJSON() json.RawMessage
AsJSON is used to return this to the api without exposing the entitlements for mutation.
func (*Set) FeatureChanged ¶
func (*Set) Modify ¶ added in v2.17.0
func (l *Set) Modify(do func(entitlements *codersdk.Entitlements))
func (*Set) WriteEntitlementWarningHeaders ¶
Click to show internal directories.
Click to hide internal directories.