Documentation
¶
Index ¶
- Variables
- func GetUserableEmails(user Userable) (mails []string)
- func GetUserableMailNickname(user Userable) (mailNickname string)
- func GetUserableNames(user Userable) (names []string)
- func GetUserablePhones(user Userable) (phones []string)
- func InitWithTargetConfigStore(store TargetConfigStore)
- func JSON(in any) (bytes datatypes.JSON)
- func RegisterPlatform(name string, platform Platform)
- func TargetKey(t Target) string
- func Uniq[T Entry](list []T) []T
- type Config
- type DatabaseConfigStore
- type DefaultViperConfig
- type DefaultViperConfigStore
- type Department
- type DepartmentEntryExtIDStoreable
- type DepartmentModifyUserOptions
- type DepartmentUserAction
- type DepartmentUserRole
- type DepartmentUserWriter
- type Departmentable
- type DepartmentableEntry
- type Entry
- type EntryCenter
- type EntryExtIDStoreable
- type EntryType
- type ExternalIdentities
- type ExternalIdentity
- func ExternalIdentitiesFromStringList(list []string) (extIDs []ExternalIdentity)
- func ExternalIdentityOfDepartment(target Target, dept DepartmentableEntry) ExternalIdentity
- func ExternalIdentityOfEntry(entry Entry) ExternalIdentity
- func ExternalIdentityOfUser(target Target, user UserableEntry) ExternalIdentity
- func ExternalIdentityParseString(raw string) (ExternalIdentity, error)
- func (id ExternalIdentity) CheckIfInternal(target Target) error
- func (id ExternalIdentity) GetEntryID() string
- func (id ExternalIdentity) GetEntryType() EntryType
- func (id ExternalIdentity) GetPlatform() string
- func (id ExternalIdentity) GetTarget() (Target, error)
- func (id ExternalIdentity) GetTargetSlug() string
- func (id ExternalIdentity) Valid() bool
- type Platform
- type Target
- type TargetConfig
- type TargetConfigStore
- type TargetEntry
- type TargetWithEnterpriseEmail
- type Unmarshaler
- type User
- type UserEntryExtIDStoreable
- type UserWriteable
- type Userable
- type UserableCanMerge
- type UserableEntry
- type UserableWithMailNickName
- type UserableWithMails
- type UserableWithNames
- type UserableWithPhones
- type UserableWithRole
Constants ¶
This section is empty.
Variables ¶
View Source
var Targets = make(map[string]Target)
Functions ¶
func GetUserableEmails ¶
func GetUserableMailNickname ¶
func GetUserableNames ¶
func GetUserablePhones ¶
func InitWithTargetConfigStore ¶
func InitWithTargetConfigStore(store TargetConfigStore)
func RegisterPlatform ¶
Types ¶
type DatabaseConfigStore ¶
type DatabaseConfigStore struct {
// contains filtered or unexported fields
}
type DefaultViperConfig ¶
type DefaultViperConfig struct {
// contains filtered or unexported fields
}
func (DefaultViperConfig) GetPlatform ¶
func (c DefaultViperConfig) GetPlatform() string
func (DefaultViperConfig) GetUnmarshaler ¶
func (c DefaultViperConfig) GetUnmarshaler() Unmarshaler
type DefaultViperConfigStore ¶
type DefaultViperConfigStore struct{}
func (DefaultViperConfigStore) GetConfigs ¶
func (DefaultViperConfigStore) GetConfigs() (configs []TargetConfig)
type Department ¶
func (Department) GetDescription ¶
func (d Department) GetDescription() string
func (Department) GetName ¶
func (d Department) GetName() string
type DepartmentEntryExtIDStoreable ¶
type DepartmentEntryExtIDStoreable interface {
DepartmentableEntry
EntryExtIDStoreable
}
type DepartmentModifyUserOptions ¶
type DepartmentModifyUserOptions struct {
Role DepartmentUserRole
}
type DepartmentUserAction ¶
type DepartmentUserAction uint
const ( DepartmentUserActionSet DepartmentUserAction = iota DepartmentUserActionAdd DepartmentUserActionDelete )
type DepartmentUserRole ¶
type DepartmentUserRole uint
const ( DepartmentUserRoleMember DepartmentUserRole = iota DepartmentUserRoleAdmin )
type DepartmentUserWriter ¶
type DepartmentUserWriter interface {
AddToDepartment(options DepartmentModifyUserOptions, extID ExternalIdentity) error
}
type Departmentable ¶
type DepartmentableEntry ¶
type DepartmentableEntry interface {
Entry
Departmentable
GetChildDepartments() (departments []DepartmentableEntry)
CreateChildDepartment(department Departmentable) (DepartmentableEntry, error)
GetUsers() (users []UserableEntry, err error)
}
type EntryCenter ¶
type EntryCenter interface {
LookupEntryByExternalIdentity(extID ExternalIdentity) (Entry, error)
LookupEntryUserByExternalIdentity(extID ExternalIdentity) (UserEntryExtIDStoreable, error)
LookupEntryDepartmentByExternalIdentity(extID ExternalIdentity) (DepartmentEntryExtIDStoreable, error)
}
type EntryExtIDStoreable ¶
type EntryExtIDStoreable interface {
GetExternalIdentities() ExternalIdentities
SetExternalIdentities(extIDs ExternalIdentities) error
}
type ExternalIdentities ¶
type ExternalIdentities []ExternalIdentity
func (ExternalIdentities) StringList ¶
func (i ExternalIdentities) StringList() (list []string)
type ExternalIdentity ¶
type ExternalIdentity string
mail format as ei.{entry_type}.{external_entry_id}@{target_slug}.{platform}
const InvalidExternalIdentity ExternalIdentity = ""
func ExternalIdentitiesFromStringList ¶
func ExternalIdentitiesFromStringList(list []string) (extIDs []ExternalIdentity)
func ExternalIdentityOfDepartment ¶
func ExternalIdentityOfDepartment(target Target, dept DepartmentableEntry) ExternalIdentity
func ExternalIdentityOfEntry ¶
func ExternalIdentityOfEntry(entry Entry) ExternalIdentity
func ExternalIdentityOfUser ¶
func ExternalIdentityOfUser(target Target, user UserableEntry) ExternalIdentity
func ExternalIdentityParseString ¶
func ExternalIdentityParseString(raw string) (ExternalIdentity, error)
func (ExternalIdentity) CheckIfInternal ¶
func (id ExternalIdentity) CheckIfInternal(target Target) error
func (ExternalIdentity) GetEntryID ¶
func (id ExternalIdentity) GetEntryID() string
func (ExternalIdentity) GetEntryType ¶
func (id ExternalIdentity) GetEntryType() EntryType
func (ExternalIdentity) GetPlatform ¶
func (id ExternalIdentity) GetPlatform() string
func (ExternalIdentity) GetTarget ¶
func (id ExternalIdentity) GetTarget() (Target, error)
func (ExternalIdentity) GetTargetSlug ¶
func (id ExternalIdentity) GetTargetSlug() string
func (ExternalIdentity) Valid ¶
func (id ExternalIdentity) Valid() bool
type Target ¶
type Target interface {
TargetEntry
GetTarget() Target
GetTargetSlug() string
GetPlatform() string
GetRootDepartment() (DepartmentableEntry, error)
GetAllUsers() (users []UserableEntry, err error)
}
type TargetConfig ¶
type TargetConfig interface {
GetPlatform() string
GetUnmarshaler() Unmarshaler
}
type TargetConfigStore ¶
type TargetConfigStore interface {
GetConfigs() []TargetConfig
}
type TargetEntry ¶
type TargetEntry interface {
LookupEntryUserByInternalExternalIdentity(internalExtID ExternalIdentity) (UserableEntry, error)
LookupEntryDepartmentByInternalExternalIdentity(internalExtID ExternalIdentity) (DepartmentableEntry, error)
}
type TargetWithEnterpriseEmail ¶
type TargetWithEnterpriseEmail interface {
GetEnterpriseEmailDomains() []string
}
type Unmarshaler ¶
type User ¶
func (User) GetMailNickname ¶
type UserEntryExtIDStoreable ¶
type UserEntryExtIDStoreable interface {
UserableEntry
EntryExtIDStoreable
}
type UserWriteable ¶
type UserWriteable interface {
CreateUser(options Userable) (UserableEntry, error)
LookupUser(options Userable) (UserableEntry, error)
}
type UserableCanMerge ¶
type UserableCanMerge interface {
UserableEntry
Merge(user UserableEntry) error
}
type UserableEntry ¶
func RecursionGetAllUsersIncludeChildDepartments ¶
func RecursionGetAllUsersIncludeChildDepartments(department DepartmentableEntry) (users []UserableEntry, err error)
type UserableWithMails ¶
type UserableWithNames ¶
type UserableWithPhones ¶
type UserableWithRole ¶
type UserableWithRole interface {
UserableEntry
GetRole() (role DepartmentUserRole)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.