Documentation ¶
Index ¶
- Constants
- func GetRoomHash(room string) []byte
- func GetSeenPostShard32(seen time.Time) uint32
- func GetSeenPostShardSource(seen time.Time) uint
- func GetTopics() []db.Object
- func IsSeenPostSameShardWindow(a, b time.Time) bool
- func ListenAddrFolloweds(ctx context.Context, followAddrs [][25]byte) (chan *AddrFollowed, error)
- func ListenAddrFollows(ctx context.Context, addrs [][25]byte) (chan *AddrFollow, error)
- func ListenAddrNames(ctx context.Context, addrs [][25]byte) (chan *AddrName, error)
- func ListenAddrProfilePics(ctx context.Context, addrs [][25]byte) (chan *AddrProfilePic, error)
- func ListenAddrProfiles(ctx context.Context, addrs [][25]byte) (chan *AddrProfile, error)
- func ListenAddrRoomFollows(ctx context.Context, addrs [][25]byte) (chan *AddrRoomFollow, error)
- func ListenPostChildren(ctx context.Context, postTxHashes [][32]byte) (chan *PostChild, error)
- func ListenPostLikes(ctx context.Context, postTxHashes [][32]byte) (chan *PostLike, error)
- func ListenPosts(ctx context.Context) (chan *Post, error)
- func ListenRoomPosts(ctx context.Context, rooms []string) (chan *RoomPost, error)
- type AddrFollow
- type AddrFollowed
- type AddrLike
- type AddrName
- type AddrPost
- type AddrProfile
- type AddrProfilePic
- type AddrRoomFollow
- type LikeTip
- type Post
- type PostChild
- type PostLike
- type PostParent
- type PostRoom
- type RoomFollow
- type RoomPost
- type SeenPost
Constants ¶
View Source
const SeenPostShardSeconds = 60 * 60
SeenPostShardSeconds shards seen posts into 1 hour groups
Variables ¶
This section is empty.
Functions ¶
func GetRoomHash ¶
func GetSeenPostShard32 ¶
func GetSeenPostShardSource ¶
func ListenAddrFolloweds ¶
func ListenAddrFolloweds(ctx context.Context, followAddrs [][25]byte) (chan *AddrFollowed, error)
func ListenAddrFollows ¶
func ListenAddrFollows(ctx context.Context, addrs [][25]byte) (chan *AddrFollow, error)
func ListenAddrNames ¶
func ListenAddrProfilePics ¶
func ListenAddrProfilePics(ctx context.Context, addrs [][25]byte) (chan *AddrProfilePic, error)
func ListenAddrProfiles ¶
func ListenAddrProfiles(ctx context.Context, addrs [][25]byte) (chan *AddrProfile, error)
func ListenAddrRoomFollows ¶
func ListenAddrRoomFollows(ctx context.Context, addrs [][25]byte) (chan *AddrRoomFollow, error)
func ListenPostChildren ¶
func ListenPostLikes ¶
Types ¶
type AddrFollow ¶
type AddrFollow struct { Addr [25]byte Seen time.Time TxHash [32]byte Unfollow bool FollowAddr [25]byte }
func GetAddrFollows ¶
func GetAddrFollows(ctx context.Context, addrs [][25]byte) ([]*AddrFollow, error)
func GetAddrFollowsSingle ¶
func (*AddrFollow) Deserialize ¶
func (f *AddrFollow) Deserialize(data []byte)
func (*AddrFollow) GetShardSource ¶
func (f *AddrFollow) GetShardSource() uint
func (*AddrFollow) GetTopic ¶
func (f *AddrFollow) GetTopic() string
func (*AddrFollow) GetUid ¶
func (f *AddrFollow) GetUid() []byte
func (*AddrFollow) Serialize ¶
func (f *AddrFollow) Serialize() []byte
func (*AddrFollow) SetUid ¶
func (f *AddrFollow) SetUid(uid []byte)
type AddrFollowed ¶
type AddrFollowed struct { FollowAddr [25]byte Seen time.Time TxHash [32]byte Addr [25]byte Unfollow bool }
func GetAddrFolloweds ¶
func GetAddrFolloweds(ctx context.Context, followAddresses [][25]byte) ([]*AddrFollowed, error)
func GetAddrFollowedsSingle ¶
func (*AddrFollowed) Deserialize ¶
func (f *AddrFollowed) Deserialize(data []byte)
func (*AddrFollowed) GetShardSource ¶
func (f *AddrFollowed) GetShardSource() uint
func (*AddrFollowed) GetTopic ¶
func (f *AddrFollowed) GetTopic() string
func (*AddrFollowed) GetUid ¶
func (f *AddrFollowed) GetUid() []byte
func (*AddrFollowed) Serialize ¶
func (f *AddrFollowed) Serialize() []byte
func (*AddrFollowed) SetUid ¶
func (f *AddrFollowed) SetUid(uid []byte)
type AddrPost ¶
func GetAddrPosts ¶
func GetSingleAddrPosts ¶
func (*AddrPost) Deserialize ¶
func (*AddrPost) GetShardSource ¶
type AddrProfile ¶
func GetAddrProfile ¶
func GetAddrProfile(ctx context.Context, addr [25]byte) (*AddrProfile, error)
func (*AddrProfile) Deserialize ¶
func (p *AddrProfile) Deserialize(data []byte)
func (*AddrProfile) GetShardSource ¶
func (p *AddrProfile) GetShardSource() uint
func (*AddrProfile) GetTopic ¶
func (p *AddrProfile) GetTopic() string
func (*AddrProfile) GetUid ¶
func (p *AddrProfile) GetUid() []byte
func (*AddrProfile) Serialize ¶
func (p *AddrProfile) Serialize() []byte
func (*AddrProfile) SetUid ¶
func (p *AddrProfile) SetUid(uid []byte)
type AddrProfilePic ¶
func GetAddrProfilePic ¶
func GetAddrProfilePic(ctx context.Context, addr [25]byte) (*AddrProfilePic, error)
func (*AddrProfilePic) Deserialize ¶
func (p *AddrProfilePic) Deserialize(data []byte)
func (*AddrProfilePic) GetShardSource ¶
func (p *AddrProfilePic) GetShardSource() uint
func (*AddrProfilePic) GetTopic ¶
func (p *AddrProfilePic) GetTopic() string
func (*AddrProfilePic) GetUid ¶
func (p *AddrProfilePic) GetUid() []byte
func (*AddrProfilePic) Serialize ¶
func (p *AddrProfilePic) Serialize() []byte
func (*AddrProfilePic) SetUid ¶
func (p *AddrProfilePic) SetUid(uid []byte)
type AddrRoomFollow ¶
type AddrRoomFollow struct { Addr [25]byte Seen time.Time TxHash [32]byte Unfollow bool Room string }
func GetAddrRoomFollows ¶
func GetAddrRoomFollows(ctx context.Context, addrs [][25]byte) ([]*AddrRoomFollow, error)
func (*AddrRoomFollow) Deserialize ¶
func (f *AddrRoomFollow) Deserialize(data []byte)
func (*AddrRoomFollow) GetShardSource ¶
func (f *AddrRoomFollow) GetShardSource() uint
func (*AddrRoomFollow) GetTopic ¶
func (f *AddrRoomFollow) GetTopic() string
func (*AddrRoomFollow) GetUid ¶
func (f *AddrRoomFollow) GetUid() []byte
func (*AddrRoomFollow) Serialize ¶
func (f *AddrRoomFollow) Serialize() []byte
func (*AddrRoomFollow) SetUid ¶
func (f *AddrRoomFollow) SetUid(uid []byte)
type PostChild ¶
func GetPostChildren ¶
func (*PostChild) Deserialize ¶
func (*PostChild) GetShardSource ¶
type PostLike ¶
func GetPostLikes ¶
func (*PostLike) Deserialize ¶
func (*PostLike) GetShardSource ¶
type PostParent ¶
func GetPostParent ¶
func GetPostParent(ctx context.Context, postTxHash [32]byte) (*PostParent, error)
func (*PostParent) Deserialize ¶
func (p *PostParent) Deserialize(data []byte)
func (*PostParent) GetShardSource ¶
func (p *PostParent) GetShardSource() uint
func (*PostParent) GetTopic ¶
func (p *PostParent) GetTopic() string
func (*PostParent) GetUid ¶
func (p *PostParent) GetUid() []byte
func (*PostParent) Serialize ¶
func (p *PostParent) Serialize() []byte
func (*PostParent) SetUid ¶
func (p *PostParent) SetUid(uid []byte)
type RoomFollow ¶
type RoomFollow struct { RoomHash []byte Seen time.Time TxHash [32]byte Unfollow bool Addr [25]byte }
func GetRoomFollows ¶
func GetRoomFollows(ctx context.Context, room string) ([]*RoomFollow, error)
func (*RoomFollow) Deserialize ¶
func (f *RoomFollow) Deserialize(data []byte)
func (*RoomFollow) GetShardSource ¶
func (f *RoomFollow) GetShardSource() uint
func (*RoomFollow) GetTopic ¶
func (f *RoomFollow) GetTopic() string
func (*RoomFollow) GetUid ¶
func (f *RoomFollow) GetUid() []byte
func (*RoomFollow) Serialize ¶
func (f *RoomFollow) Serialize() []byte
func (*RoomFollow) SetUid ¶
func (f *RoomFollow) SetUid(uid []byte)
type SeenPost ¶
func GetSeenPosts ¶
func (*SeenPost) Deserialize ¶
func (*SeenPost) GetShardSource ¶
Click to show internal directories.
Click to hide internal directories.