users

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: AGPL-3.0-or-later

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
}

Handler handles user API requests

func NewHandler

func NewHandler(adminEmails []string) *Handler

NewHandler creates a new users handler

func (*Handler) HandleGetCurrentUser

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

HandleGetCurrentUser handles GET /api/v1/users/me

type UserDTO

type UserDTO struct {
	ID      string `json:"id"`
	Email   string `json:"email"`
	Name    string `json:"name"`
	IsAdmin bool   `json:"isAdmin"`
}

UserDTO represents a user data transfer object

Jump to

Keyboard shortcuts

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