handlers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAcademicSession

func GetAcademicSession(client *mongo.Client) http.HandlerFunc

func GetAllAcademicSessions

func GetAllAcademicSessions(client *mongo.Client) http.HandlerFunc

func GetAllClasses

func GetAllClasses(client *mongo.Client) http.HandlerFunc

func GetAllCourses

func GetAllCourses(client *mongo.Client) http.HandlerFunc

func GetAllEnrollments

func GetAllEnrollments(client *mongo.Client) http.HandlerFunc

func GetAllOrgs

func GetAllOrgs(client *mongo.Client) http.HandlerFunc

func GetAllUsers

func GetAllUsers(client *mongo.Client) http.HandlerFunc

func GetClasses

func GetClasses(client *mongo.Client) http.HandlerFunc

func GetCollection

func GetCollection(
	c *mongo.Collection, pf []string,
	w http.ResponseWriter, r *http.Request,
) ([]bson.M, []error)

Gets a collection of docs

func GetCourses

func GetCourses(client *mongo.Client) http.HandlerFunc

func GetDoc

func GetDoc(
	c *mongo.Collection, pf []string,
	w http.ResponseWriter, r *http.Request,
) (bson.M, []error)

Gets a specific item based off the sourcedId

func GetEnrollments

func GetEnrollments(client *mongo.Client) http.HandlerFunc

func GetOrg

func GetOrg(client *mongo.Client) http.HandlerFunc

func GetUser

func GetUser(client *mongo.Client) http.HandlerFunc

func HelloWorld

func HelloWorld(w http.ResponseWriter, r *http.Request)

func Login

func Login() http.HandlerFunc

func PutAcademicSession

func PutAcademicSession(client *mongo.Client) http.HandlerFunc

func PutClasses

func PutClasses(client *mongo.Client) http.HandlerFunc

func PutCourses

func PutCourses(client *mongo.Client) http.HandlerFunc

func PutDoc

func PutDoc(c *mongo.Collection, data interface{},
	w http.ResponseWriter, r *http.Request)

Upserts a specific item based off the sourcedId

func PutEnrollments

func PutEnrollments(client *mongo.Client) http.HandlerFunc

func PutNestedDoc

func PutNestedDoc(
	c *mongo.Collection, data interface{},
	obj string, field string,
	w http.ResponseWriter, r *http.Request,
)

Performs an upsert operation to a nested array

func PutOrg

func PutOrg(client *mongo.Client) http.HandlerFunc

func PutUser

func PutUser(client *mongo.Client) http.HandlerFunc

func PutUserId

func PutUserId(client *mongo.Client) http.HandlerFunc

Types

type Nested

type Nested struct {
	SourcedId string `json:"sourcedId" bson:"sourcedId,omitempty"`
	Type      string `json:"type" bson:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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