handlers

package
v0.0.0-...-476e770 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginAdminHandler

func LoginAdminHandler(c *fiber.Ctx) error

LoginAdminHandler creates a handler for logging in telar social @Summary Admin login @Description Handle admin login for Telar Social @Tags Login @Accept application/x-www-form-urlencoded @Produce html @Param username formData string true "Username" @Param password formData string true "Password" @Success 200 {string} string "OK" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /login [post]

func LoginPageHandler

func LoginPageHandler(c *fiber.Ctx) error

LoginPageHandler creates a handler for logging in @Summary Display login page @Description Render the login page for Telar Social @Tags Login @Produce html @Success 200 {string} string "OK" @Router /login [get]

func SetupHandler

func SetupHandler(c *fiber.Ctx) error

SetupHandler handles the setup process @Summary Setup process @Description Handles the setup process for the application @Tags setup @Produce json @Success 200 {string} string "OK" @Failure 400 {object} utils.TelarError "Bad request" @Failure 500 {object} utils.TelarError "Internal server error" @Router /setup [post]

func SetupPageHandler

func SetupPageHandler(c *fiber.Ctx) error

SetupPageHandler renders the setup page @Summary Display setup page @Description Renders the setup page for the application @Tags setup @Produce html @Success 200 {string} string "OK" @Router /setup [get]

Types

type AdminCheck

type AdminCheck struct {
	Success bool `json:"success"`
	Admin   bool `json:"admin"`
}

Admin check

type AdminToken

type AdminToken struct {
	Success bool   `json:"success"`
	Token   string `json:"token"`
}

Admin token

Jump to

Keyboard shortcuts

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