roleService

package
v0.0.0-...-dffa276 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRole

func CreateRole(c *gin.Context) (model.Role, int, error)

CreateRole creates a role.

func DeleteRole

func DeleteRole(c *gin.Context) (int, error)

DeleteRole deletes a role.

func RetrieveRole

func RetrieveRole(c *gin.Context) (model.Role, int, error)

RetrieveRole retrieves a role.

func RetrieveRoles

func RetrieveRoles(c *gin.Context) []model.Role

RetrieveRoles retrieves roles.

func UpdateRole

func UpdateRole(c *gin.Context) (model.Role, int, error)

UpdateRole updates a role.

Types

type RoleForm

type RoleForm struct {
	Name        string `form:"name" binding:"required"`
	Description string `form:"description" binding:"required"`
}

RoleForm is used when creating or updating a role.

Jump to

Keyboard shortcuts

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