mappers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONST_MEDIA_TYPE            = "media_type"
	CONST_MEDIA_ACCESS_TYPE     = "media_access_type"
	CONST_MEDIA_INFO            = "media_info"
	CONST_DOCUMENT_NAME         = "document_name"
	CONST_MSG                   = "msg"
	CONST_DEFAULT_DOCUMENT_NAME = "file"
	CONST_MEDIA_URL             = "mediaUrl"
)

Variables

This section is empty.

Functions

func GetAttributes

func GetAttributes(request *fs.AddCampaignRequest, userJourneyMetadata string, engagementMetadata string, userMetadataList []*fs.UserMetadata) sql.NullString

func GetBitSetOfBloomFilter

func GetBitSetOfBloomFilter(bloomFilter *bloom.BloomFilter) sql.RawBytes

func GetControlGroupUserAttributes

func GetControlGroupUserAttributes(controlGroupPercentage int, bloomFilter *bloom.BloomFilter) string

func GetNullableBool

func GetNullableBool(boolean bool) sql.NullBool

func GetNullableDateTime

func GetNullableDateTime(timeStamp int64) sql.NullTime

func GetNullableDuration

func GetNullableDuration(nullableTimeStamp *duration.Duration) sql.NullInt64

func GetNullableFloat64

func GetNullableFloat64(nullableFloat float64) sql.NullFloat64

func GetNullableInt32

func GetNullableInt32(nullableInt int32) sql.NullInt32

func GetNullableInt32s

func GetNullableInt32s(nullableInts []int32) []sql.NullInt32

func GetNullableInt64

func GetNullableInt64(nullableInt int64) sql.NullInt64

func GetNullableInt64s

func GetNullableInt64s(nullableInts []int64) []sql.NullInt64

func GetNullableString

func GetNullableString(nullableString string) sql.NullString

func GetNullableStrings

func GetNullableStrings(nullableStrings []string) []sql.NullString

func GetNullableTimestamp

func GetNullableTimestamp(timeStamp int64) sql.NullString

func GetNullableTimestampFromProtoTime

func GetNullableTimestampFromProtoTime(nullableTimeStamp *timestamp.Timestamp) sql.NullTime

func GetTargetUserAttributes

func GetTargetUserAttributes(attribs []*common.Attribs) sql.NullString

func GetUnixTime

func GetUnixTime(timestamp string) int64

func MakeAddCampaignRequestVO

func MakeAddCampaignRequestVO(request *fs.AddCampaignRequest, userJourneyMetadata string, engagementMetadata string, userMetadataList []*fs.UserMetadata) *models.AddCampaignRequestVO

func MakeAddControlGroupRequestVO

func MakeAddControlGroupRequestVO(campaignId int, attributes string, bloomFilter []byte) *models.AddControlGroupRequestVO

func MakeAddDynamicDataRequestVO

func MakeAddDynamicDataRequestVO(request *fs.AddDynamicDataRequest) *models.AddDynamicDataRequestVO

func MakeAddQueryCampaignRequestVO

func MakeAddQueryCampaignRequestVO(request *fs.AddQueryCampaignRequest) *models.AddQueryCampaignRequestVO

func MakeAddTargetUserRequestVO

func MakeAddTargetUserRequestVO(request *fs.AddTargetUserRequest) *models.AddTargetUserRequestVO

func MakeCampaignTemplateRequestVO

func MakeCampaignTemplateRequestVO(campaignId int64) *models.DeleteCampaignTemplateRequestVO

func MakeUpdateCampaignRequestVO

func MakeUpdateCampaignRequestVO(request *fs.UpdateCampaignRequest) *models.UpdateCampaignRequestVO

func MapChannelAttributes

func MapChannelAttributes(channelAttributes string) *ce.CommunicationChannelAttributes

func MapContentMetaData

func MapContentMetaData(AttributeList string) []*common.Attribs

func MapControlGroupAttributes

func MapControlGroupAttributes(AttributeList string) map[string]string

func MapControlGroupPercentage

func MapControlGroupPercentage(channelAttributes string) int32

func MapMedia

func MapMedia(AttributeList string) *ce.Media

func MapMetaData

func MapMetaData(AttributeList string) (string, string, []*fs.UserMetadata)

func MapPlaceholders

func MapPlaceholders(attributes string) []*common.Attribs

Types

type Attributes

type Attributes struct {
	ContentMetaData        []ContentMetaData           `json:"content_metadata,omitempty"`
	MediaInfo              []ContentMetaData           `json:"media,omitempty"`
	ChannelAttributes      string                      `json:"channel_attributes,omitempty"`
	MetaData               UserJourneyCampaignMetadata `json:"meta_data,omitempty""`
	ControlGroupPercentage int32                       `json:"control_group_percentage,omitempty""`
	UserMetaDataList       []*fs.UserMetadata          `json:"user_metadata_list,omitempty"`
}

type ContentMetaData

type ContentMetaData struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type PlaceHolder

type PlaceHolder struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type TargetUserAttributes

type TargetUserAttributes struct {
	PlaceHolders []PlaceHolder `json:"placeHolders,omitempty"`
}

type UserJourneyCampaignMetadata

type UserJourneyCampaignMetadata struct {
	UserJourneyMetadata string `json:"user_journey_metadata,omitempty"`
	EngagementMetadata  string `json:"engagement_metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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