lib

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(db *mongo.Collection, user *users.InternalUser) (*users.User, error)

AddUser adds a new user to the database

func CountUsers added in v0.3.2

func CountUsers(db *mongo.Collection) (int64, error)

CountUsers ...

func GetUserByEmail

func GetUserByEmail(db *mongo.Collection, email string) (*users.User, error)

GetUserByEmail queries the user database by email

func GetUserByID

func GetUserByID(db *mongo.Collection, userID *users.UserID) (*users.User, error)

GetUserByID queries the user database by id

func HasAdminUser

func HasAdminUser(db *mongo.Collection, excluded []*users.UserID) (bool, error)

HasAdminUser checks if at least one admin user exists in the database

func RemoveUser

func RemoveUser(db *mongo.Collection, userID *users.UserID) error

RemoveUser deletes a user from the database

func StreamUsers added in v0.3.2

func StreamUsers(db *mongo.Collection, stream pb.UserManagement_GetUsersServer) error

StreamUsers ...

func StreamUsersByTransportID added in v0.3.2

func StreamUsersByTransportID(db *mongo.Collection, transportID *ids.CeptaTransportID, stream pb.UserManagement_GetSubscribersForTransportServer) error

StreamUsersByTransportID ...

func UpdateUser

func UpdateUser(db *mongo.Collection, userID *users.UserID, update *users.InternalUser) error

UpdateUser updates selected properties for a user id If the user does not yet exist, an error is returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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