Documentation ¶
Index ¶
- type Client
- type TranslatedClient
- func (c TranslatedClient) FetchUserInfo(ctx context.Context, euaID string) (*models2.UserInfo, error)
- func (c TranslatedClient) FetchUserInfos(ctx context.Context, euaIDs []string) ([]*models2.UserInfo, error)
- func (c TranslatedClient) SearchCommonNameContains(ctx context.Context, commonName string) ([]*models2.UserInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { FetchUserInfo(context.Context, string) (*models2.UserInfo, error) FetchUserInfos(context.Context, []string) ([]*models2.UserInfo, error) SearchCommonNameContains(context.Context, string) ([]*models2.UserInfo, error) }
Client is an interface for helping test dependencies
type TranslatedClient ¶
type TranslatedClient struct {
// contains filtered or unexported fields
}
TranslatedClient is an API client for CEDAR LDAP using EASi language
func NewTranslatedClient ¶
func NewTranslatedClient(cedarHost string, cedarAPIKey string) TranslatedClient
NewTranslatedClient returns an API client for CEDAR LDAP using EASi language
func (TranslatedClient) FetchUserInfo ¶
func (c TranslatedClient) FetchUserInfo(ctx context.Context, euaID string) (*models2.UserInfo, error)
FetchUserInfo fetches a user's personal details While this does use the /person/{ids} endpoint, which supports querying multiple IDs, this function only supports querying for a _single_ user's info
func (TranslatedClient) FetchUserInfos ¶
func (c TranslatedClient) FetchUserInfos(ctx context.Context, euaIDs []string) ([]*models2.UserInfo, error)
FetchUserInfos fetches multiple users' personal details
func (TranslatedClient) SearchCommonNameContains ¶
func (c TranslatedClient) SearchCommonNameContains(ctx context.Context, commonName string) ([]*models2.UserInfo, error)
SearchCommonNameContains fetches a user's personal details by their common name, automatically wrapping the `commonName` parameter in * to make the search match any person whose name contains the commonName param