mongodb

package
v0.0.0-...-b21a685 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

func NewConnection

func NewConnection(ctx context.Context, cfg *Config) (*db, error)

Types

type Config

type Config struct {
	URL      string
	DbName   string
	UserName string
	Password string
}

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