Documentation ¶
Index ¶
- Variables
- func AddAccess(idModule primitive.ObjectID, idRole primitive.ObjectID, access bson.M) error
- func AddModule(module bson.M) error
- func AddOperation(oper bson.M) error
- func AddOperation2View(idView primitive.ObjectID, idOperation primitive.ObjectID) error
- func AddRole(idModule primitive.ObjectID, data2set bson.M) error
- func AddRole2User(idUser primitive.ObjectID, idRole primitive.ObjectID) (bool, error)
- func AddUser(user bson.M) error
- func AddView(idModule primitive.ObjectID, view bson.M) error
- func CreateTokenString(idUser string) (string, error)
- func DecodeTokenString(myToken string) (string, error)
- func GetAccess(idAccess primitive.ObjectID) (*models.Access, error)
- func GetIndexOfRole(idRole primitive.ObjectID) (int, error)
- func GetModule(idModule primitive.ObjectID) (*models.Module, error)
- func GetModules() (*[]models.Module, error)
- func GetOperationByID(idOperation primitive.ObjectID) (*models.Operation, error)
- func GetOperationByName(name string) (*models.Operation, error)
- func GetOperations() (*[]models.Operation, error)
- func GetOperationsByIDs(ids []primitive.ObjectID) (*[]models.Operation, error)
- func GetRole(idRole primitive.ObjectID) (*models.Role, error)
- func GetRolesOfUser(roles []primitive.ObjectID) (*[]models.Role, error)
- func GetUserByDNI(dni string) (*models.User, error)
- func GetUserById(idUser primitive.ObjectID) (*models.User, error)
- func GetUsers() (*[]models.User, error)
- func GetView(idView primitive.ObjectID) (*models.View, error)
- func GetViewinAccess(id primitive.ObjectID) (bool, error)
- func Login(nick string, password string) (*models.User, error)
- func LoginT(id string) (*models.User, error)
- func ModulesOfUser(roles []primitive.ObjectID) (*[]models.Module, error)
- func ModulesOperationByUser(idOper primitive.ObjectID, roles []primitive.ObjectID) (*[]models.Module, error)
- func RefreshPasswordUser(idUser primitive.ObjectID) (*models.User, error)
- func RemoveAccess(idRole primitive.ObjectID, idAccess primitive.ObjectID) (bool, error)
- func RemoveModule(idModule primitive.ObjectID) (bool, error)
- func RemoveOperation(idOperation primitive.ObjectID) (bool, error)
- func RemoveOperation2View(idView primitive.ObjectID, idOperation primitive.ObjectID) (bool, error)
- func RemoveRole(idRole primitive.ObjectID) (bool, error)
- func RemoveRole2User(idUser primitive.ObjectID, idRole primitive.ObjectID) (bool, error)
- func RemoveUser(id primitive.ObjectID) (bool, error)
- func RemoveView(idView primitive.ObjectID) (bool, error)
- func UpdateAccess(idRole primitive.ObjectID, idAccess primitive.ObjectID, idV primitive.ObjectID, ...) error
- func UpdateModule(id primitive.ObjectID, module bson.M) error
- func UpdateOperation(id primitive.ObjectID, oper bson.M) error
- func UpdatePasswordUser(idUser primitive.ObjectID, password string, newPassword string) (*models.User, error)
- func UpdateRole(idRole primitive.ObjectID, name string, description string) error
- func UpdateUser(id primitive.ObjectID, user bson.M) error
- func UpdateView(idView primitive.ObjectID, nam string, des string, url string, icon string) error
- func ViewOfUser(idView primitive.ObjectID) (*models.View, error)
- type UserTkn
- type UserToken
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ColAccess = "modules"
)
View Source
var (
ColModules = "modules"
)
View Source
var (
ColOperations = "operations"
)
View Source
var (
ColRoles = "modules"
)
View Source
var (
Coluser = "users"
)
View Source
var (
Colview = "modules"
)
Functions ¶
func AddOperation ¶
func AddOperation2View ¶
func AddRole2User ¶
Function to add a role to an existed user
func CreateTokenString ¶
func DecodeTokenString ¶
func GetModules ¶
func GetOperationByID ¶
func GetOperations ¶
func GetOperationsByIDs ¶
func GetUserById ¶
Function to get user by Id
func ModulesOperationByUser ¶
func RefreshPasswordUser ¶
func RemoveAccess ¶
func RemoveOperation2View ¶
func RemoveRole2User ¶
Function to remove a role to an existed user
func RemoveUser ¶
Function to remove an user by id
func UpdateAccess ¶
func UpdatePasswordUser ¶
func UpdateUser ¶
Function to update an user by id
func UpdateView ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.