data

package
v0.0.0-...-1c05b05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockedProfile

type BlockedProfile struct {
	ID      string
	AddTime int64
}

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) Favorite

func (b *Buddy) Favorite(isFavor bool)

func (*Buddy) IncrFriendValue

func (b *Buddy) IncrFriendValue(value int32)

func (*Buddy) ReceiveReward

func (b *Buddy) ReceiveReward()

func (*Buddy) ToProto

func (b *Buddy) ToProto() *pb.Buddy

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 Inviter struct {
	// The UID for a specific buddy.
	UID string
	// Timestamp (UTC) when request add buddy was send.
	ReqTime int64
	// Request add buddy text.
	ReqInfo string
}

func (*Inviter) ToProto

func (i *Inviter) ToProto() *pb.Inviter

type RecentProfile

type RecentProfile struct {
	ID      string
	AddTime int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL