friends

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(db *bun.DB) *Handler

func (*Handler) AcceptRequest

func (h *Handler) AcceptRequest(c *gin.Context)

func (*Handler) DeclineRequest

func (h *Handler) DeclineRequest(c *gin.Context)

func (*Handler) ListFriendIDs added in v0.2.0

func (h *Handler) ListFriendIDs(ctx context.Context, accountID uuid.UUID) ([]uuid.UUID, error)

ListFriendIDs returns just the account IDs of accepted friends. Used by the presence hub to know who to notify.

func (*Handler) ListFriends

func (h *Handler) ListFriends(c *gin.Context)

func (*Handler) ListRequests

func (h *Handler) ListRequests(c *gin.Context)

func (*Handler) RemoveFriend

func (h *Handler) RemoveFriend(c *gin.Context)

func (*Handler) RemoveFriendship

func (h *Handler) RemoveFriendship(ctx context.Context, accountA, accountB uuid.UUID) error

RemoveFriendship is called internally by the blocks handler. It removes any friendship between two users regardless of direction.

func (*Handler) SendRequest

func (h *Handler) SendRequest(c *gin.Context)

Jump to

Keyboard shortcuts

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