Documentation
¶
Index ¶
- type Meeting
- type MeetingStorageManager
- func (u *MeetingStorageManager) Create(ctx context.Context, meetings []*model.MeetingInfo) (err error)
- func (u *MeetingStorageManager) Delete(ctx context.Context, meetingID string) (err error)
- func (u *MeetingStorageManager) FindByStatus(ctx context.Context, status []string, userID string) ([]*model.MeetingInfo, error)
- func (u *MeetingStorageManager) GenerateMeetingID(ctx context.Context) (string, error)
- func (u *MeetingStorageManager) TakeWithError(ctx context.Context, meetingID string) (meeting *model.MeetingInfo, err error)
- func (u *MeetingStorageManager) Update(ctx context.Context, meetingID string, updateData map[string]any) (err error)
- type User
- type UserStorageManager
- func (u *UserStorageManager) ClearUserToken(ctx context.Context, userID string) error
- func (u *UserStorageManager) Create(ctx context.Context, users []*model.User) (err error)
- func (u *UserStorageManager) FindWithError(ctx context.Context, userIDs []string) (users []*model.User, err error)
- func (u *UserStorageManager) GenerateUserID(ctx context.Context) (string, error)
- func (u *UserStorageManager) GetByAccount(ctx context.Context, account string) (user *model.User, err error)
- func (u *UserStorageManager) GetToken(ctx context.Context, userID string) (string, error)
- func (u *UserStorageManager) StoreToken(ctx context.Context, userID, userToken string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Meeting ¶
type Meeting interface {
// TakeWithError Get the information of the specified meeting. If the meetingID is not found, it will also return an error
TakeWithError(ctx context.Context, meetingID string) (meeting *model.MeetingInfo, err error) //1
// Create Insert multiple external guarantees that the meetingID is not repeated and does not exist in the storage
Create(ctx context.Context, meetings []*model.MeetingInfo) (err error) //1
Update(ctx context.Context, meetingID string, updateData map[string]any) (err error)
Delete(ctx context.Context, meetingID string) (err error)
FindByStatus(ctx context.Context, status []string, userID string) ([]*model.MeetingInfo, error)
GenerateMeetingID(ctx context.Context) (string, error)
}
type MeetingStorageManager ¶
type MeetingStorageManager struct {
// contains filtered or unexported fields
}
func (*MeetingStorageManager) Create ¶
func (u *MeetingStorageManager) Create(ctx context.Context, meetings []*model.MeetingInfo) (err error)
Create Insert multiple external guarantees that the userID is not repeated and does not exist in the storage.
func (*MeetingStorageManager) Delete ¶
func (u *MeetingStorageManager) Delete(ctx context.Context, meetingID string) (err error)
func (*MeetingStorageManager) FindByStatus ¶
func (u *MeetingStorageManager) FindByStatus(ctx context.Context, status []string, userID string) ([]*model.MeetingInfo, error)
func (*MeetingStorageManager) GenerateMeetingID ¶
func (u *MeetingStorageManager) GenerateMeetingID(ctx context.Context) (string, error)
func (*MeetingStorageManager) TakeWithError ¶
func (u *MeetingStorageManager) TakeWithError(ctx context.Context, meetingID string) (meeting *model.MeetingInfo, err error)
TakeWithError Get the information of the specified user and return an error if the userID is not found.
type User ¶
type User interface {
// FindWithError Get the information of the specified user. If the userID is not found, it will also return an error
FindWithError(ctx context.Context, userIDs []string) (users []*model.User, err error) //1
// Create Insert multiple external guarantees that the userID is not repeated and does not exist in the storage
Create(ctx context.Context, users []*model.User) (err error) //1
// GetByAccount Get user by account
GetByAccount(ctx context.Context, account string) (*model.User, error)
// StoreToken cache in storage
StoreToken(ctx context.Context, userID, userToken string) error
// GetToken get cache from storage
GetToken(ctx context.Context, userID string) (string, error)
// ClearUserToken clear cache from storage
ClearUserToken(ctx context.Context, userID string) error
// GenerateUserID generate a unique user id
GenerateUserID(ctx context.Context) (string, error)
}
type UserStorageManager ¶
type UserStorageManager struct {
// contains filtered or unexported fields
}
func (*UserStorageManager) ClearUserToken ¶
func (u *UserStorageManager) ClearUserToken(ctx context.Context, userID string) error
func (*UserStorageManager) Create ¶
Create Insert multiple external guarantees that the userID is not repeated and does not exist in the storage.
func (*UserStorageManager) FindWithError ¶
func (u *UserStorageManager) FindWithError(ctx context.Context, userIDs []string) (users []*model.User, err error)
FindWithError Get the information of the specified user and return an error if the userID is not found.
func (*UserStorageManager) GenerateUserID ¶
func (u *UserStorageManager) GenerateUserID(ctx context.Context) (string, error)
func (*UserStorageManager) GetByAccount ¶
func (*UserStorageManager) StoreToken ¶
func (u *UserStorageManager) StoreToken(ctx context.Context, userID, userToken string) error
Click to show internal directories.
Click to hide internal directories.