onboarding

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

type UserUIDs

type UserUIDs struct {
	UIDs []string `json:"uids"`
}

UserUIDs is used to serialize user UIDs for inter-service calls to the profile service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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