uploader

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

This file is responsible for providing various useful database functions.

Package uploader writes parsed datasets and derived aggregations into MongoDB collections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Upload

func Upload(inDir string, replace bool, staticOnly bool)

Upload sends parsed JSON files to MongoDB and refreshes static aggregations.

func UploadAcademicCalendars

func UploadAcademicCalendars(inDir string)

func UploadData

func UploadData[T any](client *mongo.Client, ctx context.Context, fptr *os.File, replace bool)

UploadData uploads parsed JSON documents to a MongoDB collection. Make sure the file name matches the collection name (e.g., courses.json for the courses collection).

func UploadEvents

func UploadEvents(inDir string)

UploadEvents loads event JSON files and replaces the corresponding MongoDB collections.

func UploadMapLocations

func UploadMapLocations(inDir string)

UploadMapLocations replaces the map locations collection with the generated map JSON.

Types

type DBSingleton

type DBSingleton struct {
	// contains filtered or unexported fields
}

TODO: Replace instances and check

Directories

Path Synopsis
Package pipelines defines reusable MongoDB aggregation pipelines for derived data.
Package pipelines defines reusable MongoDB aggregation pipelines for derived data.

Jump to

Keyboard shortcuts

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