helper

package
v0.0.0-...-9c9198d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB() *mongo.Database

ConnectDB : This is helper function to connect mongoDB

func GetError

func GetError(err error, w http.ResponseWriter)

GetError : This is helper function to prepare error model.

Types

type ErrorResponse

type ErrorResponse struct {
	StatusCode   int    `json:"status"`
	ErrorMessage string `json:"message"`
}

ErrorResponse : This is error model.

Jump to

Keyboard shortcuts

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