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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommandContext

func NewCommandContext(ctx context.Context, mongo *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 SearchEvent

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

Types

type AgeFilter

type AgeFilter struct {
	From int `bson:"from"`
	To   int `bson:"to"`
}

type ChurchEvent

type ChurchEvent struct {
	ID                     string     `bson:"_id"`
	Name                   string     `bson:"name"`
	Locations              []Location `bson:"locations"`
	EventFrequency         string     `bson:"event_frequency"`
	LatestSessionStartTime time.Time  `bson:"latest_session_start_time"`
	LatestShowAt           time.Time  `bson:"latest_show_at"`
	LatestHideAt           time.Time  `bson:"latest_hide_at"`
	LatestSessionNo        int        `bson:"latest_session_no"`
}

type ChurchEventSession

type ChurchEventSession struct {
	ID        string    `bson:"_id"`
	Name      string    `bson:"name"`
	SessionNo int       `bson:"session_no"`
	StartTime time.Time `bson:"start_time"`
	ShowAt    time.Time `bson:"show_at"`
	HideAt    time.Time `bson:"hide_at"`
}

type EventCheckInModel

type EventCheckInModel struct {
	ID        string    `bson:"_id"`
	Person    Person    `bson:"person"`
	SessionID string    `bson:"session_id"`
	CheckInAt time.Time `bson:"check_in_at"`
}

type GenderFilter

type GenderFilter string

type Location

type Location struct {
	Name      string    `bson:"name"`
	AgeFilter AgeFilter `bson:"age_filter"`
}

type Person

type Person struct {
	ID        string `bson:"_id"`
	FirstName string `bson:"firstName"`
	LastName  string `bson:"lastName"`
	Birthday  string `bson:"birthday"`
}

Jump to

Keyboard shortcuts

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