Documentation ¶
Index ¶
- func GetRateLimiter(userID string) *rate.Limiter
- type AwardNotification
- type BidNotification
- type Claims
- type JWTUtil
- type NotificationService
- func (s *NotificationService) NotifyAward(ctx context.Context, clientID uuid.UUID, notification BidNotification) error
- func (s *NotificationService) NotifyNewBid(ctx context.Context, clientID uuid.UUID, notification BidNotification) error
- func (s *NotificationService) RegisterClient(clientID uuid.UUID, conn *websocket.Conn)
- func (s *NotificationService) UnregisterClient(clientID uuid.UUID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRateLimiter ¶
GetRateLimiter returns a rate limiter for a given user ID
Types ¶
type AwardNotification ¶
type BidNotification ¶
type Claims ¶
type JWTUtil ¶
type JWTUtil struct {
// contains filtered or unexported fields
}
func NewJWTUtil ¶
func (*JWTUtil) GenerateToken ¶
type NotificationService ¶
type NotificationService struct {
// contains filtered or unexported fields
}
func NewNotificationService ¶
func NewNotificationService() *NotificationService
func (*NotificationService) NotifyAward ¶
func (s *NotificationService) NotifyAward(ctx context.Context, clientID uuid.UUID, notification BidNotification) error
NotifyAward sends a notification to a specific client about an award
func (*NotificationService) NotifyNewBid ¶
func (s *NotificationService) NotifyNewBid(ctx context.Context, clientID uuid.UUID, notification BidNotification) error
NotifyNewBid sends a notification to a specific client about a new bid
func (*NotificationService) RegisterClient ¶
func (s *NotificationService) RegisterClient(clientID uuid.UUID, conn *websocket.Conn)
RegisterClient registers a new WebSocket client
func (*NotificationService) UnregisterClient ¶
func (s *NotificationService) UnregisterClient(clientID uuid.UUID)
UnregisterClient removes a WebSocket client
Click to show internal directories.
Click to hide internal directories.