core

package
v0.0.0-...-5346628 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindOrSeed

func FindOrSeed(collection *mongo.Collection, key string, data []interface{})

FindOrSeed checks if the database was already seeded or seeds it

func GetMongoClient

func GetMongoClient() (*mongo.Client, error)

GetMongoClient returns a MongoDB Client

func GetSchema

func GetSchema(path string) (string, error)

GetSchema gets the schema at a provided path

func Graphql

func Graphql(schema string, resolvers interface{}) http.HandlerFunc

Graphql middleware returns the handler

func InitViper

func InitViper()

InitViper initializes viper configs

func Playground

func Playground() http.HandlerFunc

Playground middleware renders Graphiql

func Seed

func Seed(c *mongo.Client)

Seed inserts some demo data into the database

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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