telephant/accounts/events.go

98 lines
1.8 KiB
Go
Raw Normal View History

2019-05-09 16:33:26 +02:00
// Package accounts is telephant's account "plugin" system.
2017-08-29 07:09:17 +02:00
package accounts
import "time"
// Post represents a message.
type Post struct {
2019-05-01 17:15:56 +02:00
MessageID string
2017-08-29 07:09:17 +02:00
Body string
Sensitive bool
Warning string
2017-08-29 07:09:17 +02:00
Author string
AuthorURL string
2017-08-29 07:09:17 +02:00
AuthorName string
AuthorID string
2017-08-29 07:09:17 +02:00
Actor string
ActorName string
ActorID string
2019-05-01 17:15:56 +02:00
ReplyToID string
2017-08-29 07:09:17 +02:00
ReplyToAuthor string
Avatar string
URL string
CreatedAt time.Time
Liked bool
Shared bool
2017-08-29 07:09:17 +02:00
}
// Follow describes an incoming follow event.
type Follow struct {
Account string
Name string
Avatar string
ProfileURL string
ProfileID string
Following bool
FollowedBy bool
}
// Media describes a media item.
type Media struct {
ID string
Preview string
URL string
}
2017-08-29 07:09:17 +02:00
// MessageEvent describes an incoming message event.
type MessageEvent struct {
Account string
Name string
Reply bool
Forward bool
Mention bool
Like bool
Followed bool
2017-08-29 07:09:17 +02:00
Notification bool
Notify bool
2017-08-29 07:09:17 +02:00
Post Post
Follow Follow
Media []Media
2017-08-29 07:09:17 +02:00
}
// ProfileEvent describes a profile event.
type ProfileEvent struct {
Username string
Name string
Avatar string
ProfileURL string
ProfileID string
Posts int64
FollowCount int64
FollowerCount int64
Following bool
FollowedBy bool
2017-08-29 07:09:17 +02:00
}
// LoginEvent describes a login event.
type LoginEvent struct {
Username string
Name string
Avatar string
ProfileURL string
ProfileID string
Posts int64
FollowCount int64
FollowerCount int64
PostSizeLimit int64
}
2019-05-10 15:45:38 +02:00
2019-05-23 15:24:37 +02:00
type DeleteEvent struct {
ID string
}
2019-05-10 15:45:38 +02:00
// ErrorEvent describes an error that occurred.
type ErrorEvent struct {
Message string
Internal bool
}