api

package
v0.0.0-...-5615a53 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePassword

func ChangePassword(c *fiber.Ctx) error

ChangePassword godoc

@summary	Change password of user
@Security	ApiKeyAuth || cookies
@tags		Users
@accept		json
@param		request	body	ChangePasswordBody	true	"Change password body"
@success	200
@failure	400
@router		/users/{username}/password [patch]

func ChangeUsername

func ChangeUsername(c *fiber.Ctx) error

ChangeUsername godoc

@summary	Change username of user
@Security	ApiKeyAuth || cookies
@tags		Users
@accept		json
@param		request	body	ChangeUsernameBody	true	"Change username body"
@success	200
@failure	400
@router		/users/{username}/username [patch]

func Connections

func Connections(c *fiber.Ctx) error

LiveLogs godoc

@summary	Get Session and Open Connections
@tags		Debug
@security	ApiKeyAuth
@success	200	object any
@router		/connections [get]

func GetUsername

func GetUsername(c *fiber.Ctx) error

GetUsername godoc

@summary	Get username of current logged-in user
@Security	ApiKeyAuth || cookies
@tags		Users
@success	200	{string}	username
@failure	401
@router		/users/current [get]

func GetUsers

func GetUsers(c *fiber.Ctx) error

GetUsers godoc

@summary	Get all the users
@Security	ApiKeyAuth || cookies
@tags		Users
@success	200	{object}	auth.AllUsers
@router		/users [get]

func LiveLogs

func LiveLogs(c *fiber.Ctx) error

LiveLogs godoc

@summary	Get Live Logs using SSE
@tags		General
@security	ApiKeyAuth
@success	200	string	string
@router		/logs/live [get]

func Login

func Login(c *fiber.Ctx) error

Login godoc

@summary	Login user
@tags		General
@security	BasicAuth
@success	200	string	string
@failure	400
@failure	401
@failure	500
@router		/login [post]

func Logs

func Logs(c *fiber.Ctx) error

Logs godoc

@summary	Get Logs
@tags		General
@security	ApiKeyAuth
@success	200	string	string
@router		/logs [get]

func SystemInfo

func SystemInfo(c *fiber.Ctx) error

LiveLogs godoc

@summary	Get System memory, allocation, Go Routines and GC Count
@tags		Debug
@security	ApiKeyAuth
@success	200	object any
@router		/infos [get]

Types

type ChangePasswordBody

type ChangePasswordBody struct {
	CurrentPassword string `json:"currentPassword"`
	NewPassword     string `json:"newPassword"`
}

type ChangeUsernameBody

type ChangeUsernameBody struct {
	NewUsername string `json:"newUsername"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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