Documentation
¶
Overview ¶
Package applimit decides how many apps a person may own (R-244, issue #131).
Three places may say: the person's own account, their groups, and host policy. The account wins whatever the groups say, so an administrator can make an exception for one person in either direction. Otherwise the most generous group wins, unlimited beating any number, because being in a group should only ever give somebody more. Otherwise host policy. Zero is unlimited wherever it is set; somebody who may not create apps at all is somebody without app.create.
Index ¶
Constants ¶
const ( SourceUser = "user" SourceGroup = "group" SourcePolicy = "policy" )
Where a limit comes from.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FactsReader ¶
FactsReader reads what a limit is decided from.
type Limit ¶
type Limit struct {
// Limit is how many apps they may own. 0 is unlimited.
Limit int `json:"limit"`
// Source is where it comes from: user, group or policy.
Source string `json:"source"`
// GroupID and GroupName name the group, when Source is group.
GroupID string `json:"group_id,omitempty"`
GroupName string `json:"group_name,omitempty"`
// Owned is how many apps they own now.
Owned int `json:"owned"`
// MaxApps is the value set on their own account: null when none is.
MaxApps *int `json:"max_apps"`
}
Limit is the limit in force for one person, and how close they are to it.
type PolicyLoader ¶
PolicyLoader reads host policy.