Documentation ¶
Index ¶
- func AccessAddToBson(idM interface{}, idR interface{}, accessI interface{}) (*Module, *Role, *Access, *bson.M, error)
- func AccessUpdateToBson(nA interface{}, idA interface{}, accessI interface{}) (primitive.ObjectID, primitive.ObjectID, primitive.ObjectID, int, string, error)
- func Login(nickI interface{}, passI interface{}) (string, string, error)
- func OperationUpdateToBson(idV interface{}, operI interface{}) (*primitive.ObjectID, *bson.M, error)
- func RoleAddToBson(idM interface{}, RoleI interface{}) (*Module, *Role, *bson.M, error)
- func UserGenericToBson(userI interface{}) (*primitive.ObjectID, *bson.M, error)
- func ViewToBson(idM interface{}, viewI interface{}) (*Module, *View, *bson.M, error)
- type Access
- type Module
- type Operation
- type Role
- type User
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessAddToBson ¶
func AccessAddToBson(idM interface{}, idR interface{}, accessI interface{}) (*Module, *Role, *Access, *bson.M, error)
cast accesses to list of bson.M
func AccessUpdateToBson ¶
func OperationUpdateToBson ¶
func RoleAddToBson ¶
func UserGenericToBson ¶
Types ¶
type Access ¶
type Module ¶
type Module struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `bson:"name"` Icon string `bson:"icon"` Color string `bson:"color"` Roles []Role `bson:"roles"` Views []View `bson:"views"` }
func ModuleUpdateToBson ¶
type Operation ¶
type Role ¶
type Role struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `bson:"name"` Description string `bson:"description"` Accesses []Access `bson:"accesses"` }
func RoleUpdateToBson ¶
type User ¶
type User struct { Id primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"` Names string `bson:"names"` Ln string `bson:"ln"` //last name Mln string `bson:"mln"` //mother last name Dni string `bson:"dni"` Photo string `bson:"photo"` Nick string `bson:"nick"` Email string `bson:"email"` Password string `bson:"password"` Roles []primitive.ObjectID `bson:"roles"` }
func UserUpdateToBson ¶
type View ¶
type View struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `bson:"name"` Description string `bson:"description"` Url string `bson:"url"` Icon string `bson:"icon"` Operations []primitive.ObjectID `bson:"operations"` }
func ViewUpdateToBson ¶
Click to show internal directories.
Click to hide internal directories.