model

package
v0.0.0-...-0406d23 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Activities

type Activities struct {
	Data  []*Activity `json:"data,omitempty"`
	Count int         `json:"count"`
}

type Activity

type Activity struct {
	Model     `bson:",inline"`
	UID       primitive.ObjectID `json:"uid" bson:"uid"`
	Object    Object             `json:"object" bson:"object"`
	Target    *Object            `json:"target,omitempty" bson:"target,omitempty"`
	Action    string             `json:"action" bson:"action"`
	ClientIP  *string            `json:"client_ip,omitempty" bson:"client_ip,omitempty"`
	UserAgent *string            `json:"user_agent,omitempty" bson:"user_agent,omitempty"`
}

func (*Activity) Collection

func (i *Activity) Collection() string

func (*Activity) Index

func (i *Activity) Index() []mongo.IndexModel

func (*Activity) MarshalBSON

func (i *Activity) MarshalBSON() ([]byte, error)

type Event

type Event struct {
	Model     `bson:",inline"`
	Campaign  *primitive.ObjectID `json:"campaign,omitempty" bson:"campaign,omitempty"`
	Sender    string              `json:"sender" bson:"sender"`
	Recipient string              `json:"recipient" bson:"recipient"`
	Subject   string              `json:"subject" bson:"subject"`
	Message   string              `json:"message" bson:"message"`
	Status    string              `json:"status" bson:"status"`
	ClientIP  *string             `json:"client_ip,omitempty" bson:"client_ip,omitempty"`
	UserAgent *string             `json:"user_agent,omitempty" bson:"user_agent,omitempty"`
	Exception *string             `json:"exception,omitempty" bson:"exception,omitempty"`
}

func (*Event) Collection

func (i *Event) Collection() string

func (*Event) Index

func (i *Event) Index() []mongo.IndexModel

func (*Event) MarshalBSON

func (i *Event) MarshalBSON() ([]byte, error)

type Log

type Log struct {
	Model     `bson:",inline"`
	UID       *primitive.ObjectID `json:"uid,omitempty" bson:"uid,omitempty"`
	URL       string              `json:"url" bson:"url"`
	Referrer  *string             `json:"referrer,omitempty" bson:"referrer,omitempty"`
	Title     *string             `json:"title,omitempty" bson:"title,omitempty"`
	Utm       primitive.M         `json:"utm,omitempty" bson:"utm,omitempty"`
	Status    string              `json:"status" bson:"status"`
	ClientIP  *string             `json:"clientIp,omitempty" bson:"client_ip,omitempty"`
	UserAgent *string             `json:"userAgent,omitempty" bson:"user_agent,omitempty"`
}

func (*Log) Collection

func (i *Log) Collection() string

func (*Log) Index

func (i *Log) Index() []mongo.IndexModel

func (*Log) MarshalBSON

func (i *Log) MarshalBSON() ([]byte, error)

type Logs

type Logs struct {
	Data  []*Log `json:"data,omitempty"`
	Count int    `json:"count"`
}

type MailStatus

type MailStatus string
const (
	MailStatusSent      MailStatus = "SENT"
	MailStatusFailed    MailStatus = "FAILED"
	MailStatusDelivered MailStatus = "DELIVERED"
	MailStatusOpened    MailStatus = "OPENED"
	MailStatusClicked   MailStatus = "CLICKED"
)

func (MailStatus) IsValid

func (e MailStatus) IsValid() bool

func (MailStatus) MarshalGQL

func (e MailStatus) MarshalGQL(w io.Writer)

func (MailStatus) String

func (e MailStatus) String() string

func (*MailStatus) UnmarshalGQL

func (e *MailStatus) UnmarshalGQL(v interface{}) error

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 NewLog

type NewLog struct {
	UID       *string                `json:"uid,omitempty"`
	URL       string                 `json:"url"`
	Referrer  *string                `json:"referrer,omitempty"`
	Title     *string                `json:"title,omitempty"`
	Utm       map[string]interface{} `json:"utm,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
	Status    string                 `json:"status"`
	ClientIP  *string                `json:"client_ip,omitempty"`
	UserAgent *string                `json:"user_agent,omitempty"`
}

type Object

type Object struct {
	ID   primitive.ObjectID `json:"id" bson:"_id"`
	Type string             `json:"type" bson:"type"`
}
type Search struct {
	Model     `bson:",inline"`
	UID       *primitive.ObjectID `json:"uid" bson:"uid"`
	Locale    string              `json:"locale" bson:"locale"`
	Keyword   string              `json:"keyword" bson:"keyword"`
	ClientIP  *string             `json:"client_ip,omitempty" bson:"client_ip,omitempty"`
	UserAgent *string             `json:"user_agent,omitempty" bson:"user_agent,omitempty"`
}

func (*Search) Collection

func (i *Search) Collection() string

func (*Search) Index

func (i *Search) Index() []mongo.IndexModel

func (*Search) MarshalBSON

func (i *Search) MarshalBSON() ([]byte, error)

type SearchInput

type SearchInput struct {
	Locale    string                 `json:"locale"`
	Keyword   string                 `json:"keyword"`
	UserAgent *string                `json:"user_agent,omitempty"`
	ClientIP  *string                `json:"client_ip,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

type Searches

type Searches struct {
	Count int       `json:"count"`
	Data  []*Search `json:"data,omitempty"`
}

type UpdateLog

type UpdateLog struct {
	URL       *string                `json:"url,omitempty"`
	Referrer  *string                `json:"referrer,omitempty"`
	Title     *string                `json:"title,omitempty"`
	Utm       map[string]interface{} `json:"utm,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
	Status    *string                `json:"status,omitempty"`
	ClientIP  *string                `json:"client_ip,omitempty"`
	UserAgent *string                `json:"user_agent,omitempty"`
}

type User

type User struct {
	ID string `json:"id" bson:"_id"`
}

func (User) IsEntity

func (User) IsEntity()

Jump to

Keyboard shortcuts

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