mongo

package
v0.0.0-...-aace954 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_NAME = "goauth"

	USER_COLLECTION     = "users"
	AUDITLOG_COLLECTION = "auditlog"
)

Variables

View Source
var (
	ProjUserOnly = bson.M{
		"_id":                            1,
		"passwordHash":                   1,
		"consecutiveFailedLoginAttempts": 1,
		"lockedOutUntil":                 1,
		"lastLoginDate":                  1,
	}
	ProjUserWithSpecificContact = bson.M{
		"_id":                            1,
		"passwordHash":                   1,
		"consecutiveFailedLoginAttempts": 1,
		"lockedOutUntil":                 1,
		"lastLoginDate":                  1,
		"contacts.$":                     1,
	}
)
View Source
var (
	ProjContactOnly = bson.M{
		"id":            1,
		"name":          1,
		"principal":     1,
		"rawPrincipal":  1,
		"type":          1,
		"isPrimary":     1,
		"confirmedDate": 1,
	}
)

Functions

func NewAuditLogRepo

func NewAuditLogRepo(client *mongo.Client) *auditLogRepo

func NewUserRepo

func NewUserRepo(client *mongo.Client) userRepo

func NewUserRepoWithNames

func NewUserRepoWithNames(client *mongo.Client, dbName, collectionName string) userRepo

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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