Documentation ¶
Index ¶
- Constants
- Variables
- type Board
- type Comment
- type Comments
- type Contact
- type Conversation
- type ConversationStatus
- type Conversations
- type Expense
- type File
- type Message
- func (i *Message) Collection() string
- func (i *Message) Delete(collection typesense.CollectionInterface, documentKey primitive.M) error
- func (i *Message) Document() map[string]interface{}
- func (i *Message) Index() []mongo.IndexModel
- func (i *Message) Insert(collection typesense.CollectionInterface) error
- func (i *Message) MarshalBSON() ([]byte, error)
- func (i *Message) Schema() interface{}
- func (i *Message) Update(collection typesense.CollectionInterface, documentKey primitive.M, ...) error
- type MessageStatus
- type Messages
- type Model
- type NewComment
- type NewConversation
- type NewMessage
- type NewReaction
- type NewRecipient
- type NewTemplate
- type Notifiable
- type Notification
- type Notifications
- type Object
- type Place
- type Post
- type Quote
- type Reaction
- type ReactionType
- type Reactions
- type Recipient
- type Recipients
- type Share
- type ShareInput
- type ShareStatus
- type ShareUpdateInput
- type Shares
- type Task
- type Template
- type Templates
- type UpdateComment
- type UpdateConversation
- type UpdateMessage
- type UpdateReaction
- type UpdateRecipient
- type UpdateTemplate
- type User
Constants ¶
View Source
const ( ClientCollection = "clients" InvitationCollection = "invitations" PermissionCollection = "permissions" RoleCollection = "roles" KeyCollection = "keys" UserCollection = "users" )
Variables ¶
View Source
var AllConversationStatus = []ConversationStatus{ ConversationStatusActive, ConversationStatusArchived, ConversationStatusDeleted, }
View Source
var AllMessageStatus = []MessageStatus{ MessageStatusDraft, MessageStatusSent, MessageStatusArchived, MessageStatusSpam, MessageStatusScheduled, MessageStatusDelivered, MessageStatusRead, MessageStatusFailed, }
View Source
var AllReactionType = []ReactionType{ ReactionTypeNone, ReactionTypeLike, ReactionTypeLove, ReactionTypeWow, ReactionTypeHaha, ReactionTypeSorry, ReactionTypeAngry, }
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Model `bson:",inline"` UID *primitive.ObjectID `bson:"uid" json:"uid"` Parent *primitive.ObjectID `json:"parent,omitempty" bson:"parent,omitempty"` Object Object `json:"object" bson:"object"` Locale string `json:"locale,omitempty" bson:"locale,omitempty"` Subject *string `json:"subject,omitempty" bson:"subject,omitempty"` Body primitive.M `json:"body,omitempty" bson:"body,omitempty"` Rating int `json:"rating,omitempty" bson:"rating,omitempty"` Recommends bool `json:"recommends,omitempty" bson:"recommends,omitempty"` Status string `json:"status" bson:"status"` Response *string `json:"response,omitempty" bson:"response,omitempty"` Responded *primitive.Timestamp `json:"responded,omitempty" bson:"responded,omitempty"` }
func (*Comment) Collection ¶
func (*Comment) Index ¶
func (i *Comment) Index() []mongo.IndexModel
func (*Comment) MarshalBSON ¶
type Conversation ¶
type Conversation struct { Model `bson:",inline"` Type string `json:"type" bson:"type"` Name *string `json:"name,omitempty" bson:"name,omitempty"` Description *string `json:"description,omitempty" bson:"description,omitempty"` Labels []*string `json:"labels,omitempty" bson:"labels,omitempty"` Message *primitive.ObjectID `json:"message" bson:"message"` Status string `json:"status" bson:"status"` }
func (*Conversation) Collection ¶
func (i *Conversation) Collection() string
func (*Conversation) Index ¶
func (i *Conversation) Index() []mongo.IndexModel
func (*Conversation) MarshalBSON ¶
func (i *Conversation) MarshalBSON() ([]byte, error)
type ConversationStatus ¶
type ConversationStatus string
const ( ConversationStatusActive ConversationStatus = "ACTIVE" ConversationStatusArchived ConversationStatus = "ARCHIVED" ConversationStatusDeleted ConversationStatus = "DELETED" )
func (ConversationStatus) IsValid ¶
func (e ConversationStatus) IsValid() bool
func (ConversationStatus) MarshalGQL ¶
func (e ConversationStatus) MarshalGQL(w io.Writer)
func (ConversationStatus) String ¶
func (e ConversationStatus) String() string
func (*ConversationStatus) UnmarshalGQL ¶
func (e *ConversationStatus) UnmarshalGQL(v interface{}) error
type Conversations ¶
type Conversations struct { Data []*Conversation `json:"data,omitempty"` Count int `json:"count"` }
type Message ¶
type Message struct { Model `bson:",inline"` Parent primitive.ObjectID `json:"parent,omitempty" bson:"parent,omitempty"` Conversation primitive.ObjectID `json:"conversation" bson:"conversation"` UID primitive.ObjectID `json:"uid" bson:"uid"` Locale string `json:"locale" bson:"locale"` Type string `json:"type" bson:"type"` Subject *string `json:"subject,omitempty" bson:"subject,omitempty"` Body *string `json:"body,omitempty" bson:"body,omitempty"` Status string `json:"status" bson:"status"` Schedule primitive.Timestamp `json:"schedule,omitempty" bson:"schedule,omitempty"` }
func (*Message) Collection ¶
func (*Message) Index ¶
func (i *Message) Index() []mongo.IndexModel
func (*Message) MarshalBSON ¶
type MessageStatus ¶
type MessageStatus string
const ( MessageStatusDraft MessageStatus = "DRAFT" MessageStatusSent MessageStatus = "SENT" MessageStatusArchived MessageStatus = "ARCHIVED" MessageStatusSpam MessageStatus = "SPAM" MessageStatusScheduled MessageStatus = "SCHEDULED" MessageStatusDelivered MessageStatus = "DELIVERED" MessageStatusRead MessageStatus = "READ" MessageStatusFailed MessageStatus = "FAILED" )
func (MessageStatus) IsValid ¶
func (e MessageStatus) IsValid() bool
func (MessageStatus) MarshalGQL ¶
func (e MessageStatus) MarshalGQL(w io.Writer)
func (MessageStatus) String ¶
func (e MessageStatus) String() string
func (*MessageStatus) UnmarshalGQL ¶
func (e *MessageStatus) 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 NewComment ¶
type NewComment struct { Parent *string `json:"parent,omitempty"` Object map[string]interface{} `json:"object"` Locale string `json:"locale"` UID *string `json:"uid,omitempty"` Body *string `json:"body,omitempty"` Rating *int `json:"rating,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` Attachments []*string `json:"attachments,omitempty"` }
type NewConversation ¶
type NewMessage ¶
type NewReaction ¶
type NewRecipient ¶
type NewTemplate ¶
type Notifiable ¶
type Notification ¶
type Notification struct { Model `bson:",inline"` UID primitive.ObjectID `json:"uid" bson:"uid"` Notifiable Notifiable `json:"notifiable" bson:"notifiable"` Locale string `json:"locale" bson:"locale"` Type string `json:"type" bson:"type"` Read primitive.Timestamp `json:"read,omitempty" bson:"read,omitempty"` }
func (*Notification) Collection ¶
func (i *Notification) Collection() string
func (*Notification) Index ¶
func (i *Notification) Index() []mongo.IndexModel
func (*Notification) MarshalBSON ¶
func (i *Notification) MarshalBSON() ([]byte, error)
type Notifications ¶
type Notifications struct { Data []*Notification `json:"data,omitempty"` Count int `json:"count"` }
type Reaction ¶
type Reaction struct { Model `bson:",inline"` UID primitive.ObjectID `bson:"uid" json:"uid"` Object Object `json:"object" bson:"object"` Action string `json:"action" bson:"action"` }
func (*Reaction) Collection ¶
func (*Reaction) Index ¶
func (i *Reaction) Index() []mongo.IndexModel
func (*Reaction) MarshalBSON ¶
type ReactionType ¶
type ReactionType string
const ( ReactionTypeNone ReactionType = "NONE" ReactionTypeLike ReactionType = "LIKE" ReactionTypeLove ReactionType = "LOVE" ReactionTypeWow ReactionType = "WOW" ReactionTypeHaha ReactionType = "HAHA" ReactionTypeSorry ReactionType = "SORRY" ReactionTypeAngry ReactionType = "ANGRY" )
func (ReactionType) IsValid ¶
func (e ReactionType) IsValid() bool
func (ReactionType) MarshalGQL ¶
func (e ReactionType) MarshalGQL(w io.Writer)
func (ReactionType) String ¶
func (e ReactionType) String() string
func (*ReactionType) UnmarshalGQL ¶
func (e *ReactionType) UnmarshalGQL(v interface{}) error
type Recipient ¶
type Recipient struct { Model `bson:",inline"` UID primitive.ObjectID `json:"uid" bson:"uid"` Message primitive.ObjectID `json:"message" bson:"message"` Read *primitive.Timestamp `json:"read,omitempty" bson:"read,omitempty"` }
func (*Recipient) Collection ¶
func (*Recipient) Index ¶
func (i *Recipient) Index() []mongo.IndexModel
func (*Recipient) MarshalBSON ¶
type Recipients ¶
type Share ¶
type Share struct {}
func (*Share) Collection ¶
func (*Share) Index ¶
func (i *Share) Index() []mongo.IndexModel
func (*Share) MarshalBSON ¶
type ShareInput ¶
type ShareInput struct {}
type ShareStatus ¶
type ShareStatus string
const ()
func (ShareStatus) IsValid ¶
func (e ShareStatus) IsValid() bool
func (ShareStatus) MarshalGQL ¶
func (e ShareStatus) MarshalGQL(w io.Writer)
func (ShareStatus) String ¶
func (e ShareStatus) String() string
func (*ShareStatus) UnmarshalGQL ¶
func (e *ShareStatus) UnmarshalGQL(v interface{}) error
type ShareUpdateInput ¶
type ShareUpdateInput struct {}
type Template ¶
type Template struct { Model `bson:",inline"` Name string `json:"name" bson:"name"` Locale string `json:"locale" bson:"locale"` Subject primitive.M `json:"subject" bson:"subject"` Body primitive.M `json:"body" bson:"body"` Status string `json:"status" bson:"status"` }
func (*Template) Collection ¶
func (*Template) Index ¶
func (i *Template) Index() []mongo.IndexModel
func (*Template) MarshalBSON ¶
type UpdateComment ¶
type UpdateComment struct { Parent *string `json:"parent,omitempty"` Locale string `json:"locale"` UID *string `json:"uid,omitempty"` Body *string `json:"body,omitempty"` Rating *int `json:"rating,omitempty"` Recommends *bool `json:"recommends,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` Attachments []*string `json:"attachments,omitempty"` }
type UpdateConversation ¶
type UpdateMessage ¶
type UpdateReaction ¶
type UpdateReaction struct {
Action string `json:"action"`
}
type UpdateRecipient ¶
type UpdateRecipient struct {
Read *string `json:"read,omitempty"`
}
type UpdateTemplate ¶
Click to show internal directories.
Click to hide internal directories.