Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintOsRuntime ¶
func PrintOsRuntime()
Types ¶
type MessageEntity ¶
type MessageEntity struct { Topic string // 对该消息进行标识 Code string // 对一类消息进行标识,这样可以通过管理器,分类管理,实现每个消息要向那些平台进行发送信息.系统可配置. GroupCode string TitleName string GroupName string Body []byte Qos int8 IconImage []byte Delay time.Duration Expire time.Duration }
notify-send Usage: notify-send [OPTION...] <SUMMARY> [BODY] - create a notification
Help Options: -?, --help Show help options
Application Options: -u, --urgency=LEVEL Specifies the urgency level (low, normal, critical). -t, --expire-time=TIME Specifies the timeout in milliseconds at which to expire the notification. -a, --app-name=APP_NAME Specifies the app name for the icon -i, --icon=ICON[,ICON...] Specifies an icon filename or stock icon to display. -c, --category=TYPE[,TYPE...] Specifies the notification category. -h, --hint=TYPE:NAME:VALUE Specifies basic extra data to pass. Valid types are int, double, string and byte. -v, --version Version of the package. ----------start----------message 实体类信息----------start----------
func NewMessageEntity ¶
func NewMessageEntity(msgTitle string, msgBody []byte) *MessageEntity
func (*MessageEntity) String ¶
func (entity *MessageEntity) String() string
type MessageNotify ¶
type MessageNotify interface {
NotifyText(entity *MessageEntity) (resp interface{}, ok error)
}
func GetMessageNotifyProvide ¶
func GetMessageNotifyProvide() *MessageNotify
----------start----------消息服务提供者----------start----------
type MessageNotify_notifySend ¶
type MessageNotify_notifySend struct { }
----------start----------linux桌面上使用libnotify-bin库来实现桌面通知 ----------start---------- 通过命令实现的系统通知,可以在看看有没有别的方案,比如d-bus.
func (*MessageNotify_notifySend) NotifyText ¶
func (*MessageNotify_notifySend) NotifyText(entity *MessageEntity) (resp interface{}, ok error)