userprofileservice

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUserProfileService

func CreateUserProfileService(config config.ProjectConfig, apiOptions models.APIOptions) decision.UserProfileService

CreateUserProfileService creates a user profile service with the given parameters

func ParseUserProfiles

func ParseUserProfiles(rawProfiles []map[string]interface{}) (parsedProfiles []decision.UserProfile)

ParseUserProfiles converts raw profiles into an array of user profiles

Types

type LookupErrorUserProfileService

type LookupErrorUserProfileService struct {
	NormalUserProfileService
}

LookupErrorUserProfileService represents a user profile service with lookup error

func (*LookupErrorUserProfileService) Lookup

Lookup is used to retrieve past bucketing decisions for users

type NoOpUserProfileService

type NoOpUserProfileService struct {
	NormalUserProfileService
}

NoOpUserProfileService represents a user profile service with save and lookup error

func (*NoOpUserProfileService) Lookup

Lookup is used to retrieve past bucketing decisions for users

func (*NoOpUserProfileService) Save

func (s *NoOpUserProfileService) Save(userProfile decision.UserProfile)

Save is used to save bucketing decisions for users

type NormalUserProfileService

type NormalUserProfileService struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NormalUserProfileService represents the default implementation of UserProfileService interface

func (*NormalUserProfileService) GetUserProfiles

func (s *NormalUserProfileService) GetUserProfiles() (savedProfiles []decision.UserProfile)

GetUserProfiles returns currently saved user profiles

func (*NormalUserProfileService) Lookup

Lookup is used to retrieve past bucketing decisions for users

func (*NormalUserProfileService) Save

func (s *NormalUserProfileService) Save(userProfile decision.UserProfile)

Save is used to save bucketing decisions for users

func (*NormalUserProfileService) SaveUserProfiles

func (s *NormalUserProfileService) SaveUserProfiles(userProfiles []decision.UserProfile)

SaveUserProfiles saves multiple user profiles

type SaveErrorUserProfileService

type SaveErrorUserProfileService struct {
	NormalUserProfileService
}

SaveErrorUserProfileService represents a user profile service with save error

func (*SaveErrorUserProfileService) Save

func (s *SaveErrorUserProfileService) Save(userProfile decision.UserProfile)

Save is used to save bucketing decisions for users

type UPSHelper

type UPSHelper interface {
	SaveUserProfiles(userProfiles []decision.UserProfile)
	GetUserProfiles() (savedProfiles []decision.UserProfile)
}

UPSHelper defines Helper methods for UPS

Jump to

Keyboard shortcuts

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