Documentation ¶
Index ¶
- Constants
- type AttrType
- func (attr *AttrType) IsComplex() bool
- func (attr *AttrType) IsImmutable() bool
- func (attr *AttrType) IsReadOnly() bool
- func (attr *AttrType) IsRef() bool
- func (attr *AttrType) IsSimple() bool
- func (attr *AttrType) IsStringType() bool
- func (attr *AttrType) IsUnique() bool
- func (attr *AttrType) Parent() *AttrType
- type LdapAttribute
- type LdapEntryTemplate
- type ResourceType
- type Schema
- type SchemaExtension
- type ValidationErrors
Constants ¶
View Source
const ATTR_DELIM = "."
View Source
const LDAP_Group_Entry = `` /* 465-byte string literal not displayed */
View Source
const LDAP_User_Entry = `` /* 1214-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttrType ¶
type AttrType struct { Name string // name Type string // type Description string // description CaseExact bool // caseExact MultiValued bool // multiValued Mutability string // mutability Required bool // required Returned string // returned Uniqueness string // uniqueness SubAttributes []*AttrType // subAttributes ReferenceTypes []string // referenceTypes CanonicalValues []string // canonicalValues SubAttrMap map[string]*AttrType SchemaId string // schema's ID NormName string // the lowercase name of the attribute // contains filtered or unexported fields }
The definition of an attribute's type All the fields are named identical to those defined in the schema definition in rfc7643 so that schema JSON files can be parsed using Go's default unmarshaller
func (*AttrType) IsComplex ¶
TODO avoid the need for strings.ToLower() in all IsXXX methods by replacing with lowercase values or by storing the result in boolean fields
func (*AttrType) IsImmutable ¶
func (*AttrType) IsReadOnly ¶
func (*AttrType) IsStringType ¶
type LdapAttribute ¶
type LdapEntryTemplate ¶
type LdapEntryTemplate struct { Type string `json:"type"` Endpoint string `json:"-"` DnPrefix string `json:"dnPrefix"` DnAtName string `json:"-"` ObjectClasses []string `json:"objectClasses"` Attributes []*LdapAttribute `json:"attributes"` AttrMap map[string]*LdapAttribute `json:"-"` LdapToScimAtMap map[string]string `json:"-"` }
func NewLdapTemplate ¶
func NewLdapTemplate(tmpl []byte, rsTypes map[string]*ResourceType) (entry *LdapEntryTemplate, err error)
type ResourceType ¶
type ResourceType struct { Id string Name string Endpoint string Description string Schema string SchemaExtensions []*SchemaExtension Meta struct { Location string ResourceType string } Text string // the JSON representation of this resource type UniqueAts []string // a collection of all unique attributes AtsNeverRtn map[string]int // names of attributes that are never returned AtsAlwaysRtn map[string]int // names of attributes that are always returned AtsRequestRtn map[string]int // names of attributes that are returned if requested AtsDefaultRtn map[string]int // names of attributes that are returned by default AtsReadOnly map[string]int // names of attributes that are readonly // contains filtered or unexported fields }
func LoadResourceType ¶
func LoadResourceType(name string, sm map[string]*Schema) (*ResourceType, error)
func NewResourceType ¶
func NewResourceType(data []byte, sm map[string]*Schema) (*ResourceType, error)
func (*ResourceType) GetAtType ¶
func (rt *ResourceType) GetAtType(atPath string) *AttrType
func (*ResourceType) GetMainSchema ¶
func (rt *ResourceType) GetMainSchema() *Schema
Returns the main schema of the given resourcetype
func (*ResourceType) GetSchema ¶
func (rt *ResourceType) GetSchema(urnId string) *Schema
Returns the schema identified by the URN associated with the given resourcetype
type Schema ¶
type Schema struct { Id string // id Name string // name Description string // description Attributes []*AttrType AttrMap map[string]*AttrType Text string Meta struct { Location string // location ResourceType string // resourceType } // meta UniqueAts []string RequiredAts []string AtsNeverRtn []string // names of attributes that are never returned AtsAlwaysRtn []string // names of attributes that are always returned AtsRequestRtn []string // names of attributes that are returned if requested AtsDefaultRtn []string // names of attributes that are returned by default AtsReadOnly []string // names of attributes that are readonly }
Definition of the schema
func LoadSchema ¶
Parses the given schema file and returns a schema instance after successfuly parsing
type SchemaExtension ¶
type ValidationErrors ¶
func (*ValidationErrors) Error ¶
func (ve *ValidationErrors) Error() string
Click to show internal directories.
Click to hide internal directories.