Documentation ¶
Index ¶
- func ClearMessageEvents(jid string) error
- func ClearRepeatedCommands(jid string, user string) (int64, error)
- func ComparePermission(perm string, command string) bool
- func DeleteAlias(name string) error
- func UpdateNextDate(id uint, nextDate time.Time) error
- func UpdateUserPermission(userId string, permission string) error
- func UpsertAlias(name string, content string) error
- type Alias
- type MessageEvent
- type RepeatedCommand
- type UserPermission
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearMessageEvents ¶
func ComparePermission ¶
func DeleteAlias ¶
func UpdateUserPermission ¶
func UpsertAlias ¶
Types ¶
type Alias ¶
type MessageEvent ¶
type MessageEvent struct { gorm.Model JID string `gorm:"not null;column:jid;uniqueIndex:jid_content_idx"` Content string `gorm:"not null;uniqueIndex:jid_content_idx"` }
func CreateMessageEvent ¶
func CreateMessageEvent(jid string, content string) (*MessageEvent, error)
func GetMessageEvents ¶
func GetMessageEvents(jid string) []MessageEvent
type RepeatedCommand ¶
type RepeatedCommand struct { gorm.Model JID string `gorm:"not null;column:jid"` User string `gorm:"not null"` Content string `gorm:"not null"` Repeat string `gorm:"not null"` NextDate time.Time `gorm:"not null"` }
func CreateRepeatedCommand ¶
func GetRepeatedCommands ¶
func GetRepeatedCommands(jid string, user string) []RepeatedCommand
func GetRepeatedCommandsToday ¶
func GetRepeatedCommandsToday() []RepeatedCommand
type UserPermission ¶
type UserPermission struct { gorm.Model UserID string `gorm:"not null;unique;column:user_id"` Permission string `gorm:"not null;column:permission"` }
func GetUserPermission ¶
func GetUserPermission(userId string) (*UserPermission, error)
Click to show internal directories.
Click to hide internal directories.