controllers

package
v0.0.0-...-9d51557 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPassword = "changeme"

Variables

This section is empty.

Functions

func AllOrders

func AllOrders(c *fiber.Ctx) error

func AllPermissions

func AllPermissions(c *fiber.Ctx) error

func AllProducts

func AllProducts(c *fiber.Ctx) error

func AllRoles

func AllRoles(c *fiber.Ctx) error

func AllUsers

func AllUsers(c *fiber.Ctx) error

func Chart

func Chart(c *fiber.Ctx) error

func CreateFile

func CreateFile(filePath string) error

func CreateProduct

func CreateProduct(c *fiber.Ctx) error

func CreateRole

func CreateRole(c *fiber.Ctx) error

func CreateUser

func CreateUser(c *fiber.Ctx) error

This function is for when a registered user creates another user

func DeleteProduct

func DeleteProduct(c *fiber.Ctx) error

func DeleteRole

func DeleteRole(c *fiber.Ctx) error

func DeleteUser

func DeleteUser(c *fiber.Ctx) error

func Export

func Export(c *fiber.Ctx) error

func GetProduct

func GetProduct(c *fiber.Ctx) error

func GetRole

func GetRole(c *fiber.Ctx) error

func GetUser

func GetUser(c *fiber.Ctx) error

func Hello

func Hello(c *fiber.Ctx) error

func Login

func Login(c *fiber.Ctx) error

func Logout

func Logout(c *fiber.Ctx) error

func Register

func Register(c *fiber.Ctx) error

func UpdateInfo

func UpdateInfo(c *fiber.Ctx) error

func UpdatePassword

func UpdatePassword(c *fiber.Ctx) error

func UpdateProduct

func UpdateProduct(c *fiber.Ctx) error

func UpdateRole

func UpdateRole(c *fiber.Ctx) error

func UpdateUser

func UpdateUser(c *fiber.Ctx) error

func Upload

func Upload(c *fiber.Ctx) error

func User

func User(c *fiber.Ctx) error

Types

type LoginBodyData

type LoginBodyData struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

login body

type RegisterBodyData

type RegisterBodyData struct {
	FirstName       string `json:"first_name"`
	LastName        string `json:"last_name"`
	Email           string `json:"email"`
	Password        string `json:"password"`
	PasswordConfirm string `json:"password_confirm"`
}

register body

type RoleCreateDTO

type RoleCreateDTO struct {
	Name        string `json:"name"`
	Permissions []uint `json:"permissions"`
}

Data Transfer Object

type Sales

type Sales struct {
	Date string `json:"date"`
	Sum  string `json:"sum"`
}

type UpdateBodyData

type UpdateBodyData struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
}

update body data

type UpdatePasswordBody

type UpdatePasswordBody struct {
	Password        string `json:"password"`
	PasswordConfirm string `json:"password_confirm"`
}

update password body

Jump to

Keyboard shortcuts

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