collections

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

type Permission []models.Permission

Permission provides methods for you to manage array data more easily.

func (Permission) GuardNames

func (u Permission) GuardNames() (guards []string)

GuardNames returns an array of the permission array's guard names. @return []string

func (Permission) IDs

func (u Permission) IDs() (IDs []uint)

IDs returns an array of the permission array's ids. @return []uint

func (Permission) Len

func (u Permission) Len() (length int64)

Len returns the number of elements of the array. @return int64

func (Permission) Names

func (u Permission) Names() (names []string)

Names returns an array of the permission array's names. @return []string

func (Permission) Origin

func (u Permission) Origin() []models.Permission

Origin convert the collection to permission array. @return []models.Permission

type Role

type Role []models.Role

Role provides methods for you to manage array data more easily.

func (Role) GuardNames

func (u Role) GuardNames() (guards []string)

GuardNames returns an array of the permission array's guard names. @return []string

func (Role) IDs

func (u Role) IDs() (IDs []uint)

IDs returns an array of the role array's ids. @return []uint

func (Role) Len

func (u Role) Len() (length int64)

Len returns the number of elements of the array. @return int64

func (Role) Names

func (u Role) Names() (names []string)

Names returns an array of the role array's names. @return []string

func (Role) Origin

func (u Role) Origin() []models.Role

Origin convert the collection to role array. @return []models.Role

func (Role) Permissions

func (u Role) Permissions() (permissions Permission)

Permissions returns uniquely the permissions of the roles in the role collection. @return Permission

Jump to

Keyboard shortcuts

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