Documentation ¶
Overview ¶
Package wife From "github.com/MoYoez/Lucy_zerobot"
Index ¶
- Variables
- func AddBlackList(db *sql.Sqlite, userID int64, targetID int64) error
- func AddDisabledList(db *sql.Sqlite, userID int64, groupID int64) error
- func AddOrderToList(db *sql.Sqlite, userID int64, targetID int64, time string, groupID int64) error
- func CheckDisabledListIsExistedInThisGroup(db *sql.Sqlite, userID int64, groupID int64) bool
- func CheckTheBlackListIsExistedToThisPerson(db *sql.Sqlite, userID int64, targetID int64) bool
- func CheckTheOrderListAndBackDetailed(userID int64, groupID int64) (chance int, target int64, time string)
- func CheckThePairKey(db *sql.Sqlite, uid int64, groupID int64) string
- func CheckTheTargetUserStatusAndDoRepeat(ctx *rei.Ctx, ChooseAPerson int64) bool
- func CheckTheUserIsInBlackListOrGroupList(userID int64, targetID int64, groupID int64) bool
- func CheckTheUserIsTargetOrUser(db *sql.Sqlite, ctx *rei.Ctx, userID int64) (statuscode int64, targetID int64)
- func CheckTheUserStatusAndDoRepeat(ctx *rei.Ctx) bool
- func CustomRemoveUserGlobalMarryList(db *sql.Sqlite, pairKey string, groupID int64, statusID int64) bool
- func DeleteBlackList(db *sql.Sqlite, userID int64, targetID int64) error
- func DeleteDisabledList(db *sql.Sqlite, userID int64, groupID int64) error
- func FindStrings(list []string, searchString string) []string
- func GenerateMD5(userID int64, targetID int64, groupID int64) string
- func GenerateUserImageLink(ctx *rei.Ctx, uid int64) string
- func GetSomeRanDomChoiceProps(ctx *rei.Ctx) int64
- func GetTheGroupList(gid int64) (list [][2]string, num int)
- func GetUserListAndChooseOne(ctx *rei.Ctx) int64
- func GlobalCDModelCost(ctx *rei.Ctx) bool
- func GlobalCDModelCostLeastReply(ctx *rei.Ctx) int
- func InsertUserGlobalMarryList(db *sql.Sqlite, groupID int64, UserID int64, targetID int64, StatusID int64, ...) error
- func LeaveCDModelCost(ctx *rei.Ctx) bool
- func LeaveCDModelCostLeastReply(ctx *rei.Ctx) int
- func RemoveOrderToList(db *sql.Sqlite, userID int64, groupID int64) error
- func RemoveUserGlobalMarryList(db *sql.Sqlite, pairKey string, groupID int64) bool
- func ReplyMeantMode(header string, referTarget int64, statusCodeToPerson int64, ctx *rei.Ctx)
- func ResetToInitalizeMode()
- func ResuitTheReferUserAndMakeIt(ctx *rei.Ctx, dict map[string][]string, EventUser int64, TargetUser int64)
- func TrackerCallFuncGetUserListAndChooseOne(ctx *rei.Ctx) int64
- type BlackListStruct
- type ChosenList
- type DisabledListStruct
- type GlobalDataStruct
- type OrderListStruct
- type PairKeyStruct
Constants ¶
This section is empty.
Variables ¶
var GlobalTimeManager = rate.NewManager[int64](time.Hour*12, 6)
var LeaveTimeManager = rate.NewManager[int64](time.Hour*12, 4)
Functions ¶
func AddBlackList ¶
AddBlackList add blacklist
func AddDisabledList ¶
AddDisabledList add disabledList
func AddOrderToList ¶
AddOrderToList add order.
func CheckDisabledListIsExistedInThisGroup ¶
CheckDisabledListIsExistedInThisGroup Check this group.
func CheckTheBlackListIsExistedToThisPerson ¶
CheckTheBlackListIsExistedToThisPerson check the person is blocked.
func CheckTheOrderListAndBackDetailed ¶
func CheckTheOrderListAndBackDetailed(userID int64, groupID int64) (chance int, target int64, time string)
CheckTheOrderListAndBackDetailed Check this and reply some details
func CheckThePairKey ¶
CheckThePairKey Check this pair key
func CheckTheTargetUserStatusAndDoRepeat ¶
CheckTheTargetUserStatusAndDoRepeat Check the target status and do repeats.
func CheckTheUserIsInBlackListOrGroupList ¶
CheckTheUserIsInBlackListOrGroupList Check this user is in list?
func CheckTheUserIsTargetOrUser ¶
func CheckTheUserIsTargetOrUser(db *sql.Sqlite, ctx *rei.Ctx, userID int64) (statuscode int64, targetID int64)
CheckTheUserIsTargetOrUser check the status.
func CheckTheUserStatusAndDoRepeat ¶
CheckTheUserStatusAndDoRepeat If ture, means it no others (Only Refer to current user.)
func CustomRemoveUserGlobalMarryList ¶
func CustomRemoveUserGlobalMarryList(db *sql.Sqlite, pairKey string, groupID int64, statusID int64) bool
CustomRemoveUserGlobalMarryList just remove it,it will persist the key (referKeyStatus)
func DeleteBlackList ¶
DeleteBlackList delete blacklist.
func DeleteDisabledList ¶
DeleteDisabledList delete disabledlist.
func FindStrings ¶
FindStrings find the strings in list.
func GenerateMD5 ¶
GenerateMD5 Generate MD5
func GenerateUserImageLink ¶
GenerateUserImageLink Generate Format Link.
func GetSomeRanDomChoiceProps ¶
GetSomeRanDomChoiceProps get some props chances to make it random.
func GetTheGroupList ¶
GetTheGroupList Get this group.
func GetUserListAndChooseOne ¶
GetUserListAndChooseOne choose people.
func GlobalCDModelCostLeastReply ¶
GlobalCDModelCostLeastReply Get the existed Token.
func InsertUserGlobalMarryList ¶
func InsertUserGlobalMarryList(db *sql.Sqlite, groupID int64, UserID int64, targetID int64, StatusID int64, PairKeyRaw string) error
InsertUserGlobalMarryList no check,use it with caution // Only insert and do nothing.
func LeaveCDModelCostLeastReply ¶
LeaveCDModelCostLeastReply Get the existed Token.
func RemoveOrderToList ¶
RemoveOrderToList remove it.
func RemoveUserGlobalMarryList ¶
RemoveUserGlobalMarryList just remove it,it will persist the key and change it to Type4.
func ReplyMeantMode ¶
ReplyMeantMode format the reply and clear.
func ResetToInitalizeMode ¶
func ResetToInitalizeMode()
ResetToInitalizeMode delete marrylist (pairkey | grouplist)
func ResuitTheReferUserAndMakeIt ¶
func ResuitTheReferUserAndMakeIt(ctx *rei.Ctx, dict map[string][]string, EventUser int64, TargetUser int64)
ResuitTheReferUserAndMakeIt Result For Married || be married,
Types ¶
type BlackListStruct ¶
type BlackListStruct struct {
BlackList int64 `db:"blacklist"`
}
BlackListStruct (Example: blacklist_1292581422)
func FormatBlackList ¶
func FormatBlackList(blockID int64) *BlackListStruct
FormatBlackList Format BlackList
type ChosenList ¶
type ChosenList struct { IdentifyID string `db:"id"` UserID int64 `db:"userid"` TargetName string `db:"targetname"` TargetID int64 `db:"targetid"` }
ChosenList User Refer To Theirs username and save it by using the quick additon (table: chosenList) be careful that it's global.
type DisabledListStruct ¶
type DisabledListStruct struct {
DisabledList int64 `db:"disabledlist"`
}
DisabledListStruct (Example: disabled_1292581422)
func FormatDisabledList ¶
func FormatDisabledList(disabledID int64) *DisabledListStruct
FormatDisabledList Format DisabledList
type GlobalDataStruct ¶
type GlobalDataStruct struct { PairKey string `db:"pairkey"` UserID int64 `db:"userid"` TargetID int64 `db:"targetid"` Time string `db:"time"` }
GlobalDataStruct (Example: grouplist_1292581422 )
func FormatInsertUserGlobalMarryList ¶
func FormatInsertUserGlobalMarryList(UserID int64, targetID int64, PairKeyRaw string) *GlobalDataStruct
FormatInsertUserGlobalMarryList Format Insert
type OrderListStruct ¶
type OrderListStruct struct { OrderPerson int64 `db:"order"` TargerPerson int64 `db:"target"` Time string `db:"time"` }
OrderListStruct (Example: orderlist_1145141919180)
func FormatOrderList ¶
func FormatOrderList(orderPersonal int64, targetPersonal int64, time string) *OrderListStruct
FormatOrderList Format OrderList
type PairKeyStruct ¶
PairKeyStruct pairkey is used to check the list.
func FormatPairKey ¶
func FormatPairKey(PairKeyRaw string, statusID int64) *PairKeyStruct
FormatPairKey Format PairKey