Documentation ¶
Index ¶
- type BlockedProfile
- type Buddy
- type BuddyQueue
- func (bq *BuddyQueue) AddBlocked(id string)
- func (bq *BuddyQueue) AddBlockedProfiles(ids ...string)
- func (bq *BuddyQueue) AddBuddy(f *Buddy)
- func (bq *BuddyQueue) AddFriendValue(value int32, ids ...string)
- func (bq *BuddyQueue) AddInviteSend(uid string, in *Inviter)
- func (bq *BuddyQueue) AddInviter(f *Inviter)
- func (bq *BuddyQueue) AddRecentProfiles()
- func (bq *BuddyQueue) Clear()
- func (bq *BuddyQueue) ClearRewardNum() (int32, []string)
- func (bq *BuddyQueue) CollectRewardNum(ids []string) int32
- func (bq *BuddyQueue) Delete(uid string)
- func (bq *BuddyQueue) DeleteBlocked(id string)
- func (bq *BuddyQueue) DeleteBlockedProfiles(ids ...string)
- func (bq *BuddyQueue) DeleteBuddies(ids ...string)
- func (bq *BuddyQueue) DeleteRecentProfiles(ids ...string)
- func (bq *BuddyQueue) Favorite(isFavor bool, ids ...string)
- func (bq *BuddyQueue) FilterBlocked(ids ...string) []string
- func (bq *BuddyQueue) GetBlockedNum() int32
- func (bq *BuddyQueue) GetBuddy(uid string) *Buddy
- func (bq *BuddyQueue) GetInviter(uid string) *Inviter
- func (bq *BuddyQueue) GetInviterIds() []string
- func (bq *BuddyQueue) GetInviterNum() int32
- func (bq *BuddyQueue) GetInviters() []*Inviter
- func (bq *BuddyQueue) GetMemberCounts() int32
- func (bq *BuddyQueue) GetSortedInviters() []string
- func (bq *BuddyQueue) IsAlreadySendInvited(id string) bool
- func (bq *BuddyQueue) IsBlocked(id string) bool
- func (bq *BuddyQueue) IsContains(uid string) bool
- func (bq *BuddyQueue) IsContainsInviter(uid string) bool
- func (bq *BuddyQueue) IsContainsProfiles(ids ...string) bool
- func (bq *BuddyQueue) IsInvited(id string) bool
- func (bq *BuddyQueue) RemoveInviteSend(uid string)
- func (bq *BuddyQueue) RemoveInviter(uid string)
- func (bq *BuddyQueue) UpdateRemark(uid string, remark string)
- func (bq *BuddyQueue) UpdateSettings(allowToBeAdded bool)
- type BuddySettings
- type Inviter
- type RecentProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockedProfile ¶
func (*BlockedProfile) ToProto ¶
func (p *BlockedProfile) ToProto() *pb.Blocked
type Buddy ¶
type Buddy struct { // The UID for a specific buddy. UID string // Timestamp (UTC) when request add buddy was send. ActTime int64 // The Remark for buddy. Remark string // Reward num from buddy. ReceiveRewardNum int32 // FriendValue int32 FriendValue int32 // isFavorite IsFavorite bool }
func (*Buddy) IncrFriendValue ¶
func (*Buddy) ReceiveReward ¶
func (b *Buddy) ReceiveReward()
func (*Buddy) UnFavorite ¶
func (b *Buddy) UnFavorite()
type BuddyQueue ¶
type BuddyQueue struct { UID string Nickname string Buddies map[string]*Buddy Inviters map[string]*Inviter InviterSends map[string]*Inviter BlockedProfiles map[string]*BlockedProfile RecentMet []*RecentProfile Settings *BuddySettings }
func NewBuddyQueue ¶
func NewBuddyQueue(uid string) *BuddyQueue
func (*BuddyQueue) AddBlocked ¶
func (bq *BuddyQueue) AddBlocked(id string)
func (*BuddyQueue) AddBlockedProfiles ¶
func (bq *BuddyQueue) AddBlockedProfiles(ids ...string)
func (*BuddyQueue) AddBuddy ¶
func (bq *BuddyQueue) AddBuddy(f *Buddy)
AddBuddy Add a new buddy instance to the queue.
func (*BuddyQueue) AddFriendValue ¶
func (bq *BuddyQueue) AddFriendValue(value int32, ids ...string)
func (*BuddyQueue) AddInviteSend ¶
func (bq *BuddyQueue) AddInviteSend(uid string, in *Inviter)
func (*BuddyQueue) AddInviter ¶
func (bq *BuddyQueue) AddInviter(f *Inviter)
func (*BuddyQueue) AddRecentProfiles ¶
func (bq *BuddyQueue) AddRecentProfiles()
func (*BuddyQueue) Clear ¶
func (bq *BuddyQueue) Clear()
func (*BuddyQueue) ClearRewardNum ¶
func (bq *BuddyQueue) ClearRewardNum() (int32, []string)
func (*BuddyQueue) CollectRewardNum ¶
func (bq *BuddyQueue) CollectRewardNum(ids []string) int32
func (*BuddyQueue) Delete ¶
func (bq *BuddyQueue) Delete(uid string)
func (*BuddyQueue) DeleteBlocked ¶
func (bq *BuddyQueue) DeleteBlocked(id string)
func (*BuddyQueue) DeleteBlockedProfiles ¶
func (bq *BuddyQueue) DeleteBlockedProfiles(ids ...string)
func (*BuddyQueue) DeleteBuddies ¶
func (bq *BuddyQueue) DeleteBuddies(ids ...string)
func (*BuddyQueue) DeleteRecentProfiles ¶
func (bq *BuddyQueue) DeleteRecentProfiles(ids ...string)
func (*BuddyQueue) Favorite ¶
func (bq *BuddyQueue) Favorite(isFavor bool, ids ...string)
func (*BuddyQueue) FilterBlocked ¶
func (bq *BuddyQueue) FilterBlocked(ids ...string) []string
func (*BuddyQueue) GetBlockedNum ¶
func (bq *BuddyQueue) GetBlockedNum() int32
func (*BuddyQueue) GetBuddy ¶
func (bq *BuddyQueue) GetBuddy(uid string) *Buddy
func (*BuddyQueue) GetInviter ¶
func (bq *BuddyQueue) GetInviter(uid string) *Inviter
func (*BuddyQueue) GetInviterIds ¶
func (bq *BuddyQueue) GetInviterIds() []string
func (*BuddyQueue) GetInviterNum ¶
func (bq *BuddyQueue) GetInviterNum() int32
func (*BuddyQueue) GetInviters ¶
func (bq *BuddyQueue) GetInviters() []*Inviter
func (*BuddyQueue) GetMemberCounts ¶
func (bq *BuddyQueue) GetMemberCounts() int32
func (*BuddyQueue) GetSortedInviters ¶
func (bq *BuddyQueue) GetSortedInviters() []string
func (*BuddyQueue) IsAlreadySendInvited ¶
func (bq *BuddyQueue) IsAlreadySendInvited(id string) bool
func (*BuddyQueue) IsBlocked ¶
func (bq *BuddyQueue) IsBlocked(id string) bool
func (*BuddyQueue) IsContains ¶
func (bq *BuddyQueue) IsContains(uid string) bool
func (*BuddyQueue) IsContainsInviter ¶
func (bq *BuddyQueue) IsContainsInviter(uid string) bool
func (*BuddyQueue) IsContainsProfiles ¶
func (bq *BuddyQueue) IsContainsProfiles(ids ...string) bool
func (*BuddyQueue) IsInvited ¶
func (bq *BuddyQueue) IsInvited(id string) bool
func (*BuddyQueue) RemoveInviteSend ¶
func (bq *BuddyQueue) RemoveInviteSend(uid string)
func (*BuddyQueue) RemoveInviter ¶
func (bq *BuddyQueue) RemoveInviter(uid string)
func (*BuddyQueue) UpdateRemark ¶
func (bq *BuddyQueue) UpdateRemark(uid string, remark string)
func (*BuddyQueue) UpdateSettings ¶
func (bq *BuddyQueue) UpdateSettings(allowToBeAdded bool)
type BuddySettings ¶
type BuddySettings struct {
AllowToBeAdded bool
}
type Inviter ¶
type RecentProfile ¶
Click to show internal directories.
Click to hide internal directories.