Documentation
¶
Index ¶
Constants ¶
View Source
const ( UserTypeContractor = "Contractor" UserTypeEmployee = "Employee" UserTypeExternal = "External" UserTypeIntern = "Intern" UserTypeTemp = "Temp" UserTypeUnknown = "Unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Type string `json:"Type,omitempty"`
StreetAddress string `json:"StreetAddress,omitempty"`
Locality string `json:"Locality,omitempty"`
Region string `json:"Region,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
Country string `json:"country,omitempty"`
Formatted string `json:"formatted,omitempty"`
Primary bool `json:"primary,omitempty"`
}
Address is a SCIM struct used for street and mailing addresses.
func (*Address) InflateStreetAddress ¶
type Item ¶
type Item struct {
Value string `json:"value,omitempty"`
Type string `json:"type,omitempty"`
Primary bool `json:"primary,omitempty"`
}
Item is a SCIM struct used for email and phone numbers.
func GetOneItem ¶
type Name ¶
type Name struct {
Formatted string `json:"formatted,omitempty"`
HonorificPrefix string `json:"honorificPrefix,omitempty"`
GivenName string `json:"givenName,omitempty"`
MiddleName string `json:"middleName,omitempty"`
FamilyName string `json:"familyName,omitempty"`
HonorificSuffix string `json:"honorificSuffix,omitempty"`
}
Name is the SCIM user name struct.
func (*Name) BuildDisplayName ¶
type User ¶
type User struct {
Schemas []string `json:"schemas,omitempty"`
Active bool `json:"active,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Emails []Item `json:"emails,omitempty"`
ExternalID string `json:"externalId,omitempty"`
Groups []Group `json:"groups,omitempty"`
ID string `json:"id,omitempty"`
Locale string `json:"locale,omitempty"`
Name Name `json:"name,omitempty"`
NickName string `json:"nickName,omitempty"`
Password string `json:"password,omitempty"`
ProfileURL string `json:"profileUrl,omitempty"`
PhoneNumbers []Item `json:"phoneNumbers,omitempty"`
PreferredLanguage string `json:"preferredLanguage,omitempty"`
Timezone string `json:"timezone,omitempty"`
Title string `json:"title,omitempty"`
UserName string `json:"userName,omitempty"`
UserType string `json:"userType,omitempty"`
}
User is an object from the full user representation specified in the SCIM schema: http://www.simplecloud.info/specs/draft-scim-core-schema-01.html#anchor7 https://tools.ietf.org/html/rfc7643
func (*User) AddEmail ¶
AddEmail adds a canonical email address to the user. it lowercases and trims preceding and trailing spaces from the email address.
func (*User) DisplayNameAny ¶
func (*User) EmailAddress ¶
GetPrimaryEmail returns an email address or empty string. It prioritizes primary email addresses and then falls back to non-primary email address.
func (*User) InflateDisplayName ¶
func (*User) PhoneNumber ¶
type UserSet ¶
type UserSet struct {
Users []User `json:"users,omitempty"`
}
func NewUserSet ¶
func NewUserSet() UserSet
func ReadFileUserSet ¶
func (*UserSet) GetByEmail ¶
Click to show internal directories.
Click to hide internal directories.