entitlements
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
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¶
var ErrLicenseRequiresTelemetry =xerrors.New(codersdk.LicenseTelemetryRequiredErrorText)
ErrLicenseRequiresTelemetry is an error returned by a fetch passed to Update to indicate that thefetched license cannot be used because it requires telemetry.
Functions¶
This section is empty.
Types¶
typeSet¶
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 shouldwait 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 formutation.
func (*Set)FeatureChanged¶
func (*Set)Modify¶added inv2.17.0
func (l *Set) Modify(do func(entitlements *codersdk.Entitlements))