Documentation
¶
Overview ¶
Package object defines the provider-independent objects consumed by Writ. Providers resolve identity, eligibility, and membership before returning these facts. This package owns selectable values and the boundary between defined fields and additional attributes; it knows nothing about provisioning schemas.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupNames ¶
GroupNames projects memberships for the existing name-based administration grants and displays. Authorization matching itself retains structured groups.
func ValuesFor ¶
func ValuesFor(id string, names []string, attrs Attributes, key string) []string
Values returns the complete values of an attribute on one object. Missing IDs supply no values. Defined fields always take precedence over additional data; Validate rejects collisions before any evaluation takes place.
Types ¶
type Attributes ¶
Attributes contains only additional, flat fields. Defined name/id fields cannot be shadowed by provider attributes.
func FromStrings ¶
func FromStrings(values map[string]string) Attributes
FromStrings maps an adapter's single-valued attributes into the fact model.
func (Attributes) Validate ¶
func (a Attributes) Validate() error
type Object ¶
type Object struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Names Strings `json:"name" yaml:"name"`
Attributes Attributes `json:"attributes,omitempty" yaml:"attributes,omitempty"`
}
Object is a group membership's facts. ID is optional; Names is the set of names for this single object, not a set of unrelated same-named groups.
func (*Object) UnmarshalJSON ¶
Memberships must be actual objects; a null element is not a group that can satisfy an empty group filter.
type Strings ¶
type Strings []string
Strings is a collection with no implicit conversion of scalar or null members. Unlike Values, the defined name field always uses an array.
func (*Strings) UnmarshalJSON ¶
type User ¶
type User struct {
ID string `json:"id" yaml:"id"`
Names Strings `json:"name" yaml:"name"`
UserName string `json:"userName,omitempty" yaml:"userName,omitempty"`
Attributes Attributes `json:"attributes,omitempty" yaml:"attributes,omitempty"`
Groups []Object `json:"groups" yaml:"groups"`
}
User is an eligible user resolved by a provider for an authenticated identity. UserName is certificate presentation, independent of selectable Names.
type Values ¶
type Values []string
Values is a fact's collection of strings. JSON and YAML may supply a single string, a string collection, or null. Null and empty collections contain no values; the empty string is a value. Non-string elements are always invalid.