web

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPermissionForRoleReq

type AddPermissionForRoleReq struct {
	RoleCode string  `json:"role_code"`
	MenuIds  []int64 `json:"menu_ids"`
}

type CreateRoleReq

type CreateRoleReq struct {
	Name   string `json:"name"`
	Code   string `json:"code"`
	Desc   string `json:"desc"`
	Status bool   `json:"status"`
}

type DeleteRoleReq

type DeleteRoleReq struct {
	Id int64 `json:"id"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(svc service.Service) *Handler

func (*Handler) CreateRole

func (h *Handler) CreateRole(ctx *gin.Context, req CreateRoleReq) (ginx.Result, error)

func (*Handler) DeleteMenu

func (h *Handler) DeleteMenu(ctx *gin.Context, req DeleteRoleReq) (ginx.Result, error)

func (*Handler) FindUserDoesNotHaveRoles

func (h *Handler) FindUserDoesNotHaveRoles(ctx *gin.Context, req UserRole) (ginx.Result, error)

func (*Handler) FindUserHaveRoles

func (h *Handler) FindUserHaveRoles(ctx *gin.Context, req UserRole) (ginx.Result, error)

func (*Handler) ListRole

func (h *Handler) ListRole(ctx *gin.Context, req Page) (ginx.Result, error)

func (*Handler) PrivateRoutes

func (h *Handler) PrivateRoutes(server *gin.Engine)

func (*Handler) UpdateRole

func (h *Handler) UpdateRole(ctx *gin.Context, req UpdateRoleReq) (ginx.Result, error)

type Page

type Page struct {
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

type RetrieveRoles

type RetrieveRoles struct {
	Roles []Role `json:"roles"`
	Total int64  `json:"total"`
}

type RetrieveUserDoesNotHaveRoles

type RetrieveUserDoesNotHaveRoles struct {
	Total int64  `json:"total"`
	Roles []Role `json:"roles"`
}

type RetrieveUserHaveRoles

type RetrieveUserHaveRoles struct {
	Roles []Role `json:"roles"`
}

type Role

type Role struct {
	Id     int64  `json:"id"`
	Name   string `json:"name"`
	Code   string `json:"code"`
	Desc   string `json:"desc"`
	Status bool   `json:"status"`
}

type UpdateRoleReq

type UpdateRoleReq struct {
	Id     int64  `json:"id"`
	Name   string `json:"name"`
	Code   string `json:"code"`
	Desc   string `json:"desc"`
	Status bool   `json:"status"`
}

type UserRole

type UserRole struct {
	Page
	Codes []string `json:"codes"`
}

Jump to

Keyboard shortcuts

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