api

package
v0.0.0-...-7438055 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVulnMachine

func AddVulnMachine(c *gin.Context)

addVulnMachine adds vulnerable machines to the room based on the specified ID.

func Connect_db

func Connect_db() (*sql.DB, error)

connect to mysql using the credentials in creds.

func DeleteRoom

func DeleteRoom(c *gin.Context)

deleteRoom removes an room based on the specified ID.

func DeleteUser

func DeleteUser(c *gin.Context)

deleteUser removes an user based on the specified ID.

func GetKing

func GetKing(c *gin.Context)

getKing responds with the current king of the room as JSON.

func GetRoomByID

func GetRoomByID(c *gin.Context)

getRoomByID locates the room whose ID value matches the id parameter sent by the client, then returns that room as a response.

func GetRooms

func GetRooms(c *gin.Context)

getRooms responds with the list of all rooms as JSON.

func GetUserByID

func GetUserByID(c *gin.Context)

getUserByID locates the user whose ID value matches the id parameter sent by the client, then returns that user as a response.

func GetUsers

func GetUsers(c *gin.Context)

getUsers responds with the list of all users as JSON.

func PostRooms

func PostRooms(c *gin.Context)

postRooms adds an room from JSON received in the request body.

func PostUsers

func PostUsers(c *gin.Context)

postUsers adds an user from JSON received in the request body.

func PutKing

func PutKing(c *gin.Context)

putKing updates the king of the room based on the specified ID.

func PutRoom

func PutRoom(c *gin.Context)

putRoom updates an room based on the specified ID.

func PutUser

func PutUser(c *gin.Context)

putUser updates an user based on the specified ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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