Documentation ¶
Index ¶
- func NewOnboardingClient() *interserviceclient.InterServiceClient
- type ProfileService
- type RemoteProfileService
- func (rps RemoteProfileService) GetDeviceTokens(ctx context.Context, uids UserUIDs) (map[string][]string, error)
- func (rps RemoteProfileService) GetEmailAddresses(ctx context.Context, uids UserUIDs) (map[string][]string, error)
- func (rps RemoteProfileService) GetPhoneNumbers(ctx context.Context, uids UserUIDs) (map[string][]string, error)
- func (rps RemoteProfileService) GetUserProfile(ctx context.Context, uid string) (*profileutils.UserProfile, error)
- func (rps RemoteProfileService) GetUserProfileByPhoneOrEmail(ctx context.Context, payload *dto.RetrieveUserProfileInput) (*profileutils.UserProfile, error)
- type UserUIDs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOnboardingClient ¶
func NewOnboardingClient() *interserviceclient.InterServiceClient
NewOnboardingClient initializes a new interservice client for onboarding
Types ¶
type ProfileService ¶
type ProfileService interface { GetEmailAddresses( ctx context.Context, uids UserUIDs, ) (map[string][]string, error) GetPhoneNumbers( ctx context.Context, uids UserUIDs, ) (map[string][]string, error) GetDeviceTokens( ctx context.Context, uid UserUIDs, ) (map[string][]string, error) GetUserProfile( ctx context.Context, uid string, ) (*profileutils.UserProfile, error) GetUserProfileByPhoneOrEmail( ctx context.Context, payload *dto.RetrieveUserProfileInput, ) (*profileutils.UserProfile, error) }
ProfileService defines the interactions with the profile service
func NewRemoteProfileService ¶
func NewRemoteProfileService( profileClient *interserviceclient.InterServiceClient, ) ProfileService
NewRemoteProfileService initializes a connection to a remote profile service that we will invoke via inter-service communication
type RemoteProfileService ¶
type RemoteProfileService struct {
// contains filtered or unexported fields
}
RemoteProfileService uses inter-service REST APIs to fetch information from a remote profile service
func (RemoteProfileService) GetDeviceTokens ¶
func (rps RemoteProfileService) GetDeviceTokens( ctx context.Context, uids UserUIDs, ) (map[string][]string, error)
GetDeviceTokens gets the specified users' FCM push tokens from the staging / testing / prod profile service
func (RemoteProfileService) GetEmailAddresses ¶
func (rps RemoteProfileService) GetEmailAddresses( ctx context.Context, uids UserUIDs, ) (map[string][]string, error)
GetEmailAddresses gets the specified users' email addresses from the staging / testing / prod profile service
func (RemoteProfileService) GetPhoneNumbers ¶
func (rps RemoteProfileService) GetPhoneNumbers( ctx context.Context, uids UserUIDs, ) (map[string][]string, error)
GetPhoneNumbers gets the specified users' phone numbers from the staging / testing / prod profile service
func (RemoteProfileService) GetUserProfile ¶
func (rps RemoteProfileService) GetUserProfile( ctx context.Context, uid string, ) (*profileutils.UserProfile, error)
GetUserProfile gets the specified users' profile from the onboarding service
func (RemoteProfileService) GetUserProfileByPhoneOrEmail ¶
func (rps RemoteProfileService) GetUserProfileByPhoneOrEmail( ctx context.Context, payload *dto.RetrieveUserProfileInput, ) (*profileutils.UserProfile, error)
GetUserProfileByPhoneOrEmail gets the specified users' profile from the onboarding service