Documentation ¶
Index ¶
- Constants
- func Bounds(c *fiber.Ctx) error
- func GetMessages(c *fiber.Ctx) error
- func GetMessagesForUser(c *fiber.Ctx) error
- func GetWords(search string) []string
- func Groups(c *fiber.Ctx) error
- func Search(c *fiber.Ctx) error
- type Matchedon
- type Message
- type MessageAttachment
- type MessageGroup
- type MessageOutcome
- type MessagePromise
- type MessageReply
- type MessageSummary
- type SearchResult
- func GetWordsExact(db *gorm.DB, words []string, limit int64, groupids []uint64, msgtype string, ...) []SearchResult
- func GetWordsSounds(db *gorm.DB, words []string, limit int64, groupids []uint64, msgtype string, ...) []SearchResult
- func GetWordsStarts(db *gorm.DB, words []string, limit int64, groupids []uint64, msgtype string, ...) []SearchResult
- func GetWordsTypo(db *gorm.DB, words []string, limit int64, groupids []uint64, msgtype string, ...) []SearchResult
- type Tabler
Constants ¶
View Source
const SEARCH_LIMIT = 100
Variables ¶
This section is empty.
Functions ¶
func GetMessages ¶
func GetMessages(c *fiber.Ctx) error
func GetMessagesForUser ¶
func GetMessagesForUser(c *fiber.Ctx) error
Types ¶
type Message ¶
type Message struct { ID uint64 `json:"id" gorm:"primary_key"` Arrival time.Time `json:"arrival"` Date time.Time `json:"date"` Fromuser uint64 `json:"fromuser"` Subject string `json:"subject"` Type string `json:"type"` Textbody string `json:"textbody"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` Unseen bool `json:"unseen"` Availablenow uint `json:"availablenow"` Availableinitially uint `json:"availableinitially"` MessageGroups []MessageGroup `gorm:"-" json:"groups"` MessageAttachments []MessageAttachment `gorm:"-" json:"attachments"` MessageOutcomes []MessageOutcome `gorm:"-" json:"outcomes"` MessagePromises []MessagePromise `gorm:"-" json:"promises"` Promisecount int `json:"promisecount"` Promised bool `json:"promised"` PromisedToYou bool `json:"promisedtoyou"` MessageReply []MessageReply `gorm:"ForeignKey:refmsgid" json:"replies"` Replycount int `json:"replycount"` MessageURL string `json:"url"` Successful bool `json:"successful"` Refchatids []uint64 `json:"refchatids" gorm:"-"` Locationid uint64 `json:"-"` Location *location.Location `json:"location" gorm:"-"` Item *item.Item `json:"item" gorm:"-"` Repostat *time.Time `json:"repostat"` Canrepost bool `json:"canrepost"` }
func GetMessagesByIds ¶
type MessageAttachment ¶
type MessageAttachment struct { ID uint64 `json:"id" gorm:"primary_key"` IdStr string `json:"id,omitempty"` Msgid uint64 `json:"-"` Path string `json:"path"` Paththumb string `json:"paththumb"` Archived int `json:"archived"` Externaluid2 string `json:"externaluid2"` Externalurl string `json:"externalurl"` }
func (MessageAttachment) TableName ¶
func (MessageAttachment) TableName() string
type MessageGroup ¶
type MessageGroup struct { Groupid uint64 `json:"groupid"` Msgid uint64 `json:"msgid"` Arrival time.Time `json:"arrival"` Collection string `json:"collection"` Autoreposts uint `json:"autoreposts"` // There's a slight privacy issue in returning the approval id. Potentially we might not want users to know that // their messages are moderated, and we might not want to reveal the id of the moderator. However it's a useful // thing to be able to show mods themselves. Approvedby uint64 `json:"approvedby"` }
func (MessageGroup) TableName ¶
func (MessageGroup) TableName() string
type MessageOutcome ¶
type MessageOutcome struct { ID uint64 `json:"id" gorm:"primary_key"` Msgid uint64 `json:"msgid"` Timestamp time.Time `json:"timestamp"` Outcome string `json:"outcome"` }
func (MessageOutcome) TableName ¶
func (MessageOutcome) TableName() string
type MessagePromise ¶
type MessagePromise struct { ID uint64 `json:"id" gorm:"primary_key"` Msgid uint64 `json:"msgid"` Userid uint64 `json:"userid"` Promisedat time.Time `json:"promisedat"` }
func (MessagePromise) TableName ¶
func (MessagePromise) TableName() string
type MessageReply ¶
type MessageReply struct { ID uint64 `json:"id" gorm:"primary_key"` Userid uint64 `json:"userid"` Displayname string `json:"displayname"` Refmsgid uint64 `json:"refmsgid"` Date time.Time `json:"date"` }
func (MessageReply) TableName ¶
func (MessageReply) TableName() string
type MessageSummary ¶
type MessageSummary struct { ID uint64 `json:"id" gorm:"primary_key"` Hasoutcome bool `json:"hasoutcome"` Successful bool `json:"successful"` Promised bool `json:"promised"` Groupid uint64 `json:"groupid"` Type string `json:"type"` Arrival time.Time `json:"arrival"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` Unseen bool `json:"unseen"` }
type SearchResult ¶
type SearchResult struct { ID uint64 `json:"-" gorm:"primary_key"` Msgid uint64 `json:"id"` Arrival time.Time `json:"arrival"` Groupid uint64 `json:"groupid"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` Tag string `json:"-"` Word string `json:"word"` Type string `json:"type"` Matchedon Matchedon `json:"matchedon" gorm:"-"` }
func GetWordsExact ¶
func GetWordsSounds ¶
func GetWordsStarts ¶
Click to show internal directories.
Click to hide internal directories.