Documentation
¶
Index ¶
- 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) Feature(name codersdk.FeatureName) (codersdk.Feature, bool)
- func (l *Set) FeatureChanged(featureName codersdk.FeatureName, newFeature codersdk.Feature) (initial, changed, enabled bool)
- func (l *Set) Replace(entitlements codersdk.Entitlements)
- func (l *Set) Update(do func(entitlements *codersdk.Entitlements))
- func (l *Set) WriteEntitlementWarningHeaders(header http.Header)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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) Replace ¶
func (l *Set) Replace(entitlements codersdk.Entitlements)
func (*Set) Update ¶
func (l *Set) Update(do func(entitlements *codersdk.Entitlements))
func (*Set) WriteEntitlementWarningHeaders ¶
Click to show internal directories.
Click to hide internal directories.