authz

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register()

Register register modules: Permission, Role, UserRole.

Modules:

  • Permission
  • Role
  • UserRole
  • CasbinRule
  • Menu

Routes:

  • GET /api/authz/permissions
  • GET /api/authz/permissions/:id
  • POST /api/authz/roles
  • DELETE /api/authz/roles/:id
  • PUT /api/authz/roles/:id
  • PATCH /api/authz/roles/:id
  • GET /api/authz/roles
  • GET /api/authz/roles/:id
  • POST /api/authz/user-roles
  • DELETE /api/authz/user-roles/:id
  • PUT /api/authz/user-roles/:id
  • PATCH /api/authz/user-roles/:id
  • GET /api/authz/user-roles
  • GET /api/authz/user-roles/:id
  • POST /api/menus
  • DELETE /api/menus/:id
  • PUT /api/menus/:id
  • PATCH /api/menus/:id
  • GET /api/menus
  • GET /api/menus/:id
  • GET /api/apis
  • POST /api/buttons
  • DELETE /api/buttons/:id
  • PUT /api/buttons/:id
  • PATCH /api/buttons/:id
  • GET /api/buttons
  • GET /api/buttons/:id

Middleware:

  • Authz

Panic if creates table records failed.

Types

type API

type API = modelauthz.API

type APIModule

type APIModule struct{}

func (*APIModule) Param

func (*APIModule) Param() string

func (*APIModule) Pub

func (*APIModule) Pub() bool

func (*APIModule) Route

func (*APIModule) Route() string

func (*APIModule) Service

func (*APIModule) Service() types.Service[*API, *API, APIRsp]

type APIRsp

type APIRsp = modelauthz.APIRsp

type APIService

type APIService = serviceauthz.APIService

type Button

type Button = modelauthz.Button

type ButtonModule

type ButtonModule struct{}

func (*ButtonModule) Param

func (*ButtonModule) Param() string

func (*ButtonModule) Pub

func (*ButtonModule) Pub() bool

func (*ButtonModule) Route

func (*ButtonModule) Route() string

func (*ButtonModule) Service

func (*ButtonModule) Service() types.Service[*Button, *Button, *Button]

type ButtonService

type ButtonService = serviceauthz.ButtonService

type CasbinRule

type CasbinRule = modelauthz.CasbinRule
type Menu = modelauthz.Menu
type MenuModule struct{}
func (*MenuModule) Param() string
func (*MenuModule) Pub() bool
func (*MenuModule) Route() string
func (*MenuModule) Service() types.Service[*Menu, *Menu, *Menu]
type MenuService = serviceauthz.MenuService

type Permission

type Permission = modelauthz.Permission

type PermissionModule

type PermissionModule struct{}

func (*PermissionModule) Param

func (*PermissionModule) Param() string

func (*PermissionModule) Pub

func (*PermissionModule) Pub() bool

func (*PermissionModule) Route

func (*PermissionModule) Route() string

func (*PermissionModule) Service

type Role

type Role = modelauthz.Role

type RoleModule

type RoleModule struct{}

func (*RoleModule) Param

func (*RoleModule) Param() string

func (*RoleModule) Pub

func (*RoleModule) Pub() bool

func (*RoleModule) Route

func (*RoleModule) Route() string

func (*RoleModule) Service

func (*RoleModule) Service() types.Service[*Role, *Role, *Role]

type RoleService

type RoleService = serviceauthz.RoleService

type UserRole

type UserRole = modelauthz.UserRole

type UserRoleModule

type UserRoleModule struct{}

func (*UserRoleModule) Param

func (*UserRoleModule) Param() string

func (*UserRoleModule) Pub

func (*UserRoleModule) Pub() bool

func (*UserRoleModule) Route

func (*UserRoleModule) Route() string

func (*UserRoleModule) Service

type UserRoleService

type UserRoleService = serviceauthz.UserRoleService

Jump to

Keyboard shortcuts

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