server

package
v0.0.0-...-54f60d9 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package classification of Auth API

Documentation for Auth API

Schemes: http
BasePath: /
Version: 1.0.0

Consumes:
- application/json

Produces:
- application/json

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminMiddleware

func AdminMiddleware(maker token.PasetoMaker) gin.HandlerFunc

func AuthMiddleware

func AuthMiddleware(maker token.PasetoMaker) gin.HandlerFunc

Types

type Server

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

func NewServer

func NewServer(address string, db *gorm.DB, bc *clients.BorrowsClient, lc *clients.LikesClient, nc *clients.NotificationsClient) (*Server, error)

func (*Server) ListUsers

func (server *Server) ListUsers(ctx *gin.Context)

ListUsers lists all the users in the database

type UserData

type UserData struct {
	UserId string `json:"user_id"`
	Role   string `json:"role"`
}

type UsersResponseWrap

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

A list of user data is returned in the response swagger:response usersResponse

Jump to

Keyboard shortcuts

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