model

package
v0.0.0-...-66c98c8 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PermissionPolicy

type PermissionPolicy struct {
	ID           int64     `orm:"pk;auto;column(id)"`
	Scope        string    `orm:"column(scope)"`
	Resource     string    `orm:"column(resource)"`
	Action       string    `orm:"column(action)"`
	Effect       string    `orm:"column(effect)"`
	CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"`
}

PermissionPolicy records the policy of rbac

func (*PermissionPolicy) TableName

func (permissionPolicy *PermissionPolicy) TableName() string

TableName for permission policy

type RolePermission

type RolePermission struct {
	ID                 int64     `orm:"pk;auto;column(id)"`
	RoleType           string    `orm:"column(role_type)"`
	RoleID             int64     `orm:"column(role_id)"`
	PermissionPolicyID int64     `orm:"column(permission_policy_id)"`
	CreationTime       time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"`
}

RolePermission records the relations of role and permission

func (*RolePermission) TableName

func (rp *RolePermission) TableName() string

TableName for role permission

type UniversalRolePermission

type UniversalRolePermission struct {
	RoleType string `orm:"column(role_type)"`
	RoleID   int64  `orm:"column(role_id)"`
	Scope    string `orm:"column(scope)"`
	Resource string `orm:"column(resource)"`
	Action   string `orm:"column(action)"`
	Effect   string `orm:"column(effect)"`
}

UniversalRolePermission ...

Jump to

Keyboard shortcuts

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