utils

package
v3.8.4-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGroupName

func BuildGroupName(ownerID, type_ string) string

func CancelAndReBuildCtx added in v3.8.1

func CancelAndReBuildCtx(
	buildFunc func(ctx context.Context) context.Context,
	cancel ...context.CancelFunc,
) context.Context

func FormatErrorStack added in v3.8.1

func FormatErrorStack(err error) string

func GenUserIDs added in v3.8.1

func GenUserIDs(num int) []string

func GetUserID

func GetUserID(num int) string

func GetUserNum

func GetUserNum(id string) (int, error)

func IsLogin added in v3.8.1

func IsLogin(id string) bool

IsLogin check if the user is login

func IsNumLogin added in v3.8.1

func IsNumLogin(num int) bool

IsNumLogin check if the user is login

func IsSuperUser

func IsSuperUser(id string) bool

IsSuperUser check if the user has all friends

func MustGetUserNum

func MustGetUserNum(id string) int

func NextLoginNum added in v3.8.1

func NextLoginNum(num int) int

NextLoginNum get next num.

func NextLoginOffsetNum added in v3.8.1

func NextLoginOffsetNum(num, offset int) int

NextLoginOffsetNum get num with an offset behind.

func NextLoginOffsetUserIDs added in v3.8.1

func NextLoginOffsetUserIDs(userNum, offset int) []string

NextLoginOffsetUserIDs get userIDs with an offset behind.

func NextNum

func NextNum(num int) int

NextNum get next num.

func NextOffsetNum

func NextOffsetNum(num, offset int) int

NextOffsetNum get num with an offset behind.

func NextOffsetNums

func NextOffsetNums(userNum, offset int) []int

NextOffsetNums get num with an offset behind.

func NextOffsetUserIDs

func NextOffsetUserIDs(userNum, offset int) []string

NextOffsetUserIDs get userIDs with an offset behind.

Types

This section is empty.

Jump to

Keyboard shortcuts

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