Documentation ¶
Index ¶
- Variables
- type Audience
- type Audiences
- type Campaign
- type CampaignStatus
- type CampaignType
- type Campaigns
- type Comment
- type Link
- type Links
- type Model
- type NewAudience
- type NewCampaign
- type NewLink
- type RuleInput
- type Schedule
- type Segment
- type SegmentCriteria
- type SegmentInput
- type SegmentOperator
- type Segments
- type Share
- type Term
- type UpdateAudience
- type UpdateCampaign
- type UpdateLink
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var AllCampaignStatus = []CampaignStatus{ CampaignStatusDraft, CampaignStatusScheduled, CampaignStatusInProgress, CampaignStatusCompleted, }
View Source
var AllCampaignType = []CampaignType{ CampaignTypeEmail, CampaignTypeSms, CampaignTypePushNotification, }
View Source
var AllSegmentOperator = []SegmentOperator{ SegmentOperatorEquals, SegmentOperatorNotEquals, SegmentOperatorContains, SegmentOperatorNotContains, SegmentOperatorGreaterThan, SegmentOperatorLessThan, }
Functions ¶
This section is empty.
Types ¶
type Audience ¶
type Audience struct { Model `bson:",inline"` Name string `json:"name" bson:"name"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Segments []*primitive.ObjectID `json:"segments,omitempty" bson:"segments,omitempty"` Metadata primitive.M `json:"metadata,omitempty" bson:"metadata,omitempty"` Status string `json:"status" bson:"status"` }
func (*Audience) Collection ¶
func (*Audience) Index ¶
func (i *Audience) Index() []mongo.IndexModel
func (*Audience) MarshalBSON ¶
type Campaign ¶
type Campaign struct { Model `bson:",inline"` Audience *primitive.ObjectID `json:"audience,omitempty" bson:"audience,omitempty"` Type string `json:"type" bson:"type"` Name string `json:"name" bson:"name"` Metadata primitive.M `json:"metadata,omitempty" bson:"metadata,omitempty"` Status string `json:"status" bson:"status"` }
func (*Campaign) Collection ¶
func (*Campaign) Index ¶
func (i *Campaign) Index() []mongo.IndexModel
func (*Campaign) MarshalBSON ¶
type CampaignStatus ¶
type CampaignStatus string
const ( CampaignStatusDraft CampaignStatus = "DRAFT" CampaignStatusScheduled CampaignStatus = "SCHEDULED" CampaignStatusInProgress CampaignStatus = "IN_PROGRESS" CampaignStatusCompleted CampaignStatus = "COMPLETED" )
func (CampaignStatus) IsValid ¶
func (e CampaignStatus) IsValid() bool
func (CampaignStatus) MarshalGQL ¶
func (e CampaignStatus) MarshalGQL(w io.Writer)
func (CampaignStatus) String ¶
func (e CampaignStatus) String() string
func (*CampaignStatus) UnmarshalGQL ¶
func (e *CampaignStatus) UnmarshalGQL(v interface{}) error
type CampaignType ¶
type CampaignType string
const ( CampaignTypeEmail CampaignType = "EMAIL" CampaignTypeSms CampaignType = "SMS" CampaignTypePushNotification CampaignType = "PUSH_NOTIFICATION" )
func (CampaignType) IsValid ¶
func (e CampaignType) IsValid() bool
func (CampaignType) MarshalGQL ¶
func (e CampaignType) MarshalGQL(w io.Writer)
func (CampaignType) String ¶
func (e CampaignType) String() string
func (*CampaignType) UnmarshalGQL ¶
func (e *CampaignType) UnmarshalGQL(v interface{}) error
type Link ¶
type Link struct { Model `bson:",inline"` Domain string `json:"domain" bson:"domain"` Code string `json:"code" bson:"code"` URL string `json:"url" bson:"url"` Title *string `json:"title,omitempty" bson:"title,omitempty"` Status *string `json:"status,omitempty" bson:"status,omitempty"` Engagements int64 `json:"engagements" bson:"engagements"` UID primitive.ObjectID `json:"uid" bson:"uid"` Tags []primitive.ObjectID `json:"tags" bson:"tags"` }
func (*Link) Collection ¶
func (*Link) Index ¶
func (i *Link) Index() []mongo.IndexModel
func (*Link) MarshalBSON ¶
type Model ¶
type Model struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Workspace primitive.ObjectID `json:"workspace,omitempty" bson:"workspace,omitempty"` Metadata primitive.M `json:"metadata,omitempty" bson:"metadata,omitempty"` Created primitive.Timestamp `json:"created,omitempty" bson:"created,omitempty"` Updated primitive.Timestamp `json:"updated,omitempty" bson:"updated,omitempty"` Deleted primitive.Timestamp `json:"deleted,omitempty" bson:"deleted,omitempty"` Timestamp primitive.Timestamp `json:"timestamp,omitempty" bson:"timestamp,omitempty"` }
type NewAudience ¶
type NewAudience struct { Name string `json:"name"` Description string `json:"description"` Segment *SegmentInput `json:"segment"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type NewCampaign ¶
type NewCampaign struct { Audience string `json:"audience"` Slug string `json:"slug"` Type CampaignType `json:"type"` Name string `json:"name"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type Schedule ¶
type Schedule struct { ID string `json:"id"` Campaign string `json:"campaign"` Start string `json:"start"` End string `json:"end"` Recurring bool `json:"recurring"` Frequency *string `json:"frequency,omitempty"` Interval *int `json:"interval,omitempty"` Days []*string `json:"days,omitempty"` Time string `json:"time"` Timezone string `json:"timezone"` Metadata map[string]interface{} `json:"metadata,omitempty"` Created string `json:"created"` Updated string `json:"updated"` }
type Segment ¶
type Segment struct { ID string `json:"id"` Name string `json:"name"` Description *string `json:"description,omitempty"` Criteria []*SegmentCriteria `json:"criteria"` Created string `json:"created"` Updated string `json:"updated"` CreatedBy *string `json:"createdBy,omitempty"` UpdatedBy *string `json:"updatedBy,omitempty"` }
type SegmentCriteria ¶
type SegmentCriteria struct { Field string `json:"field"` Operator SegmentOperator `json:"operator"` Value string `json:"value"` }
type SegmentInput ¶
type SegmentOperator ¶
type SegmentOperator string
const ( SegmentOperatorEquals SegmentOperator = "EQUALS" SegmentOperatorNotEquals SegmentOperator = "NOT_EQUALS" SegmentOperatorContains SegmentOperator = "CONTAINS" SegmentOperatorNotContains SegmentOperator = "NOT_CONTAINS" SegmentOperatorGreaterThan SegmentOperator = "GREATER_THAN" SegmentOperatorLessThan SegmentOperator = "LESS_THAN" )
func (SegmentOperator) IsValid ¶
func (e SegmentOperator) IsValid() bool
func (SegmentOperator) MarshalGQL ¶
func (e SegmentOperator) MarshalGQL(w io.Writer)
func (SegmentOperator) String ¶
func (e SegmentOperator) String() string
func (*SegmentOperator) UnmarshalGQL ¶
func (e *SegmentOperator) UnmarshalGQL(v interface{}) error
type UpdateAudience ¶
type UpdateAudience struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` Segment *SegmentInput `json:"segment,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateCampaign ¶
type UpdateCampaign struct { Audience *string `json:"audience,omitempty"` Slug *string `json:"slug,omitempty"` Type *CampaignType `json:"type,omitempty"` Name *string `json:"name,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateLink ¶
type UpdateLink struct { Domain *string `json:"domain,omitempty"` Code *string `json:"code,omitempty"` URL *string `json:"url,omitempty"` Title *string `json:"title,omitempty"` Destination *string `json:"destination,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` }
Click to show internal directories.
Click to hide internal directories.