Documentation ¶
Index ¶
- Constants
- Variables
- func AttachLikesToPosts(posts []*Post) error
- func AttachNamesToPosts(posts []*Post) error
- func AttachParentToPosts(posts []*Post) error
- func AttachPollsToPosts(posts []*Post) error
- func AttachProfilePicsToPosts(posts []*Post) error
- func AttachRepliesToPost(post *Post, offset uint) error
- func AttachReplyCountToPosts(posts []*Post) error
- func AttachReputationToFollowers(followers []*Follower) error
- func AttachReputationToPosts(posts []*Post) error
- func AttachReputationToProfiles(profiles []*Profile) error
- func CanFollow(pkHash []byte, selfPkHash []byte) (bool, error)
- func SetShowMediaForPosts(posts []*Post, userId uint) error
- func StringIsTimeRange(str string) bool
- type Follower
- type Like
- type Option
- type Poll
- type Post
- func CreatePostsFromDbPosts(selfPkHash []byte, dbPosts []*db.MemoPost) ([]*Post, error)
- func GetOlderPostsForTopic(tag string, selfPkHash []byte, firstPostId uint) ([]*Post, error)
- func GetPollsPosts(selfPkHash []byte, offset uint) ([]*Post, error)
- func GetPostByTxHash(txHash []byte, selfPkHash []byte) (*Post, error)
- func GetPostByTxHashWithReplies(txHash []byte, selfPkHash []byte, offset uint) (*Post, error)
- func GetPostsByTxHashes(txHashes [][]byte, selfPkHash []byte) ([]*Post, error)
- func GetPostsFeed(selfPkHash []byte, offset uint) ([]*Post, error)
- func GetPostsForHash(pkHash []byte, selfPkHash []byte, offset uint) ([]*Post, error)
- func GetPostsForTopic(tag string, selfPkHash []byte, offset uint) ([]*Post, error)
- func GetRankedPosts(selfPkHash []byte, offset uint, searchString string) ([]*Post, error)
- func GetRecentPosts(selfPkHash []byte, offset uint, searchString string) ([]*Post, error)
- func GetTopPosts(selfPkHash []byte, offset uint, timeStart time.Time, timeEnd time.Time, ...) ([]*Post, error)
- func GetTopPostsNamedRange(selfPkHash []byte, offset uint, timeRange string, personalized bool) ([]*Post, error)
- type Profile
- func GetBasicProfile(pkHash []byte, selfPkHash []byte) (*Profile, error)
- func GetProfile(pkHash []byte, selfPkHash []byte) (*Profile, error)
- func GetProfileAndSetBalances(pkHash []byte, selfPkHash []byte) (*Profile, error)
- func GetProfiles(selfPkHash []byte, searchString string, offset int, ...) ([]*Profile, error)
- func (p Profile) GetAddressString() string
- func (p Profile) GetCashAddressOnlyString() string
- func (p Profile) GetCashAddressString() string
- func (p Profile) GetFirstPost(timezone string) string
- func (p Profile) GetJoined() string
- func (p Profile) GetLastPost(timezone string) string
- func (p Profile) GetNameTx() string
- func (p Profile) GetText() string
- func (p Profile) HasBalance() bool
- func (p Profile) IsSelf() bool
- func (p Profile) NameSet() bool
- func (p *Profile) SetBalances() error
- func (p *Profile) SetCanFollow() error
- func (p *Profile) SetFollowerCount() error
- func (p *Profile) SetFollowingCount() error
- func (p *Profile) SetQr() error
- func (p *Profile) SetReputation() error
- func (p *Profile) SetTopicsFollowingCount() error
- func (p *Profile) SetUserStats() error
- type Vote
Constants ¶
View Source
const ( TimeRange1Hour = "1h" TimeRange24Hours = "24h" TimeRange7Days = "7d" TimeRangeAll = "all" )
Variables ¶
View Source
var AllTimeRanges = []string{ TimeRange1Hour, TimeRange24Hours, TimeRange7Days, TimeRangeAll, }
Functions ¶
func AttachLikesToPosts ¶
func AttachNamesToPosts ¶
func AttachParentToPosts ¶
func AttachPollsToPosts ¶
func AttachRepliesToPost ¶
func AttachReplyCountToPosts ¶
func AttachReputationToPosts ¶
func SetShowMediaForPosts ¶
func StringIsTimeRange ¶
Types ¶
type Follower ¶
type Follower struct { Name string PkHash []byte SelfPkHash []byte Reputation *rep.Reputation }
func GetFollowers ¶
func GetFollowing ¶
func (*Follower) GetAddressString ¶
type Like ¶
type Like struct { Id uint Amount int64 Name string PkHash []byte Timestamp time.Time TxnHash []byte PostTxHash []byte }
func GetLikesForPkHash ¶
func (*Like) GetAddressString ¶
func (*Like) GetPostTransactionHashString ¶
func (*Like) GetTimeString ¶
func (*Like) GetTransactionHashString ¶
type Poll ¶
type Poll struct { Question *db.MemoPollQuestion Votes []*db.MemoPollVote SelfPkHash []byte }
func (*Poll) GetOptions ¶
type Post ¶
type Post struct { Name string Memo *db.MemoPost Parent *Post Likes []*Like HasLiked bool SelfPkHash []byte ReplyCount uint Replies []*Post Reputation *rep.Reputation ShowMedia bool Poll *Poll VoteQuestion *db.MemoPost VoteOption *db.MemoPollOption ProfilePic *db.MemoSetPic }
func CreatePostsFromDbPosts ¶
func GetOlderPostsForTopic ¶
func GetPostsByTxHashes ¶
func GetPostsForHash ¶
func GetPostsForTopic ¶
func GetRankedPosts ¶
func GetRecentPosts ¶
func GetTopPosts ¶
func GetTopPostsNamedRange ¶
func (Post) GetLastLikeId ¶
func (Post) GetMessage ¶
func (Post) GetTimeAgo ¶
func (Post) GetTimeString ¶
func (Post) GetTotalTip ¶
func (Post) IsLoggedIn ¶
type Profile ¶
type Profile struct { Name string PkHash []byte NameTx []byte Profile string ProfileTx []byte Self bool SelfPkHash []byte Balance int64 BalanceBCH float64 FollowerCount int FollowingCount int TopicsFollowingCount int NumPosts int FirstPost time.Time LastPost time.Time Followers []*Follower Following []*Follower Reputation *rep.Reputation CanFollow bool CanUnfollow bool Qr string Pic *db.MemoSetPic // contains filtered or unexported fields }
func GetProfiles ¶
func (Profile) GetAddressString ¶
func (Profile) GetCashAddressOnlyString ¶
func (Profile) GetCashAddressString ¶
func (Profile) GetFirstPost ¶
func (Profile) GetLastPost ¶
func (Profile) HasBalance ¶
func (*Profile) SetBalances ¶
func (*Profile) SetCanFollow ¶
func (*Profile) SetFollowerCount ¶
func (*Profile) SetFollowingCount ¶
func (*Profile) SetReputation ¶
func (*Profile) SetTopicsFollowingCount ¶
func (*Profile) SetUserStats ¶
type Vote ¶
func GetVotesForTxHash ¶
func (Vote) GetProfileHashString ¶
func (Vote) GetTimeAgo ¶
func (Vote) GetTxHashString ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.