users

package
v0.0.0-...-c1be4bf Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserRequest

type CreateUserRequest struct {
	Email string `json:"email"`
}

type Handler

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

func NewHandler

func NewHandler(store UserStore) *Handler

func (*Handler) RegisterRoutes

func (handler *Handler) RegisterRoutes(mux *http.ServeMux)

type UserResponse

type UserResponse struct {
	ID        string    `json:"id"`
	Email     string    `json:"email"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	ApiKey    string    `json:"api_key"`
}

type UserStore

type UserStore interface {
	GetUserByApiKey(ctx context.Context, apiKey string) (database.User, error)
	CreateUser(ctx context.Context, email string) (database.User, error)
}