Documentation ¶
Index ¶
- Variables
- func ChangeNameForParent(parentID, selfID uint64, newName string) error
- func DeleteFromParent(parentID, selfID uint64) error
- func ExtractWebAssets(extractPath string) error
- func RestoreFromUserRecord(itemType ItemType, itemBytes []byte, newParentID uint64) (uint64, error)
- func UpdateGypsum(newVersion, mirror string, forcedUpdate bool, logger func(...interface{})) error
- type ArchiveItem
- type ConfigType
- type Group
- type GroupArchive
- type Item
- type ItemType
- type MessageType
- type Resource
- type Rule
- type RuleType
- type ScheduledJob
- func (j *ScheduledJob) Executor() (func(), *uint64, error)
- func (j *ScheduledJob) GetDisplayName() string
- func (j *ScheduledJob) GetParentID() uint64
- func (j *ScheduledJob) NewParent(selfID, parentID uint64) error
- func (j *ScheduledJob) Register(id uint64) error
- func (j *ScheduledJob) SaveToDB(idx uint64) error
- func (j *ScheduledJob) ToBytes() ([]byte, error)
- type Trigger
- type TriggerCategory
- type UserRecord
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BuildVersion = "0.0.0-unknown" BuildCommit = "unknown" )
Functions ¶
func ChangeNameForParent ¶ added in v0.6.0
func DeleteFromParent ¶ added in v0.6.0
func ExtractWebAssets ¶ added in v1.0.0
func RestoreFromUserRecord ¶ added in v0.5.0
func UpdateGypsum ¶ added in v1.0.0
Types ¶
type ArchiveItem ¶ added in v0.5.0
type ConfigType ¶ added in v0.6.0
type ConfigType struct { Listen string Password string PasswordSalt string ExternalAssets string HttpBackRef string }
var Config *ConfigType
func (*ConfigType) CheckValid ¶ added in v1.0.0
func (c *ConfigType) CheckValid() (changed bool, err error)
type Group ¶ added in v0.5.0
type Group struct { DisplayName string `json:"display_name"` PluginName string `json:"plugin_name"` PluginVersion int64 `json:"plugin_version"` Items []Item `json:"items"` ParentGroup uint64 `json:"-"` }
func GroupFromArchiveReader ¶ added in v0.5.0
func GroupFromBytes ¶ added in v0.5.0
func (Group) ExportToArchive ¶ added in v0.5.0
func (g Group) ExportToArchive(name string, version int64) *GroupArchive
func (*Group) GetDisplayName ¶ added in v0.6.0
func (*Group) GetParentID ¶ added in v0.5.0
type GroupArchive ¶ added in v0.5.0
type GroupArchive struct { DisplayName string PluginName string PluginVersion int64 GypsumVersion string GypsumCommit string ArchiveItems []ArchiveItem }
func (*GroupArchive) ToBytes ¶ added in v0.5.0
func (g *GroupArchive) ToBytes() ([]byte, error)
type MessageType ¶ added in v0.3.0
type MessageType uint32
const ( FriendMessage MessageType = 1 << iota GroupTmpMessage OtherTmpMessage OfficialMessage GroupNormalMessage GroupAnonymousMessage GroupNoticeMessage DiscussMessage NoMessage MessageType = 0 AllMessage MessageType = 0xffffffff PrivateMessage = FriendMessage | GroupTmpMessage | OtherTmpMessage GroupMessage = GroupNormalMessage | GroupAnonymousMessage | GroupNoticeMessage )
type Resource ¶ added in v0.5.0
type Resource struct { FileName string `json:"file_name"` Ext string `json:"ext"` Sha256Sum string `json:"sha256_sum"` ParentGroup uint64 `json:"-"` }
func ResourceFromBytes ¶ added in v0.5.0
func (*Resource) GetDisplayName ¶ added in v0.6.0
func (*Resource) GetParentID ¶ added in v0.5.0
type Rule ¶
type Rule struct { DisplayName string `json:"display_name"` Active bool `json:"active"` MessageType MessageType `json:"message_type"` GroupsID []int64 `json:"groups_id"` UsersID []int64 `json:"users_id"` MatcherType RuleType `json:"matcher_type"` Patterns []string `json:"patterns"` OnlyAtMe bool `json:"only_at_me"` Response string `json:"response"` Priority int `json:"priority"` Block bool `json:"block"` ParentGroup uint64 `json:"-"` }
func RuleFromBytes ¶
func (*Rule) GetDisplayName ¶ added in v0.6.0
func (*Rule) GetParentID ¶ added in v0.5.0
type ScheduledJob ¶ added in v1.0.2
type ScheduledJob struct { DisplayName string `json:"display_name"` Active bool `json:"active"` GroupsID []int64 `json:"groups_id"` UsersID []int64 `json:"users_id"` Once bool `json:"once"` CronSpec string `json:"cron_spec"` Action string `json:"action"` ParentGroup uint64 `json:"-"` }
func JobFromBytes ¶ added in v0.3.0
func JobFromBytes(b []byte) (*ScheduledJob, error)
func (*ScheduledJob) Executor ¶ added in v1.0.2
func (j *ScheduledJob) Executor() (func(), *uint64, error)
func (*ScheduledJob) GetDisplayName ¶ added in v1.0.2
func (j *ScheduledJob) GetDisplayName() string
func (*ScheduledJob) GetParentID ¶ added in v1.0.2
func (j *ScheduledJob) GetParentID() uint64
func (*ScheduledJob) NewParent ¶ added in v1.0.2
func (j *ScheduledJob) NewParent(selfID, parentID uint64) error
func (*ScheduledJob) Register ¶ added in v1.0.2
func (j *ScheduledJob) Register(id uint64) error
func (*ScheduledJob) SaveToDB ¶ added in v1.0.2
func (j *ScheduledJob) SaveToDB(idx uint64) error
func (*ScheduledJob) ToBytes ¶ added in v1.0.2
func (j *ScheduledJob) ToBytes() ([]byte, error)
type Trigger ¶ added in v0.2.0
type Trigger struct { DisplayName string `json:"display_name"` Active bool `json:"active"` GroupsID []int64 `json:"groups_id"` UsersID []int64 `json:"users_id"` TriggerType []string `json:"trigger_type"` Response string `json:"response"` Priority int `json:"priority"` Block bool `json:"block"` ParentGroup uint64 `json:"-"` }
func TriggerFromByte ¶ added in v0.2.0
func (*Trigger) GetDisplayName ¶ added in v0.6.0
func (*Trigger) GetParentID ¶ added in v0.5.0
type TriggerCategory ¶ added in v0.2.0
type TriggerCategory int
Source Files ¶
Click to show internal directories.
Click to hide internal directories.