Documentation
¶
Index ¶
- func CreateUserProfileService(config config.ProjectConfig, apiOptions models.APIOptions) decision.UserProfileService
- func ParseUserProfiles(rawProfiles []map[string]interface{}) (parsedProfiles []decision.UserProfile)
- type LookupErrorUserProfileService
- type NoOpUserProfileService
- type NormalUserProfileService
- func (s *NormalUserProfileService) GetUserProfiles() (savedProfiles []decision.UserProfile)
- func (s *NormalUserProfileService) Lookup(userID string) decision.UserProfile
- func (s *NormalUserProfileService) Save(userProfile decision.UserProfile)
- func (s *NormalUserProfileService) SaveUserProfiles(userProfiles []decision.UserProfile)
- type SaveErrorUserProfileService
- type UPSHelper
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 ¶
func (s *LookupErrorUserProfileService) Lookup(userID string) decision.UserProfile
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 ¶
func (s *NoOpUserProfileService) Lookup(userID string) decision.UserProfile
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 ¶
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 ¶
func (s *NormalUserProfileService) Lookup(userID string) decision.UserProfile
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