admin

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUser

func DeleteUser(c *gin.Context)

@BasePath /api/ @Summary Users @Description Delete User @Produce json @Router /admin/users/{user_id} [delete] @Tags Administration

func GetConfig

func GetConfig(c *gin.Context)

@BasePath /api/ @Summary Config @Description Get Config @Produce json @Router /admin/config [get] @Tags Administration

func GetUsers

func GetUsers(c *gin.Context)

@BasePath /api/ @Summary Users @Description Get Users list @Produce json @Router /admin/users [get] @Tags Administration

func PostUsers

func PostUsers(c *gin.Context)

@BasePath /api/ @Summary Create User @Description Create User @Produce json @Router /admin/users [post] @Param UserCreateForm body UserCreateForm true "UserOptions" @Tags Administration

func PutConfig

func PutConfig(c *gin.Context)

@BasePath /api/ @Summary Config @Description Update config Config @Produce json @Router /admin/config [put] @Param ConfigValues body map[string]string true "ConfigValues" @Success 200 {object} map[string]interface{} @Tags Administration

func PutUser

func PutUser(c *gin.Context)

@BasePath /api/ @Summary Users @Description Update User information @Produce json @Router /admin/users/{user_id} [put] @Param UserUpdateForm body UserUpdateForm true "UserOptions" @Tags Administration

Types

type UserCreateForm

type UserCreateForm struct {
	IsAdmin  *bool  `binding:"required"`
	Password string `binding:"required"`
	Email    string `binding:"required"`
	Username string `binding:"required"`
}

type UserUpdateForm

type UserUpdateForm struct {
	IsAdmin  *bool
	Password string
}

Jump to

Keyboard shortcuts

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