Documentation ¶
Index ¶
- func FindOrSeed(collection *mongo.Collection, key string, data []interface{})
- func GetMongoClient() (*mongo.Client, error)
- func GetSchema(path string) (string, error)
- func Graphql(schema string, resolvers interface{}) http.HandlerFunc
- func InitViper()
- func Playground() http.HandlerFunc
- func Seed(c *mongo.Client)
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 ¶
GetMongoClient returns a MongoDB Client
func Graphql ¶
func Graphql(schema string, resolvers interface{}) http.HandlerFunc
Graphql middleware returns the handler
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.