handler

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 22 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 (*Handler) BlacklistUser

func (h *Handler) BlacklistUser(w http.ResponseWriter, r *http.Request)

BlacklistUser handles POST /v1/admin/users/:userId/blacklist

func (*Handler) CheckConfirmationCode

func (h *Handler) CheckConfirmationCode(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateBoard

func (h *Handler) CreateBoard(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateMessage

func (h *Handler) CreateMessage(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateThread

func (h *Handler) CreateThread(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteBoard

func (h *Handler) DeleteBoard(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteMessage

func (h *Handler) DeleteMessage(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteThread

func (h *Handler) DeleteThread(w http.ResponseWriter, r *http.Request)

func (*Handler) GenerateInvite

func (h *Handler) GenerateInvite(w http.ResponseWriter, r *http.Request)

GenerateInvite handles POST /v1/invites Creates a new invite code for the authenticated user

func (*Handler) GetBlacklistedUsers

func (h *Handler) GetBlacklistedUsers(w http.ResponseWriter, r *http.Request)

GetBlacklistedUsers handles GET /v1/admin/blacklist

func (*Handler) GetBoard

func (h *Handler) GetBoard(w http.ResponseWriter, r *http.Request)

func (*Handler) GetBoardLastModified

func (h *Handler) GetBoardLastModified(w http.ResponseWriter, r *http.Request)

func (*Handler) GetBoards

func (h *Handler) GetBoards(w http.ResponseWriter, r *http.Request)

func (*Handler) GetMessage

func (h *Handler) GetMessage(w http.ResponseWriter, r *http.Request)

func (*Handler) GetMyInvites

func (h *Handler) GetMyInvites(w http.ResponseWriter, r *http.Request)

GetMyInvites handles GET /v1/invites Returns invite codes created by the authenticated user, with pagination.

func (*Handler) GetPublicConfig

func (h *Handler) GetPublicConfig(w http.ResponseWriter, r *http.Request)

GetPublicConfig exposes the public part of the configuration for clients (frontend)

func (*Handler) GetReferralStats added in v0.1.3

func (h *Handler) GetReferralStats(w http.ResponseWriter, r *http.Request)

GetReferralStats handles GET /v1/admin/referral/stats

func (*Handler) GetThread

func (h *Handler) GetThread(w http.ResponseWriter, r *http.Request)

func (*Handler) GetThreadLastModified

func (h *Handler) GetThreadLastModified(w http.ResponseWriter, r *http.Request)

func (*Handler) GetUserActivity

func (h *Handler) GetUserActivity(w http.ResponseWriter, r *http.Request)

GetUserActivity returns the authenticated user's recent messages

func (*Handler) Health

func (h *Handler) Health(w http.ResponseWriter, r *http.Request)

Health is a liveness probe endpoint. Returns 200 OK if the server is running.

func (*Handler) Login

func (h *Handler) Login(w http.ResponseWriter, r *http.Request)

func (*Handler) Ready

func (h *Handler) Ready(w http.ResponseWriter, r *http.Request)

Ready is a readiness probe endpoint. Returns 200 OK if the server can handle requests (DB is connected). Returns 503 Service Unavailable if dependencies are not ready.

func (*Handler) RecordReferralAction added in v0.3.2

func (h *Handler) RecordReferralAction(w http.ResponseWriter, r *http.Request)

RecordReferralAction handles POST /v1/auth/referral/action

func (*Handler) RefreshBlacklistCache

func (h *Handler) RefreshBlacklistCache(w http.ResponseWriter, r *http.Request)

RefreshBlacklistCache handles POST /v1/admin/blacklist/refresh

func (*Handler) Register

func (h *Handler) Register(w http.ResponseWriter, r *http.Request)

func (*Handler) RegisterWithInvite

func (h *Handler) RegisterWithInvite(w http.ResponseWriter, r *http.Request)

RegisterWithInvite handles POST /v1/auth/register_with_invite Allows users to register using an invite code instead of email confirmation

func (*Handler) RevokeInvite

func (h *Handler) RevokeInvite(w http.ResponseWriter, r *http.Request)

RevokeInvite handles DELETE /v1/invites/{codeHash} Deletes an unused invite code owned by the authenticated user

func (*Handler) Test

func (h *Handler) Test(w http.ResponseWriter, r *http.Request)

func (*Handler) TogglePinnedThread

func (h *Handler) TogglePinnedThread(w http.ResponseWriter, r *http.Request)

func (*Handler) UnblacklistUser

func (h *Handler) UnblacklistUser(w http.ResponseWriter, r *http.Request)

UnblacklistUser handles DELETE /v1/admin/users/:userId/blacklist

type HealthChecker

type HealthChecker interface {
	Ping(ctx context.Context) error
}

HealthChecker is used by health endpoints to verify dependencies.

Jump to

Keyboard shortcuts

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