models

package
v0.0.0-...-cc52b3d Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   uint   `json:"id"`   // Primary key of the model
	Name string `json:"name"` // Name of the category
}

Catgory represents a model for storing information about a category to which a permission is associated with.

type CategoryPermission

type CategoryPermission struct {
	ID           uint // Primary key of the model
	CategoryID   uint // ID of the category to which the permission will belong to
	PermissionID uint // ID of the permission which is associated with the category
}

CategoryPermission represents a model for storing information about the relationship between a permission category and the permission itself.

type Permission

type Permission struct {
	ID          uint   `json:"id"`                    // Primary key of the model
	Name        string `json:"name"`                  // Name of the permission
	Description string `json:"description,omitempty"` // Description of the permission
	UrlID       uint   `json:"urlID"`                 // ID of Url
}

Permission represents a model for storing information about a permission

type Role

type Role struct {
	ID   uint   `json:"id"`   // Primary key of the model
	Name string `json:"name"` // Name of the role
}

Role represents a model for storing information about a role.

type RolePermission

type RolePermission struct {
	ID           uint // Primary key of the model
	RoleID       uint `json:"roleID"`       // ID of the role
	PermissionID uint `json:"permissionID"` // ID of the permission
}

RolePermission represents a model for storing information about the relationship between a role and a permission

type Url

type Url struct {
	ID   uint   `json:"id"`   // Primary key of the model
	Path string `json:"path"` // Path string of url
}

Url represents a model for storing information about a url.

type UserPermissionInt

type UserPermissionInt struct {
	ID           uint // Primary key of the model
	UserID       uint // ID of the user to whom the permission is given
	PermissionID uint // ID of the permission which is given to the user
}

UserPermissionInt represents a model for storing information about the relationship between a user (with uint type primary key) and a permission.

It is used for the case in which UserID is of `uint` type.

type UserPermissionUUID

type UserPermissionUUID struct {
	ID           uint      // Primary key of the model
	UserID       uuid.UUID // ID of the user to whom the permission is given
	PermissionID uint      // ID of the permission which is given to the user
}

UserPermissionUUID represents a model for storing information about the relationship between a user (with uuid type primary key) and a permission.

It is used for the case in which UserID is of `uuid` type.

type UserRoleInt

type UserRoleInt struct {
	ID     uint // Primary key of the model
	UserID uint `json:"userID"` // ID of the user to whom the role is given
	RoleID uint `json:"roleID"` // ID of the role which is given to the user
}

UserRoleInt represents a model for storing information about the relationship between a user (with uint type primary key) and a role.

It is used for the case in which UserID is of `uint` type.

type UserRoleUUID

type UserRoleUUID struct {
	ID     uint      // Primary key of the model
	UserID uuid.UUID `json:"userID"` // ID of the user to whom the role is given
	RoleID uint      `json:"roleID"` // ID of the role which is given to the user
}

UserRoleUUID represents a model for storing information about the relationship between a user (with uuid type primary key) and a role.

It is used for the case in which UserID is of `uuid` type.

Jump to

Keyboard shortcuts

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