mongo

package
v0.0.0-...-ff4c41b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommandContext

func NewCommandContext(ctx context.Context, db *mongo.Database) commands.CommandContext

func NewQueryContext

func NewQueryContext(ctx context.Context, db *mongo.Database) queries.QueryContext

func NewQueryWorker

func NewQueryWorker(mongoDatabase *mongo.Database, useTransaction bool) worker.QueryWorker[queries.QueryContext]

func NewUnitOfWork

func NewUnitOfWork(mongoDatabase *mongo.Database, useTransaction bool) worker.UnitOfWork[commands.CommandContext]

func SearchPerson

func SearchPerson(ctx context.Context, db *mongo.Database) queries.SearchPerson

func ViewPerson

func ViewPerson(ctx context.Context, db *mongo.Database) queries.ViewPerson

func ViewPersonByEmail

func ViewPersonByEmail(ctx context.Context, db *mongo.Database) queries.ViewPersonByEmail

Types

type Household

type Household struct {
	ID               string            `bson:"_id"`
	Name             string            `bson:"name"`
	HouseholdHead    HouseholdMember   `bson:"householdHead"`
	PictureUrl       string            `bson:"pictureUrl"`
	HouseholdMembers []HouseholdMember `bson:"householdMembers"`
}

type HouseholdMember

type HouseholdMember struct {
	PersonID          string `bson:"personID"`
	FirstName         string `bson:"firstName"`
	LastName          string `bson:"lastName"`
	ProfilePictureUrl string `bson:"profilePictureUrl"`
	Email             string `bson:"email"`
	PhoneNumber       string `bson:"phoneNumber"`
}

type Person

type Person struct {
	ID                string  `bson:"_id"`
	FirstName         string  `bson:"firstName"`
	MiddleName        string  `bson:"middleName"`
	LastName          string  `bson:"lastName"`
	ProfilePictureUrl string  `bson:"profilePictureUrl"`
	Address           string  `bson:"address"`
	PhoneNumber       string  `bson:"phoneNumber"`
	EmailAddress      string  `bson:"emailAddress"`
	MaritalStatus     string  `bson:"maritalStatus"`
	Birthday          *string `bson:"birthday"`
	Gender            string  `bson:"gender"`
}

type PersonHousehold

type PersonHousehold struct {
	ID          string `bson:"_id"`
	HouseholdID string `bson:"householdID"`
}

Jump to

Keyboard shortcuts

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