redis

package
v0.0.0-...-2a6e696 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultOpt

func GetDefaultOpt() rockscache.Options

func NewMeeting

func NewMeeting(rdb redis.UniversalClient, meetingDB database.Meeting, options rockscache.Options) cache.Meeting

func NewMetaCacheRedis

func NewMetaCacheRedis(rcClient *rockscache.Client, keys ...string) cache.Meta

func NewUser

func NewUser(rdb redis.UniversalClient, userDB database.User, options rockscache.Options) cache.User

Types

type Comparable

type Comparable interface {
	~int | ~string | ~float64 | ~int32
}

type Meeting

type Meeting struct {
	cache.Meta
	// contains filtered or unexported fields
}

func (*Meeting) DelMeeting

func (m *Meeting) DelMeeting(meetingIDs ...string) cache.Meeting

func (*Meeting) GenerateMeetingID

func (m *Meeting) GenerateMeetingID(ctx context.Context) (string, error)

func (*Meeting) GetMeetingByID

func (m *Meeting) GetMeetingByID(ctx context.Context, meetingID string) (*model.MeetingInfo, error)

func (*Meeting) NewCache

func (m *Meeting) NewCache() cache.Meeting

type User

type User struct {
	cache.Meta
	// contains filtered or unexported fields
}

func (*User) CacheUserToken

func (u *User) CacheUserToken(ctx context.Context, userID, userToken string) error

func (*User) ClearUserToken

func (u *User) ClearUserToken(ctx context.Context, userID string) error

func (*User) DelUsersInfo

func (u *User) DelUsersInfo(userIDs ...string) cache.User

func (*User) GenerateUserID

func (u *User) GenerateUserID(ctx context.Context) (string, error)

func (*User) GetUserByAccount

func (u *User) GetUserByAccount(ctx context.Context, account string) (*model.User, error)

func (*User) GetUserToken

func (u *User) GetUserToken(ctx context.Context, userID string) (string, error)

func (*User) GetUsersInfo

func (u *User) GetUsersInfo(ctx context.Context, userIDs []string) ([]*model.User, error)

func (*User) NewCache

func (u *User) NewCache() cache.User

Jump to

Keyboard shortcuts

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