Documentation ¶
Index ¶
- Variables
- type Actions
- type Counts
- type Device
- type EnabledType
- type GlobalRule
- type Notification
- type Notify
- type PushAck
- type PushActions
- type PushCondition
- type PushContent
- type PushContentUsers
- type PushDataMembers
- type PushPubContent
- type PushPubContents
- type PushRule
- type PushRuleCacheData
- type PushRuleCacheDataArray
- type PushRuleData
- type PushRuleWithConditions
- type PushRulesData
- type Pusher
- type PusherCacheData
- type PusherData
- type PusherRes
- type PusherUsers
- type Pushers
- type PushersRes
- type ReceiptContent
- type ReceiptTs
- type ReceiptUser
- type RoomReceipt
- type RuleSet
- type Rules
- type Tweak
- type TweakAction
- type Tweaks
Constants ¶
This section is empty.
Variables ¶
View Source
var PriorityMap = func() map[string]int { m := map[string]int{ "underride": 1, "sender": 2, "room": 3, "content": 4, "override": 5, } return m }
View Source
var PushTopicDef = "pushdata-topic"
View Source
var RevPriorityMap = func() map[int]string { m := map[int]string{ 1: "underride", 2: "sender", 3: "room", 4: "content", 5: "override", } return m }
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { DeviceID string `json:"device_id,omitempty"` UserName string `json:"user_name,omitempty"` AppId string `json:"app_id,omitempty"` PushKey string `json:"pushkey,omitempty"` PushKeyTs int64 `json:"pushkey_ts,omitempty"` Data interface{} `json:"data"` Tweak Tweaks `json:"tweaks,omitempty"` }
type EnabledType ¶
type EnabledType struct {
Enabled bool `json:"enabled"`
}
func (*EnabledType) Decode ¶
func (p *EnabledType) Decode(input []byte) error
func (*EnabledType) Encode ¶
func (p *EnabledType) Encode() ([]byte, error)
type GlobalRule ¶
type GlobalRule struct { Device map[string]interface{} `json:"device"` Global RuleSet `json:"global"` }
func (*GlobalRule) Decode ¶
func (p *GlobalRule) Decode(input []byte) error
func (*GlobalRule) Encode ¶
func (p *GlobalRule) Encode() ([]byte, error)
type Notification ¶
type Notification struct { EventId string `json:"event_id,omitempty"` RoomId string `json:"room_id,omitempty"` Type string `json:"type,omitempty"` Sender string `json:"sender,omitempty"` SenderDisplayName string `json:"sender_display_name,omitempty"` RoomName string `json:"room_name,omitempty"` RoomAlias string `json:"room_alias,omitempty"` UserIsTarget bool `json:"user_is_target,omitempty"` Priority string `json:"prio,omitempty"` Content interface{} `json:"content,omitempty"` Counts Counts `json:"counts,omitempty"` Devices []Device `json:"devices,omitempty"` CreateEvent interface{} `json:"create_event,omitempty"` }
type Notify ¶
type Notify struct {
Notify Notification `json:"notification,omitempty"`
}
type PushActions ¶
type PushActions struct {
Actions []interface{} `json:"actions,omitempty"`
}
func (*PushActions) Decode ¶
func (p *PushActions) Decode(input []byte) error
func (*PushActions) Encode ¶
func (p *PushActions) Encode() ([]byte, error)
type PushCondition ¶
type PushContent ¶
type PushContent struct {
Content interface{} `json:"content"`
}
type PushContentUsers ¶
type PushContentUsers struct {
Data PushDataMembers `json:"data,omitempty"`
}
type PushDataMembers ¶
type PushDataMembers struct {
Members []string `json:"members,omitempty"`
}
type PushPubContent ¶
type PushPubContent struct { Pushers *Pushers `json:"pushers,omitempty"` UserID string `json:"userID,omitempty"` Action *TweakAction `json:"action,omitempty"` NotifyCount int64 `json:"notify_count"` }
type PushPubContents ¶
type PushPubContents struct { Input *gomatrixserverlib.ClientEvent `json:"input,omitempty"` SenderDisplayName string `json:"senderDisplayName,omitempty"` RoomName string `json:"roomName,omitempty"` RoomAlias string `json:"roomAlias,omitempty"` Contents []*PushPubContent `json:"contents,omitempty"` CreateContent *interface{} `json:"create_content"` }
type PushRule ¶
type PushRule struct { Actions []interface{} `json:"actions,omitempty"` Default bool `json:"default"` Enabled bool `json:"enabled"` RuleId string `json:"rule_id,omitempty"` Conditions []PushCondition `json:"conditions,omitempty"` Pattern string `json:"pattern,omitempty"` }
type PushRuleCacheData ¶
type PushRuleCacheDataArray ¶
type PushRuleCacheDataArray []PushRuleCacheData
func (PushRuleCacheDataArray) Len ¶
func (list PushRuleCacheDataArray) Len() int
func (PushRuleCacheDataArray) Less ¶
func (list PushRuleCacheDataArray) Less(i, j int) bool
func (PushRuleCacheDataArray) Swap ¶
func (list PushRuleCacheDataArray) Swap(i, j int)
type PushRuleData ¶
type PushRuleWithConditions ¶
type PushRuleWithConditions struct { Actions []interface{} `json:"actions,omitempty"` Default bool `json:"default"` Enabled bool `json:"enabled"` RuleId string `json:"rule_id,omitempty"` Conditions []PushCondition `json:"conditions"` Pattern string `json:"pattern,omitempty"` }
func (*PushRuleWithConditions) Decode ¶
func (p *PushRuleWithConditions) Decode(input []byte) error
func (*PushRuleWithConditions) Encode ¶
func (p *PushRuleWithConditions) Encode() ([]byte, error)
type PushRulesData ¶
type PushRulesData struct {
PushRules []PushRuleData
}
type Pusher ¶
type Pusher struct { UserName string `json:"user_name,omitempty"` DeviceID string `json:"device_id,omitempty"` PushKey string `json:"pushkey,omitempty"` PushKeyTs int64 `json:"pushkey_ts,omitempty"` Kind string `json:"kind,omitempty"` AppId string `json:"app_id,omitempty"` AppDisplayName string `json:"app_display_name,omitempty"` DeviceDisplayName string `json:"device_display_name,omitempty"` ProfileTag string `json:"profile_tag,omitempty"` Lang string `json:"lang,omitempty"` Append bool `json:"append,omitempty"` Data interface{} `json:"data,omitempty"` }
type PusherCacheData ¶
type PusherData ¶
type PusherData interface{}
type PusherUsers ¶
type PusherUsers struct {
Users []string `json:"users,omitempty"`
}
type PushersRes ¶
type PushersRes struct {
PushersRes []PusherRes `json:"pushers"`
}
func (*PushersRes) Decode ¶
func (p *PushersRes) Decode(input []byte) error
func (*PushersRes) Encode ¶
func (p *PushersRes) Encode() ([]byte, error)
type ReceiptContent ¶
type ReceiptContent struct {
Map map[string]ReceiptUser
}
type ReceiptUser ¶
type RoomReceipt ¶
type RuleSet ¶
type RuleSet struct { Content []interface{} `json:"content"` Override []interface{} `json:"override"` Room []interface{} `json:"room"` Sender []interface{} `json:"sender"` UnderRide []interface{} `json:"underride"` }
type Tweak ¶
type Tweak struct { SetTweak string `json:"set_tweak,omitempty"` Value interface{} `json:"value,omitempty"` }
type TweakAction ¶
Click to show internal directories.
Click to hide internal directories.