Documentation ¶
Index ¶
- func Archive(id int)
- func AutoMigrate()
- func DeleteMessage(messageID int) bool
- func GetBinary() string
- func GetBuildDate() string
- func GetDB() *gorm.DB
- func GetVersion() string
- func SetBinaryInfo(b string)
- func SetBuildDateInfo(b string)
- func SetVersionInfo(v string)
- func Update(id int, message parsers.Message)
- type AttributeSet
- type MessageModel
- type MessagesQuery
- type TagModel
- type TagSet
- type URLModel
- type UserModel
- type UserSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶
func AutoMigrate()
func DeleteMessage ¶
func GetBuildDate ¶
func GetBuildDate() string
func GetVersion ¶
func GetVersion() string
func SetBinaryInfo ¶
func SetBinaryInfo(b string)
func SetBuildDateInfo ¶
func SetBuildDateInfo(b string)
func SetVersionInfo ¶
func SetVersionInfo(v string)
Types ¶
type AttributeSet ¶
type AttributeSet struct { gorm.Model MessageRef uint Slug string `grom:"index:slug"` ScreenName string Type string `grom:"index:type"` DateValue time.Time IntValue int64 FloatValue float64 StringValue string `grom:"index:string_value"` BoolValue bool }
func (*AttributeSet) String ¶
func (a *AttributeSet) String() string
type MessageModel ¶
type MessageModel struct { gorm.Model Original string HTML string Created time.Time Archived bool Tags []TagModel `gorm:"ForeignKey:MessageRef"` RelatedUsers []UserModel `gorm:"ForeignKey:MessageRef"` Attributes []AttributeSet `gorm:"ForeignKey:MessageRef"` URLs []URLModel `gorm:"ForeignKey:MessageRef"` }
func LoadMessage ¶
func LoadMessage(messageID int) (MessageModel, bool)
func LoadMessages ¶
func Persist ¶
func Persist(message parsers.Message) *MessageModel
func (*MessageModel) HasTagsOrRelatedUsers ¶
func (m *MessageModel) HasTagsOrRelatedUsers() bool
type MessagesQuery ¶
type MessagesQuery struct { Limit int Offest int Tags []string Users []string Attrs []string Archived bool }
func NewMessagesQuery ¶
func NewMessagesQuery() MessagesQuery
Click to show internal directories.
Click to hide internal directories.