helper

package
v0.0.0-...-2f4afb3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 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.Collection

ConnectDB : This is helper function to connect mongoDB If you want to export your function. You must to start upper case function name. Otherwise you won't see your function when you import that on other class.

func GetError

func GetError(err error, w http.ResponseWriter)

GetError : This is helper function to prepare error model. If you want to export your function. You must to start upper case function name. Otherwise you won't see your function when you import that on other class.

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