cedarldap

package
v0.0.0-...-af59717 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL